IDOC in SAP
In this blog, I will discuss one of the SAP Concept which is designed in such way to help to transfer the Data.
IDOC stands for Intermediate Document. It is an SAP object that carries data of a business transaction from one system to another. The transfer from SAP to non-SAP system is done via EDI (Electronic Data Interchange) subsystems whereas for transfer between two SAP systems, ALE is used. IDOC can be sent into two directions i.e., Inbound, and outbound in the form of electronic message.
For inbound flow, EDI converts partner data and IDOC will be created in SAP system. And for outbound flow, IDOC is triggered in Sap through message control, which is then sent to EDI subsystem, Most of the cases EDI converts the data of IDOC into XML format or equivalent format and sends the data to
partner system through protocol. After successful processing of this IDOC, Application Document is created in SAP system.
IDOC types.
- An IDOC type basic defines the structure and format of the document that’s to be exchanged. For defining the IDOC basic type you can go to the transaction code WE30.
IDOC is of 2 types
- Basic.
- Extension.
- In Basic we create the IDOC structure as per our requirement but in case of Extension sap has provided some built in IDOC which we can modify also, as per the requirements we can use. Documentation of an IDOC can be seen in transaction WE60.
What is Segment in IDOC?
- It defines the format and structure of an IDOC. In each segment SAP creates segment type, segment definition, segment documentation. You can go to the transaction code WE31.
- IDOC segments contain the actual data that will be sent to or received from a partner.
Parent and Child Segment.
- Parent segment if it contains its own segments else if it is dependent segment are called as Child segment.
IDOC Direction
- IDOC can be sent into two directions i.e., Inbound, and outbound in the form of electronic message. Inbound is like we are receiving the data and Outbound is kike we are sending the data.“1” represents the Outbound and “2” represents the Inbound.
Partner Profiles.
- We can Transfer the data through IDOC Interface using Business Partner.
Port.
- Its used to connect with two system where we want to transfer the data.
Message types.
- In IDOC we can have one basic type and multiple message types. Note for inbound and outbound message type is always different but can have same basic type.
The IDOC structure consist of 3 parts:-
- Control Record: It will give the direction of an IDOC, message type, status. Also, all the IDOC information is stored in EDIDC table, in this table we can find IDOC number, direction i.e., inbound, or outbound, channel, port, etc. In WE19 or WE02 Transaction we can see ‘1’ and ‘2’ that indicates Outbound and inbound.
- Data Record: As the name gives a hint that it will contain a Data with a specific requirement. EDIDD is a structure where we can se the IDOC segments and for data we can se in EDID2.
- Status Record: It will be in Green Yellow and Red which indicates Completed, Warning and Error according to status number we can check it is processed or failed. From 01–75 there are standard sap status are defined.
- You can view the IDOC using transaction code WE02 or WE05.
- Every IDOC has a Unique Number.
Scenario
We have already configured the steps. Partner (Vendor) is sending some data. The data is an Outbound IDOC by the Partner (Vendor) and will be Inbound IDOC for the SAP system. Assume the Data is coming from Partner (Vendor).
Thanks for reading the blog.
If you Want to Connect with Me:
LinkedIn: https://www.linkedin.com/in/mayank-chourasia-38421a134/
Twitter: https://twitter.com/ChourasiaMayank.
YouTube: Learn Technology with Mayank Chourasia
Thank you, stay safe, stay healthy.
Stay tuned till the next blog
Reference : https://www.guru99.com/all-about-idocdefinition-architecture-implementation.html