SAP technical topicObjectSAP IDoc Architecture: Control Record, Data Segments and Status RecordsModuleBTP_INTEGRATION

SAP IDoc Architecture: Control Record, Data Segments and Status Records

An IDoc is a structured asynchronous integration document made of one control record, ordered data-segment records and a status history. EDIDC holds routing/control metadata, EDID4 stores segment payloads in extended format, and EDIDS records processing statuses and messages. The basic type/extension defines the segment hierarchy; partner profiles, ports and process codes determine how the document is sent or processed.

High-value SAP technical guide to SAP IDoc Architecture: Control Record, Data Segments and Status Records: architecture, troubleshooting position, a concrete scenario, decision rules, common production failures, S/4HANA direction, ownership and related evidence.

Reviewed by an ERPClimb SAP consultant on 20 Sept 2026· 711 words

What it is

IDoc is SAP's Intermediate Document framework for ALE/EDI-style integration. The control record identifies sender/receiver, message type, basic type/extension, port and processing context. Data records carry named segments in hierarchy order; each segment's SDATA is interpreted using the segment definition. Status records are appended as the IDoc moves through outbound generation, communication, inbound framework and application posting. The IDoc number ties all three layers together. A status is evidence of a processing step, not the business document itself; a successful technical transfer can still be followed by an application error status.

When to use it

Use IDocs when the SAP application provides a standard IDoc/message type, asynchronous decoupling and operational reprocessing are valuable, or an EDI/ALE landscape already uses partner profiles and monitoring. They fit high-volume document exchange where sender and receiver should not be tightly coupled to synchronous availability. For new S/4HANA cloud-centric integrations, compare the IDoc with released APIs/events before choosing it purely because the team knows WE20.

How it fits the stack

Message types connect business intent to basic IDoc types. WE30/WE31 define basic types and segments; WE20 partner profiles provide inbound/outbound parameters; WE21 ports define technical destinations; process codes link messages to outbound/inbound application logic; BD64 can determine ALE receivers. tRFC/qRFC may transport IDocs underneath. WE02/WE05 display document/status history. Reprocessing transactions/programs act on failed statuses without requiring the original sender to recreate the entire business payload.

A worked example

An ORDERS IDoc arrives and shows status 51. EDIDC confirms the sender/receiver/message/basic type; EDID4 shows the purchase-order segments; EDIDS contains the application error message. Because the IDoc reached inbound application processing, Basis does not begin with RFC connectivity. The MM/integration team fixes the master/configuration cause and reprocesses through the supported IDoc path. If the IDoc had stopped earlier in communication/queue status, the ownership path would be different.

How to choose

  • Start troubleshooting from the current/latest relevant status, then read the full status history.
  • Separate control/routing problems from segment-content problems and application-posting problems.
  • Use the standard message/basic type before designing a custom extension.
  • Keep partner profile, process code and port responsibilities distinct.
  • For new architecture, compare IDoc's asynchronous/reprocessing benefits with released API/event options.

Common pitfalls

  • Editing EDIDC/EDID4/EDIDS directly to force a desired status.
  • Reading only the latest status and ignoring earlier failures/reprocessing history.
  • Assuming a technically dispatched outbound IDoc means the receiver created its business document.
  • Confusing message type, basic type and process code as interchangeable identifiers.
  • Adding custom segments without considering receiver compatibility/versioning.

ECC, S/4HANA and clean core

IDocs remain widely supported in S/4HANA on-premise/private cloud and in many standard integrations. SAP also provides modern OData/SOAP/event APIs, so new designs should choose based on business semantics and lifecycle rather than age alone. Clean-core principles favor standard/released IDoc extension points and APIs rather than direct table/status manipulation.

Whose problem this is

Integration/ALE teams own partner profiles, ports, message/basic type mapping and monitoring. Functional teams own application posting/master data. Basis owns RFC/qRFC/communication infrastructure. ABAP owns custom segments, process-code function logic and safe extensions.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-technical-topics/sap-idoc-architecture-control-data-statusERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.