All IDocs are created according to specific rules: This is the general structure (the record types) of every IDoc. Special rules affect the different IDoc types.
IDocs contain administration information for technical processing, as well as the actual application data, which is stored in segments. A segment comprises segment fields as the smallest unit of the IDoc - comparable with the data elements from the EDIFACT standard.
In the SAP System, the processing status ("what has happened to the IDoc before now?") is stored in the IDoc status information. The status information also contains details about errors and indicates the data in which the error occurred. This status information is not forwarded as part of the IDoc but separately using "status processing".
IDoc types (special structure)
An IDoc type is defined through its permitted segments. Segments can be dependent on each other (parent and child segments). For example, segment E1EDPT1 (document item text identification) is a child segment of segment E1EDP01 (document item data, general) in IDoc type EXPINV01 (export billing) and a child segment of E1EDP07 (order data shipping notification) in IDoc type DESADV01 (shipping notification). The segment, therefore, is used in several contexts and is the "child" of several "parents".
Customer extensions are created by defining new segments and appending them as children of existing segments of the basic type (the basic type is the IDoc type supplied with the standard SAP System, that is, the type to be extended). The new segments (and extension) must be within the customer namespace. SAP segment names start with "E1" (see
The figure below shows the basic structure of an IDoc and which parts are transferred to and from the external system. The parent-child segment hierarchy is shown here as a tree structure. A total of 3 hierarchy levels can be seen.
The IDoc Interface can check for each IDoc whether the segments contained are compatible with the definition of its type. This syntax check is activated or deactivated in thePartner profiles (separately for inbound and outbound processing).
For more information, seeIDoc Structure: Technical Implementation.