2.3 IDocs:
IDocs (Intermediate Documents) are
the crux of ALE. These are the documents with the help of which data
is exchanged between SAP R/3 and non-R/3 systems. As the name
suggests, these documents act as intermediate storage of
information, which can be sent bi-directionally. Message types are
responsible for creation of Idocs.
IDocs Components
Data on Internet is exchanged
using data formats like IPV6 – and SAP uses a similar approach.
Idocs are a well-structured medium through which data transfer takes
place. Figure 3 explains the structure of Idocs.

Figure 3: IDoc COMPONENTS
Image Source:
http://help.sap.com
An IDoc is made up of the
following parts:
- Control Record: This section contains control
information regarding the Idoc. Its constituents are Sender’s
name, Receiver name, Message type and Idoc type (illustrated in
figure 3). The format of the control record is similar for all
IDoc types.
- Data Segment: It consists of a header that
contains the identity of the Idoc. Its constituents include, a
sequential segment number, a segment type description and field
containing the actual data of the segment.
- Status records: The status record shows the
information regarding the already processed stages and remaining
processing stages of the Idoc. It has an identical format for
each IDoc type.
Idocs Structure:
Idocs support a hierarchical
structure. Figure 4 shows an Idoc, starting with the header. The
header has items, which in turn have sub-items. The lowest level in
the hierarchy contains the text. The end of the Idoc is represented
with the help of ACCUM (means accumulate) segment. Remember that an
IDoc can only contain character fields.

Figure 4: IDoc STRUCTURE
Image Source:
http://help.sap.com

