IDocs

Definition

An intermediate document (IDoc) is a container for exchanging data between R/3, R/2 and non-SAP systems.

Use

ALE uses IDocs to exchange data between logical systems. Non SAP-systems can use IDocs as the standard interface for data transfer.

IDocs are created by message types and (object) methods when data is to be distributed.

The message type is the format in which the data for a specific business process is transmitted electronically.

Structure

An IDoc represents a configuration of an IDoc Type that determines the IDoc structure. An IDoc consists of a header, several data segments and status records.

The functions of the individual elements of an IDoc are as follows:

  • The contents, structure, sender, receiver and current status of the IDoc are defined in the IDoc header.
  • Each data segment contains a standard header consisting of a sequential segment number, a description of the segment type and a 1000 character long string field containing the actual data of the segment.
  • The status records show the history of the processing steps applied to the IDoc so far.

Structure of an IDoc

The structure of the IDoc is recorded in the SAP System. The structure definition covers the following:

  • The segment sequence. Hierarchical relationships between segments are possible. The number of times a segment can occur is specified for each segment, as is whether the segment is a mandatory segment or an optional segment.
  • The fields contained in a segment.

In the example shown above the IDoc contains a header segment that has to be the first segment of the message. Thereafter there must be at least one additional item. The following conditions apply:

  • Each item must be followed by at least one sub-item and at most 99.
  • Up to 9999 text segments can appear after an item’s sub-items (optional).
  • The last segment in a message must be an accumulation segment (ACCUM).

An IDoc can only contain character fields.