An IDoc (Intermediate Document) is SAP’s standard format for electronic data interchange (EDI) between SAP systems or between SAP and external systems. It acts as a structured container for data, ensuring that the information exchanged follows a predefined format, making communication consistent and reliable across different systems.
Structure of an IDoc
Control Record – Contains metadata (sender, receiver, IDoc type, etc.).
Data Records – Actual business data (sales order, material, etc.).
Status Records – Processing status (success, error, etc.).
Used for inbound (into SAP) and outbound (from SAP) communication.
Common Scenarios for IDocs
Sending sales orders from a non-SAP system into SAP.
Transferring master data (customer, material) between SAP systems.
Sending invoices, deliveries, purchase orders electronically.
| Tcode | Purpose |
|---|---|
WE30 | Create IDoc type |
WE31 | Create segment |
WE81 | Create message type |
WE82 | Assign message type to IDoc type |
WE20 | Partner profile configuration |
WE19 | Test tool for IDoc processing (very common) |
WE02 | Display IDocs (overview & details) |
WE05 | Display IDocs (alternative to WE02, with more selection options) |
BD87 | Reprocess failed IDocs |
WE09 | Search IDocs for specific data values |
WE60 | Documentation for IDoc types |
WE21 | Port definition (RFC, File, etc.) |
Quick Example Workflow
Create a new IDoc type:
WE30.Define segments:
WE31.Link to a message type:
WE81+WE82.Configure partner profile:
WE20.Send/Receive IDocs → Check with
WE02/WE05.Reprocess errors →
BD87.Test →
WE19.