Page |1
IDOC – Intermediate DOCument SYNOPSIS 1. Difference Between EDI and IDOC ----------------------------------------------------
Page - 3
2. IDOC ---------------------------------------------------------------------------------------------
Page - 4
3. IDOC STRUCTURE – In Detail ---------------------------------------------------------• CONTROL RECORD -------------------------------------------------------------------• DATA RECORD -------------------------------------------------------------------------• STATUS RECORD ------------------------------------------------------------------------
Page - 6 Page - 6 Page - 6 Page - 9
4. FINAL OUTPUT OF AN IDOC -----------------------------------------------------------
Page - 12
5. IDOC COMPONENTS ----------------------------------------------------------------------
Page - 13
6. CREATE AN IDOC – Basis Concept ----------------------------------------------------
Page - 13
•
STEP 1 – IDOC STRUCTURE ---------------------------------------------------------- Page - 14 ○ Create SEGEMENTS ----------------------------------------------------------------- Page - 14 ○ Basic IDOC Type --------------------------------------------------------------------- Page - 14 ○ Message Type ------------------------------------------------------------------------- Page - 15 ○ Assign Message type to Basic type ---------------------------------------------- Page - 15
•
Step 2 – OUTBOUND SETTINGS ---------------------------------------------------○ Define Logical System--------------------------------------------------------------○ Maintain RFC Destination --------------------------------------------------------○ Define Ports --------------------------------------------------------------------------○ Maintain Distributed Model -----------------------------------------------------○ Generate Partner Profile ----------------------------------------------------------○ Distribute Model View -------------------------------------------------------------
Page - 15 Page - 16 Page - 16 Page - 16 Page - 16 Page - 16 Page - 17
•
Step 3 – INBOUND SETTINGS ------------------------------------------------------○ Define Logical System -------------------------------------------------------------○ Maintain RFC Destination --------------------------------------------------------○ Define Ports --------------------------------------------------------------------------○ Maintain Distributed Model -----------------------------------------------------○ Generate Partner Profile ----------------------------------------------------------○ Distribute Model View ------------------------------------------------------------○ Assign Function Module to Logical message -------------------------------○ Define Input method for Inbound Function Module ----------------------○ Create a Process Code -------------------------------------------------------------
Page - 17 Page - 17 Page - 18 Page - 18 Page - 18 Page - 18 Page - 18 Page - 18 Page - 19 Page - 19
Page |2
•
SEND AND RECEIVE DATA ---------------------------------------------------------
Page - 19
7. EXAMPLE: TO CREATE AN IDOC ---------------------------------------------------• STEP 1 – IDOC STRUCTURE ---------------------------------------------------------• Step 2 – OUTBOUND SETTINGS ---------------------------------------------------• Step 3 – INBOUND SETTINGS ------------------------------------------------------• SEND AND RECEIVE DATA ---------------------------------------------------------
Page – 20 Page - 21 Page - 23 Page - 26 Page - 29
8. IDOC to FLAT FILE --------------------------------------------------------------------------
Page – 30
9. USE FULL T-CODE --------------------------------------------------------------------------
Page - 37
Page |3
DIFFERENCE BETWEEN EDI AND IDOC: EDI is nothing but Electronic data interchange. SAP will support EDI through Intermediate documents (IDOCS). EDI (Electronic Document interchange) - EDI is the electronic exchange of business documents between the computer systems of business partners, using a standard format over a communication network. EDI is also called paperless exchange. Advantages: • Reduced Data entry errors • Reduced processing time • Availability of data in electronic form • Reduced paperwork • Reduced Cost • Reduced inventories and better planning • Standard means of communications • Better business process EDI has two processes 1. Outbound process 2. Inbound process Outbound Process: • Application document is created. • IDOC is generated • IDoc is transferred from SAP to Operating system layer • Idoc is converted into EDI standards • Edi document is transmitted to the business partner • The Edi Subsystem report status to SAP Inbound Process: • EDI transmission received • EDI document is converted into an IDOC • IDOC is transferred to the SAP layer • The application document is created • The application document can be viewed.
IDOC:
Page |4
IDoc (for intermediate document) is a standard data structure for electronic data interchange (EDI) between application programs written for the popular SAP business system or between an SAP application and an external program. IDoc serve as the vehicle for data transfer in SAP's Application Link Enabling (ALE) system. IDOC is a container/envelope that can be used to exchange data between any two Systems. Each IDoc is assigned a unique number for tracking and future reference. IDoc Consist of several segments and segments contain several fields. IDoc contains the following three types of records as shown in FIG. 1 & FIG. 2 •
CONTROL RECORD
•
DATA RECORD
•
STATUS RECORD
FIG. 1: IDOC Structure
Page |5
FIG 2: Three types of records in IDOC. (WE02 – Date – F8 – Double Click on IDOC Number) An IDoc encapsulates data so that it can be exchanged between different systems without conversion from one format to another. IDoc types define different categories of data, such as purchase orders or invoices, which may then be broken down into more specific categories called message types. Greater specificity means that an IDoc type is capable of storing only the data required for a particular transaction, which increases efficiency and decreases resource demands. The IDoc is transmitted to the receiver, which may be an R/3, R/2, or some external system.
IDOC STRUCTURE – In Detail 1. CONTROL RECORD
Page |6
It contains the key information like destination, IDoc type, message type, port and sender information as shown in FIG. 3 Technical Name
Description
EDIDC DIRECT DOCREL STATUS IDOCTYP CIMTYP MESTYP MESCOD MESFCT CREDAT CRETIM SNDPOR SNDPRT SNDPRN RCVPOR RCVPRT RVCPRN STD STDVRS STDMES
Control Record Direction Release Status Basic Type Enhancement Message Type Message Variant Message Function Created On Created At Sender Port Sender Partn. Type Sender Partner Number Receiver Port Receiver Partner Type Receiver Partner Number EDI Standard EDI Version EDI Message Type
Value
2 : Inbound 620 53 :Application document posted 53 :Purchasing/Sales 53:00:00 ORDRSP
20030717 134133 SAPDM8 LS SUS_00_805 SAPID3 LS T90CLNT090
FIG. 3: Control Record details in a Flat File.
2. DATA RECORD: This contains two parts Administrative Section and Data Section as shown in FIG. 4 Administrative Section consists of Idoc number, Segment Name, Segment number, Version, Segment Hierarchy etc. Data Section contains the data of respective segment. EDIDD Data Records SEGNUM Segment Number SEGNAM Segment Name ACTION Action code for the whole EDI
1 E1EDK01 004 : Changes in header and items
Page |7 CURCY SEGNUM SEGNAM IDDAT DATUM UZEIT SEGNUM SEGNAM PARVW PARTN NAME1 ORT01 PSTLZ LAND1 SEGNUM SEGNAM PARVW PARTN NAME1 STRAS ORT01 PSTLZ LAND1
Currency Segment Number Segment Name Qualifier for IDOC date segment IDOC: Date IDOC: Time Segment Number Segment Name Partner function (e.g. sold-to Partner number Name 1 City Postal code Country Key Segment Number Segment Name Partner function (e.g. sold-to Partner number Name 1 Street and house number 1 City Postal code Country Key
USD 2 E1EDK03 12 20030717 134132 3 E1EDKA1 LF : Vendor 5595 IDES SUS Vendor ATLANTA 30345 US 4 E1EDKA1 AG : Sold-to party 3000 IDES US INC 1230 Lincoln Avenue New York 10019 US
FIG. 4: Data Record details in a Flat File. In FIG.4, bold item are the data and rest are the Idoc number, Segment Name, Segment number, Version, Segment Hierarchy
Now, FIG.5 will clear the Segment Hierarchy
Page |8
FIG.5: Segment’s Hierarchy (WE30 - Obj. Name: ORDERS02)
Page |9
FIG.5: Segment’s Hierarchy (WE02 – Date – F8 – Double Click on IDOC Number – Open Data Record)
3. STATUS RECORD: Whenever a process is taken place, system will generate status records. We can identify the process with the number of status record as shown in FIG. 6. 01 - 49 for Outbound Process 50 - 75 for Inbound Process When IDoc is processed the messages are: 01 - IDoc is created 30 - IDoc is ready for dispatch
P a g e | 10 03 - IDoc is processed EDIDS EDIDS STATUS LOGDAT LOGTIM CREDAT CRETIM UNAME REPID ROUTID EDIDS
Status Records Status Record Number Status Value Logged On Logged At Database Changed On Database Changed At Last Processed By Status set by program Status set by program Status Record Number
STATUS STAMQU/STAMID/STAM NO STATXT STAPA2 STAPA3 STAPA4 LOGDAT LOGTIM CREDAT CRETIM UNAME REPID ROUTID EDIDS STATUS STAMQU/STAMID/STAM NO STATXT LOGDAT LOGTIM CREDAT CRETIM UNAME REPID ROUTID EDIDS STATUS STAMQU/STAMID/STAM
Status Value
2 64 : IDoc ready to be transferred to application
Status Code Message Parameter2 Parameter3 Parameter4 Logged On Logged At Database Changed On Database Changed At Last Processed By Status set by program Status set by program Status Record Number Status Value
SAPB1005 & &, &, &. No filters No conversion No version change 20030717 134133 20030717 134133 IDES_RFC SAPLEDIR IDOC_STATUS_64OR65_SET 3 62 : IDoc passed to application
Status Code Message Logged On Logged At Database Changed On Database Changed At Last Processed By Status set by program Status set by program Status Record Number Status Value Status Code
SAPB1042 Direct call started 20030717 134133 20030717 134135 IDES_RFC SAPLBD20
1 50 : IDoc added 20030717 134133 20030717 134133 IDES_RFC
4 53 : Application document posted SAPME769
P a g e | 11 NO STATXT STAPA1 LOGDAT LOGTIM CREDAT CRETIM UNAME REPID ROUTID
Message Parameter1 Logged On Logged At Database Changed On Database Changed At Last Processed By Status set by program Status set by program
Purchasing document & successfully processed 4500015401 20030717 134133 20030717 134135 IDES_RFC SAPLEINM MAINTAIN_DATA_ORDRSP
FIG. 6: Status Record Details in a Flat File.
P a g e | 12
FINAL OUTPUT OF AN IDOC: FIG. 7 is the actual spool output of an IDOC. This is a Purchase Order for particular company which contains, vendor’s Details, PO Number, their date, Contact detail, Payment terms & Full details of an Item.
FIG. 7: Final spool output of an Idoc. (ME23N – Shift + F5 – PO Number – Shift + F8)
P a g e | 13
IDOC COMPONENTS There are basically two types of IDOCs Basic Idoc Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems. Extension Idoc Extending the functionality by adding more segments to existing Basic IDOCs.
CREATE AN IDOC – Basis Concept There are 3 basic steps by which you can create your own IDOC as shown in FIG. 8. You need to follow all these steps properly on your systems.
STEP 1
Idoc Structure
STEP2
STEP3
FINAL OUTPUT
OutBound Settings
InBound Settings
IDOC
Create –
Outbound Settings:
Segments Basic Type Message Type Assign Message type to Basic Type
Define Logical System Maintain RFC Destination Define Ports Maintain Distributed model Generate Partner Profile Distribute Model view Outbound IDOC Generation Program
Inbound IDOC Posting Function Module Inbound Settings: Define Logical System Client – Logical System Maintain RFC Destination Define Ports Generate Partner Profile Assign Function Module – Logical Message Define Input Method for inbound function Module Create Process Code Send & Receive Data
P a g e | 14 FIG. 8: Steps to create an IDOC. NOTE: Each step will be divided in to sub steps. STEP 1
Idoc Structure Create –
Segments Basic Type Message Type Assign Message type to Basic Type
1.1. Create SEGEMENTS • Go to transaction code WE31 • Enter the name for your segment type and click on the Create icon • Type the short text • Enter the Field names and data elements • Save it and go back • Go to Edit -> Set Release Follow steps to create more number of segments 1.2. Basic IDOC Type • Go to transaction code WE30. • Enter the Object Name, select Basic type and click Create icon. • Select the create new option and enter a description for your basic IDOC type and press enter. • The system prompts us to enter a segment type and its attributes. • Choose the appropriate values and press Enter. • Save it and go back.
P a g e | 15 •
Go to Edit -> Set release.
1.3. Message Type • Go to transaction code WE81 • Change the details from Display mode to Change mode • After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter • Click New Entries to create new Message Type • Fill details • Save it and go back 1.4. Assign Message type to Basic type • Go to transaction code WE82 • Change the details from Display mode to Change mode • After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter • Click New Entries to create new Message Type • Fill details • Save it and go back STEP 2
OutBound Settings
•
Outbound Settings:
Define Logical System Maintain RFC Destination Define Ports Maintain Distributed model Generate Partner Profile Distribute Model view
•
Outbound IDOC Generation Program
P a g e | 16
2.1 Define Logical System • T-Code: SALE • Go to Define Logical System • Define a new logical system to identify the local system and save it • Now, go to Assign Client to Logical System • Add a new entry • Specify the client, previously created logical system and other attributes • Save the entry • Define a new logical system to identify the partner system and save it • Specify the new client, to newly created Logical System & save it 2.2 Maintain RFC Destination • T-Code : SM59 • Create 1 RFC destination for R/3 type connection • Specify the target host on Technical settings tab • Provide the Logon credentials on the Logon/Security tab • Save the settings • To verify the settings, Click on Test connection or Remote logon • Create 2 RFC Connection for second Logical System & specify their details. 2.3 Define Ports • T-Code: WE21 • We need to define a tRFC port for the partner system • Click on Transactional RFC node • Create a new port • Provide a description • Specify the name of the target RFC destination • Save the object 2.4 Maintain Distributed Model • T-Code BD64 • Click on Change • Create a new model view • Provide a Short text and Technical name to the model view • Add message type • Specify sender and receiver systems • Also, specify the message type that we created previously • Save the Distribution model 2.5 Generate Partner Profile • BD82 • Specify the model view, target system and execute • The result log will be displayed on the next screen
P a g e | 17 • •
To verify the partner profile go to WE20 Check the partner profile for the target system
2.6 Distribute Model View • T-Code: BD64 • Select the Model View • Go to menu path Edit -> Model View -> Distribute • Result log will be displayed on the next screen
STEP 3
InBound Settings •
Inbound IDOC Posting Function Module
Inbound Settings: Define Logical System Client – Logical System Maintain RFC Destination Define Ports Generate Partner Profile Assign Function Module – Logical Message Define Input Method for inbound function Module Create Process Code • Send & Receive Data •
3.1 Define Logical System • T-Code: SALE • Go to Define Logical System • Define a new logical system to identify the local system and save it • Now, go to Assign Client to Logical System • Add a new entry • Specify the client, previously created logical system and other attributes • Save the entry • Define a new logical system to identify the partner system and save it
P a g e | 18 •
Specify the new client, to newly created Logical System & save it
3.2 Maintain RFC Destination • T-Code : SM59 • Create 1 RFC destination for R/3 type connection • Specify the target host on Technical settings tab • Provide the Logon credentials on the Logon/Security tab • Save the settings • To verify the settings, Click on Test connection or Remote logon • Create 2 RFC Connection for second Logical System & specify their details. 3.3 Define Ports • T-Code: WE21 • We need to define a tRFC port for the partner system • Click on Transactional RFC node • Create a new port • Provide a description • Specify the name of the target RFC destination • Save the object 3.4 Maintain Distributed Model • T-Code BD64 • Click on Change • Create a new model view • Provide a Short text and Technical name to the model view • Add message type • Specify sender and receiver systems • Also, specify the message type that we created previously • Save the Distribution model 3.5 Generate Partner Profile • BD82 • Specify the model view, target system and execute • The result log will be displayed on the next screen • To verify the partner profile go to WE20 • Check the partner profile for the target system 3.6 Distribute Model View • T-Code: BD64 • Select the Model View • Go to menu path Edit -> Model View -> Distribute • Result log will be displayed on the next screen 3.7 Assign Function Module to Logical message
P a g e | 19 • • • • •
Transaction WE57 Create a new entry Specify name of the Function Module Also, specify Type as F, Basic IDoc type, Message type and Direction as 2 (Inbound) Save the entry
3.8 Define Input method for Inbound Function Module • Transaction BD51 • Create a new entry • Provide Function Module name • Specify the Input method as 2 • Save the entry 3.9 Create a Process Code • Transaction WE42 • Create a new Process Code • Select Processing with ALE Service • Choose Processing type as Processing by function module • Save the entry • On the next screen, select your function module from the list • Save the changes • Now you will be taken to the next screen • Double-click on Logical message • In the Assignment to logical message, specify the message type • Save the changes SEND AND RECEIVE DATA On the sender system, execute the IDoc Generation Program. Check the status of IDoc using transaction WE02.
Check the status of the IDoc in the receiver system using transaction WE02. You can also check the contents of DDic tables to make sure that the records have been created in the receiver system.
P a g e | 20
EXAMPLE: TO CREATE AN IDOC The Scenario is Data from custom tables (created in customer namespace) is to be formatted into an IDoc and sent from one SAP R/3 system to another using ALE service. We need to have two instances of SAP R/3 systems or we can simulate this on two clients of the same SAP R/3 system.
Create three tables as shown below.
P a g e | 21
FIG. 9
Idoc Structure Create –
Segments Basic Type Message Type Assign Message type to Basic Type
All the objects created should be present on both source as well as target system(s). 1.1. Create SEGEMENTS (ZRZSEG1, ZRZSEG2 & ZRZSEG3) • Go to transaction code WE31 • Enter the name for your segment type ZRZSEG1 to hold all fields of table ZCUSTOMERS and click on the Create icon
P a g e | 22 • • • •
Type the short text Enter the Field names and data elements (refer FIG. 9) Save it and go back Go to Edit -> Set Release
Follow all these steps to create more number of segments • •
Seg. ZRZSEG2– to hold all fields of table ZSOHEADERS Seg. ZRZSEG3– to hold all fields of table ZSOITEMS
1.2. Basic IDOC Type (ZRZORDER) • Go to transaction code WE30. • Enter the Object Name ZRZORDER and click Create icon. • Select the create new option and enter a description for your basic IDOC type and press enter. • The system prompts us to enter a segment type and its attributes. • Choose the appropriate values and press Enter. • Save it and go back. • Go to Edit -> Set release.
1.3. Message Type (ZRZSO_MT) • Go to transaction code WE81 • Change the details from Display mode to Change mode • After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter • Click New Entries to create new Message Type ZRZSO_MT • Fill details
P a g e | 23 •
Save it and go back
1.4. Assign Message type to Basic type • Go to transaction code WE82 • Change the details from Display mode to Change mode • After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter • Click New Entries • Fill details Message Type ZRZSO_MT, Basic Type ZRZORDER & current Release • Save it and go back Thus we have defined the IDoc structure which will hold the data to be transferred.
OutBound Settings
•
Outbound Settings:
Define Logical System Maintain RFC Destination Define Ports Maintain Distributed model Generate Partner Profile Distribute Model view
•
Outbound IDOC Generation Program
2.1 Define Logical System (Sender: Any NAME, Receiver: Any Name)
• • •
FIG: 10 T-Code: SALE Go to Define System Define a new system to identify the local system(Sender) refer FIG. 10 and save it
Logical logical
P a g e | 24 • • • • • •
Now, go to Assign Client to Logical System Add a new entry Specify the client, previously created logical system and other attributes Save the entry Define a new logical system to identify the partner system (Partner) and save it Specify the new client, to newly created Logical System & save it
2.2 Maintain RFC Destination (Should be same as Logical System) • T-Code : SM59 • Create 1 RFC destination (Logical System: Sender) for R/3 type connection • Specify the target host on Technical settings tab • Provide the Logon credentials on the Logon/Security tab • Save the settings • To verify the settings, Click on Test connection or Remote logon • Create 2 RFC Connection for second Logical System: Receiver & specify their details. 2.3 Define Ports (Let system choose the name) We need to define a tRFC port for the partner system • • • • • •
T-Code: WE21 Click on Transactional RFC node Create a new port Provide a description Specify the name of the target RFC destination Save the object
2.4 Maintain Distributed Model • T-Code BD64 • Click on Change • Create a new model view • Provide a Short text and Technical name to the model view • Add message type ZRZSO_MT • Specify sender (Logical System 1) and receiver systems (Logical System 2) • Also, specify the message type ZRZSO_MT that we created previously • Save the Distribution model 2.5 Generate Partner Profile • BD82 • Specify the model view, target system (Logical System 2) and execute • The result log will be displayed on the next screen • To verify the partner profile go to WE20 • Check the partner profile for the target system 2.6 Distribute Model View • T-Code: BD64
P a g e | 25 • • •
Select the Model View Go to menu path Edit -> Model View -> Distribute Result log will be displayed on the next screen
OUTBOUND IDOC GENERATION PROGRAM Create an executable program ZRZ_ORDER_IDOC in SE38. Below, I have described the program logic: •
Fetch the data from the DDic tables ZCUSTOMERS, ZSOHEADERS and ZSOITEMS as per the selection criteria
•
Fill the control record structure of type EDIDC ○
•
Specify message type, Basic IDoc type, tRFC Port, Partner number and Partner type of the receiver
Fill the data records ○
Define structures like the IDoc segments
○
Fill the structures with fetched data
○
Pass the segment name and the above structure to the appropriate fields of EDIDD type structure
○
Append the EDIDD structure to the EDIDD type internal table
•
Now, call the function module MASTER_IDOC_DISTRIBUTE and pass the IDoc control record structure and data record table
•
Commit work if return code is zero
•
Function module returns a table of type EDIDC to provide the details about generated IDoc
•
Display appropriate log
You can download sample code for the above program here. Thus we have completed sender side configuration required for ALE.
P a g e | 26
InBound Settings •
Inbound IDOC Posting Function Module
Inbound Settings: Define Logical System Client – Logical System Maintain RFC Destination Define Ports Generate Partner Profile Assign Function Module – Logical Message Define Input Method for inbound function Module Create Process Code • Send & Receive Data •
INBOUND IDOC POSTING FUNCTION MODULE
In the receiving system, create a function module Z_IDOC_INPUT_ZRZSO_MT using SE37. Below, I have described the logic for the same. Add Include MBDCONWF. This include contains predefined ALE constants. Loop at EDIDC table •
Check if the message type is ZRZORDER. Otherwise raise WRONG_FUNCTION_CALLED exception
•
Loop at EDIDD table ○ Append data from the segments to appropriate internal tables ○ For example: append data from ZRZSEG1 segment to the internal table of type ZCUSTOMERS
•
Update the DDic tables from internal tables
•
Depending on the result of the update, fill the IDoc status record (type BDIDOCSTAT) and append it to the corresponding table. ○ Status 53 => Success ○ Status 51 => Error
You can download the sample ABAP code for the above function module here.
P a g e | 27 3.1 Define Logical System (Sender: Any NAME, Receiver: Any Name)
FIG: 10 • • • • • • • • •
T-Code: SALE Go to Define Logical System Define a new logical system to identify the local system(Sender) refer FIG. 10 and save it Now, go to Assign Client to Logical System Add a new entry Specify the client, previously created logical system and other attributes Save the entry Define a new logical system to identify the partner system (Partner) and save it Specify the new client, to newly created Logical System & save it
3.2 Maintain RFC Destination (Should be same as Logical System) • T-Code : SM59 • Create 1 RFC destination (Logical System: Sender) for R/3 type connection • Specify the target host on Technical settings tab • Provide the Logon credentials on the Logon/Security tab • Save the settings • To verify the settings, Click on Test connection or Remote logon • Create 2 RFC Connection for second Logical System: Receiver & specify their details. 3.3 Define Ports (Let system choose the name) We need to define a tRFC port for the partner system • • • • • •
T-Code: WE21 Click on Transactional RFC node Create a new port Provide a description Specify the name of the target RFC destination Save the object
3.4 Maintain Distributed Model • T-Code BD64 • Click on Change
P a g e | 28 • • • • • •
Create a new model view Provide a Short text and Technical name to the model view Add message type ZRZSO_MT Specify sender (Logical System 1) and receiver systems (Logical System 2) Also, specify the message type ZRZSO_MT that we created previously Save the Distribution model
3.5 Generate Partner Profile • BD82 • Specify the model view, target system (Logical System 2) and execute • The result log will be displayed on the next screen • To verify the partner profile go to WE20 • Check the partner profile for the target system 3.6 Distribute Model View • T-Code: BD64 • Select the Model View • Go to menu path Edit -> Model View -> Distribute • Result log will be displayed on the next screen 3.5 Assign Function Module to Logical message • Transaction WE57 • Create a new entry • Specify name of the Function Module as Z_IDOC_INPUT_ZRZSO_MT • Also, specify Type as F, Basic IDoc type as ZRZORDER, Message type as ZRZSO_MT and Direction as 2 (Inbound) • Save the entry 3.6 Define Input method for Inbound Function Module • Transaction BD51 • Create a new entry • Provide Function Module name as Z_IDOC_INPUT_ZRZSO_MT • Specify the Input method as 2 • Save the entry 3.7 Create a Process Code • Transaction WE42 • Create a new Process Code ZPCRZ • Select Processing with ALE Service • Choose Processing type as Processing by function module • Save the entry • On the next screen, select your function module from the list • Save the changes • Now you will be taken to the next screen • Double-click on Logical message
P a g e | 29 • •
In the Assignment to logical message, specify the message type ZRZSO_MT Save the changes
SEND AND RECEIVE DATA On the sender system, execute the IDoc Generation Program. Check the status of IDoc using transaction WE02.
Check the status of the IDoc in the receiver system using transaction WE02. You can also check the contents of DDic tables to make sure that the records have been created in the receiver system.
P a g e | 30
IDOC TO FLAT FILE Follow these steps to convert an IDOC into flat/Text/Rich Text/Spread sheet file format. •
WE02/WE05, Enter Date - 2003 – 2009 & then Execute (F8)
P a g e | 31
•
Choose any Outbound IDOC (MATMAS 00072)
•
Open on any IDOC Number (Idoc Number – 605709)
•
You’ll see the structure of an IDOC which includes Control, Data & Status Records
P a g e | 32
•
Open data record, you’ll see the SEGMENTS
•
Choose anyone SEGMENT(E1MARAM Segment 000001), In Menu Bar – Idoc – Print Idoc
P a g e | 33
•
You’ll get the Idoc Display Screen
•
Click on this option (Control + Shift + F9) to convert this Idoc to .txt, .xls, .html, or .doc file format
•
Choose appropriate option
P a g e | 34
• •
Choose Directory, File Name & then Generate it. Go ahead and check your file.
USE FULL TCODE
P a g e | 35
Main Menus WEDI EDI Related Activities BALE ALE Related Activities SWLD Workflow Related Activities SALE ALE Configuration NACE Message Control Configuration IDOC Definition SE11 Data Dictionary WE30 IDoc type editor WE31 Segment editor BD53 Reduction of IDoc types WE60 Documentation for IDoc types WE61 Documentation for IDoc record types IDOC Monitoring WE02 IDoc display WE05 IDoc Lists WE06 Active IDoc monitoring WE07 IDoc statistics Configuration (ALE and EDI) BD54 Maintain logical systems BD64 Maintain distribution model BD71 Distribute Customer Model BD82 Generate partner profiles FILE Logical File Paths PFTC Task Definition PPOC Maintain Organization Structure SM59 Maintain RFC Destinations SWE2 Event Linkage SWU3 Basic Workflow Settings WE20 Partner profiles WE21 Port definition Run Time Workflow SO01 SAP Inbox SWEL Event Log SWI1 Workflow Log SWI2 Work Item Analysis SWI5 Workload Analysis Message Control NACE Condition Record Maintenance VOK2 SD Message Control Components VOK3 Purchasing message Control Components VOFM View Message Requirements
P a g e | 36 V/86 Condition Table Field Catalog WE15 IDoc test: Outbound from MC Testing WE19 Test tool WE12 IDoc test: Inb. Procg of Outb. File WE16 IDoc test: Inbound File WE17 IDoc test: Inbound status report Reprocessing IDOCS BD87 Process inbound IDoc BD88 Process outbound IDoc