Wednesday, 27 February 2013

Introduction to Idocs in SAP

First let me emphasize on the fact that I am in a budding state when it comes to the field of Idocs (Intermediate Documents). I am just doing my level best to put across whatever info I gathered pertaining to Idocs.
Understanding the concept of Idocs is relatively easy when compared to explaining it or rather finding the root cause when an issue is encountered in Idocs.
The first question that arises in our mind is what exactly the Idocs are? Let me put this way, in any business transaction there are basically two entities involved. And the transactions are made in the format which both entities have agreed upon. Idocs are the file formats used to exchange the data between the two entities involved.
Idocs can be Master Idoc or Communication Idocs. The main difference between the two is the number of Idocs generated. There can be only one Master Idoc generated for any number of receivers for the same data but when it comes to Communication Idoc number depends on number of receivers for the same data.
Idocs are mainly categorized into two types.
1.       Outbound Idoc (Sender)
2.       Inbound Idoc (Receiver)
 
For example triggering an Idoc whenever a sales order (VA01) is created is Outbound Idoc and creating a sales order using the same triggered Idoc is Inbound Idoc.
VA01 à Idoc (Outbound)
Idoc à VA01 (Inbound)

Structure of an Idoc
Idoc mainly consist of three types of records as shown in the below screenshot.
1.       Control Record
2.       Data Record
3.       Status Record

An Idoc can have multiple data and status records but there can be only one control record.






Control Record: Control records ate stored in EDIDC table which contains the key info which is essential to establish the connection between the two systems (done through RFC Configuration – SM59). 

                                                                                                                                                             Data Record: The structure EDIDD holds all the data transferred through Idoc in the form of segments. It specifies the Idoc Number, Segment Type and so on. 
 










Status Record: When an Idoc is processed, at each level a status record is generated which will specify the current status of an Idoc. For Outbound process the status records range is 01-49 and for Inbound process 50-75. The table EDIDS stores all the status records.
 
                                                                                                                                                                            For successful Outbound process the status of an Idoc should be 03 and for Inbound process 53 should be the status. We can see all the status messages via WE47 Tcode.

                                        
 
 
 
There is one more data record EDID4 (Idoc Data Records) which will store all the inbound and the outbound Idocs and their corresponding segments.
 


                                                                                                                                                                                        
 
References:
 



No comments:

Post a Comment