Gyan Factory

Gyan Factory
SAP Technical Project Support

Sunday, December 13, 2015

Learn Idoc step by step


The Scenario


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.




Outbound Settings
Define Logical Systems and Assign Client to Logical System – Transaction SALE


Maintain RFC Destinations – Transaction SM59
Define Ports – Transaction WE21
Maintain Distribution Model – Transaction BD64
Generate/Create Partner Profile – Transactions BD82/WE20


Distribute Model View – Transaction BD64
Outbound IDoc Generation Program
Create an executable program ZRZ_ORDER_IDOC in SE38. Below, I have described the program logic:

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

Inbound Settings
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.


Thus to summarize we have learned how to:

No comments:

Post a Comment