SAP IDoc Basics

SAP IDocs (Intermediate Documents) are the standard data structure used for communication between SAP systems, enabling quick and easy integration with other systems. They enable users to transfer data from one system to another via a series of messages. In this article we will cover the basic terms used in IDOC.

The IDoc is an SAP object used to send transactional data electronically between different systems. IDoc stands for Intermediate Document. An IDoc is a standardized data structure used for transferring data between SAP systems and external systems. The transfer from a SAP to a non-SAP system is achieved through Electronic Data Interchange (EDI) subsystems, while the interchange between two SAP systems uses ALE.
iDocs can be initiated in the SAP system or EDI environment. The direction of an IDoc determines whether it is Inbound or Outbound, respectively. When sending data from SAP, IDoc documents are triggered by message control and then routed to the EDI subsystem. Electronic Data Interchange (EDI) takes the data from IDoc and transforms it into XML or a similar file format, then sends it via the Internet to a partner system.
EDI transforms partner data to generate IDocs in SAP for incoming processes. Once the IDoc is processed successfully, an application document will be posted in SAP.
Figure 1 IDoc Processing Overview
EDI (Electronic Data Interchange) is a method of sending business documents between the computer systems of trading partners, using standardized formats and communication networks. EDI stands for Electronic Data Interchange.
Electronic information is commonly transmitted using either ANSI ASC X12 or EDIFACT standards. The ANSI ASC X12 committee is composed of representatives from major organizations, government bodies, and EDI software companies who create standards and guidelines for EDI data interchange. The UN/EDIFACT was created in 1985 and is an acronym for United Nations EDI for Administration, commerce and Transport, which builds on ANSI X12 and UNTDI (United Nations Trade Data interchange) as base standards. ANSI X12 outlines business documents as transactions that are represented by three-digit numbers, like 850 for Purchase Orders and 855 for Purchase Order Acknowledgements. The EDIFACT standard assigns common names, such as ORDERS, to business documents used in message transactions like purchase orders.

Terms used in IDOC

IDocs are based on EDI (Electronic Data Interchange) and EDIFACT (Electronic Data Interchange for Administration, Commerce, and Transport) standards.

IDoc Types

IDoc Types (also referred to as Basic Types) define the structure of an IDoc. The basic types of IDocs define the different segments, data fields and sizes. An IDoc's number of segments and fields is defined by Basic Type. Data fields critical for transmitting a message regarding a business transaction are mapped into different segments. In addition, it outlines the IDoc segments, their mandatory and optional properties, and how they link together.
Figure 2 IDoc Types

IDoc Extension

The standard fields needed to conduct a business transaction are included in the Basic type. If we need to send more information to the partner, we can take advantage of the IDoc Extension feature. An IDoc extension is a custom variation of a standard IDoc type that includes extra segments and fields not included in the standard type.

IDoc Segments

The data exchanged with a partner is contained within IDoc segments. The IDoc transmission contains specific values within these segments.
Figure 3 IDoc Segments

Parent And Child Segments

IDoc segments that include their own sub-segments are known as parent segments. Child segments are referred to as dependent segments.
Figure 4 IDoc Parent And Child Segments

Idoc Direction

This term relates to how information is sent, similar to the "to" and "from" used in emails. If information is sent out of the system, it is referred to as outbox; if it is received, the direction is inbox. In SAP, Outbound direction is represented by the number "1" while Inbound direction is given a value of "2".
Figure 5 IDoc Direction


Inbound/Outbound Idocs

IDocs that are sent out of the system are known as Outbound IDocs whereas those that are received into the system are known as Inbound IDocs.
Figure 6 Inbound / Outbound IDocs
The partner type/role identifier is used to recognize partners in SAP systems. The partner types are KU (customer), LI (vendor), and LS (Logical System).
Figure 8 IDoc Partner Types
Message Type
The IDoc Process involves sending or receiving a message in SAP that corresponds to a particular document. Order, Shipment Confirmation, Advance Shipping Notification, Goods Receipt, and Invoice are all documents that could be present. The kind of data or document that is exchanged with the partner is determined based on the Basic IDoc Type (Basic Type) and Message type.
Process Code
The process code holds the specifics of the Function Module that is used for IDoc processing. The Message Type can be linked to the Process code.
IDoc Port contains instructions for the transmission of data between the source and target system. The port contains specific information depending on its type. When port type is "Internet," the port includes the target system's IP address. When using a File port, you'll store the directory name or file name data. With tRFC ports, destination details about the targeted system are kept. The transfer of IDocs through ALE requires the use of “tRFC” ports.


152 SAP Docs posts