SAP IDoc as an integration API
IDoc (Intermediate Document) is SAP’s structured, asynchronous document format for exchanging business data, robust and restartable, ideal for high-volume and EDI integration. As an API mechanism, IDocs move business documents between systems.
An IDoc is the right API when the exchange is asynchronous, must be guaranteed and runs at volume: EDI with trading partners and SAP-to-SAP distribution of master and transaction data. It is the wrong choice where the caller needs a synchronous reply, which is what RFC and OData are for. Statuses are monitored in WE02 and reprocessed in BD87.
- Watch out: Ignoring IDoc statuses (errors invisible).
IDoc as an integration API
The full IDoc lesson, anatomy to distribution model, is SAP IDoc integration. This page answers one question: when an IDoc is the right API.
Where OData/RFC are often synchronous and program-oriented, IDocs provide asynchronous, document-based exchange: SAP generates or receives structured documents (orders, invoices, master data) that are processed independently, with full status tracking and the ability to reprocess failures, ideal for reliable, high-volume, partner integration (EDI).
Structure and flow
- Control, data and status records make up an IDoc.
- Outbound: SAP generates and dispatches; inbound: SAP receives and posts.
- ALE distributes SAP-to-SAP; EDI subsystems handle external partners.
- Statuses track each IDoc (e.g. 51 error, 53 posted).
Monitoring
WE02 / WE05 - display IDocs and statuses
BD87 - reprocess errored IDocs
WE19 - test/edit an IDocWhen to use it
Choose IDocs for asynchronous, guaranteed, high-volume document exchange, especially EDI with trading partners and SAP-to-SAP master/transaction data distribution. Their robustness and monitoring make them a mainstay of enterprise integration.
Common pitfalls
- Ignoring IDoc statuses (errors invisible).
- Using IDocs for real-time synchronous needs.
- No monitoring/reprocessing of failed IDocs.