What is an IDoc? Walk me through its three kinds of records, and explain how message type, basic type, segments and extensions relate to each other.
Say your answer out loud first.
Practise another way
An IDoc, an intermediate document, is SAP's container for exchanging business data asynchronously. It uses ALE between SAP systems or EDI with partners.
Every IDoc has one control record in EDIDC with sender, receiver, message type and basic type. Its data records in EDID4 are each a segment name plus up to 1000 characters of data.
Its status records in EDIDS log its processing. The message type says what the data means, for example MATMAS. The basic type defines the segment structure, and an extension adds customer segments.
What it is An IDoc (intermediate document) is a neutral data container. The IDoc interface serves three uses: ALE between SAP systems, EDI with business partners through a subsystem, and other external applications.
It is asynchronous: the sender writes the IDoc to its database and passes it on; the receiver posts it later.
The three record types
- Control record (table EDIDC, one per IDoc): IDoc number, direction (1 outbound, 2 inbound), sender and receiver partner and port, message type, basic type, extension and current status.
- Data records (stored in EDID4, handled in ABAP with structure EDIDD): each record has SEGNAM, the segment type, and SDATA, up to 1000 characters that hold the segment's fields. For every segment type there is a dictionary structure of the same name, which is how you read SDATA.
- Status records (table EDIDS): one row per processing step, with DOCNUM, STATUS and message text. Statuses 00-49 are outbound, 50-99 inbound. You see all three in WE02 or WE05.
Types and how they link
- Message type (for example MATMAS, ORDERS, DEBMAS) is the business meaning.
- Basic type (IDoc type) is the technical structure: which segments, in which hierarchy, how often. Maintained in WE30.
- Segments are defined in WE31; standard names start with E1, such as E1MARAM.
- An extension attaches your own segments to a basic type without copying it, also in WE30.
- WE82 links message type, basic type, extension and release.
A useful picture: the message type is the class of business document, the basic type its layout.
Reading a segment in ABAP
" Inside an inbound function module: idoc_data is a table typed EDIDD
DATA ls_mara TYPE e1maram.
LOOP AT idoc_data INTO DATA(ls_data) WHERE segnam = 'E1MARAM'.
ls_mara = ls_data-sdata. " SDATA maps onto the segment structure
ENDLOOP.
Where IDocs stand today In SAP S/4HANA on-premise and Private Edition IDocs work as before. SAP S/4HANA Cloud Public Edition supports only a fixed list of inbound IDocs, exchanged over SOAP; for new designs SAP points to released OData and SOAP APIs and business events.
Names all three record types with their tables and fields, separates message type from basic type, and mentions extensions and WE82.
Says 'an IDoc is a file' or 'a BAPI for batch', mixes up message type and IDoc type, or cannot say where the status history lives.
Treating message type and basic type as the same thing: one message type can be carried by several basic types and versions, and WE82 decides which one is used.
- What is stored in SDATA, and how long can it be?
- What links a message type to a basic type?
- How would you find all IDocs for one material number?
- Are IDocs still available in SAP S/4HANA Cloud Public Edition?
1 candidate write-up, 4 official pages and 5 prep guides. Confidence: high. Checked 2 Dec 2026.
- Prep guide Gives the question.
- Prep guide Gives the question.
- Prep guide Gives the question.
- Prep guide Gives the question.
- Prep guide Gives the question.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Candidate write-up Gives the question.