ABAPAdvanced
IDoc
Master SAP IDoc processing with inbound, outbound, partner profiles, message types, process codes, segments, status records, reprocessing and real integration debugging.
Overview
Master SAP IDoc processing with inbound, outbound, partner profiles, message types, process codes, segments, status records, reprocessing and real integration debugging.
Lessons in this topic
- IDoc Part 1: What an IDoc Is — Inbound, Outbound and the Big PictureUnderstand IDocs: the intermediate document container for ALE/EDI, its control record (EDIDC), data records (EDID4) and status records (EDIDS), outbound and inbound flows, the key configuration objects and the monitoring transactions WE02, WE05, WE19 and BD87.
- IDoc Part 2: Message Type, Basic Type and ExtensionDistinguish the IDoc building blocks: message type (business meaning, e.g. ORDERS), basic type (technical structure, e.g. ORDERS05), segments and segment hierarchy, extension types for custom segments, and the transactions WE30, WE31, WE60, WE81 and WE82.
- IDoc Part 3: Inbound IDoc ProcessingFollow an inbound IDoc from arrival to posted document: port and partner profile lookup, process code and function module, immediate vs background processing (RBDAPP01), status 64/50/51/53, and how inbound processing uses standard FMs like IDOC_INPUT_ORDERS.
- IDoc Part 4: Outbound IDocs, Distribution Model and ReprocessingCreate and send outbound IDocs: ALE distribution model (BD64) for master data and transactional messages, partner profile outbound parameters (receiver port, basic type, transfer immediately vs collect), MASTER_IDOC_DISTRIBUTE, status 30/03/02, RSEOUT00 and resending.
- IDoc Part 5: Partner Profile, Port and RFC ConfigurationConfigure the IDoc communication chain: logical systems (BD54, SCC4), RFC destinations (SM59), ports (WE21: tRFC, file, XML HTTP), partner profiles (WE20) with inbound and outbound parameters, and the typical configuration errors behind status 56, 29 and 02.
- IDoc Part 6: Inbound Process Code and Custom Function ModuleBuild a custom inbound IDoc: own message type and basic type, the standard inbound function module interface (IDOC_CONTRL, IDOC_DATA, IDOC_STATUS, RETURN_VARIABLES, WORKFLOW_RESULT), process code in WE42, assignment in WE57/BD51, and correct status handling.
- IDoc Part 7: Outbound Triggering — Output Control and Change PointersTrigger outbound IDocs automatically: output types with medium EDI/ALE (NACE, e.g. BA00 order confirmation, RD00 invoice), process codes like SD10/SD09, change pointers for master data (BD50, BD52, BD61, BD21), and custom outbound FMs with MASTER_IDOC_DISTRIBUTE.
- IDoc Part 8: Status Codes and Reprocessing with BD87Interpret the most important IDoc status codes (outbound 01, 02, 03, 12, 30; inbound 50, 51, 53, 56, 64, 68, 69), decide the right action, reprocess with BD87 or edit with WE02/WE19, and understand status 68/69 when editing IDocs.
- IDoc Part 9: IDoc Extension and Custom SegmentsAdd custom data to standard IDocs: create segments (WE31), an extension of the basic type (WE30), link it in WE82 and the partner profile, fill the segment outbound in user exits/BAdIs (e.g. customer exit for ORDERS/INVOIC), read it inbound, and release and transport correctly.
- IDoc Part 10: Debugging and Production SupportSupport IDoc interfaces in production: a triage sequence by status, debugging inbound FMs with WE19 and BD87, outbound debugging (output processing, RSNAST00, exits), tRFC problems in SM58, partner/customizing checks, monitoring and alerting, and safe correction procedures.
Interview questions covered
- How do you extend an IDoc without modifying SAP?
- IDoc processing floods the system at month-end. How do you handle it?
- An inbound IDoc failed with status 51. How would you analyze it?
- How do you find the function module used for inbound IDoc processing?
- IDoc integration is replaced with OData/RAP. Migration plan?
- How do you troubleshoot a failed inbound IDoc?
- What is a partner profile?
- An inbound IDoc is stuck in status 51. How do you troubleshoot?
- A large batch of outbound IDocs failed after a network issue. How would you recover safely?
- What is the difference between IDoc message type and basic type?
- What is an IDoc in SAP?
- Difference between message type and basic type.
- When would you still use IDoc instead of OData or modern APIs in S/4HANA?
- After a deployment, a receiver rejected MATMAS IDocs because the structure changed. What may have happened with message type, basic type and extension?
- An inbound ORDERS IDoc failed with status 51. Which parts of the IDoc do you look at first, and why?
- After a system restart, outbound IDocs to a partner stayed in status 30 and 02. How do you recover without sending duplicates?
- An inbound invoice IDoc fails with status 51 only for one company code. How do you debug it in production support?
- An inbound invoice IDoc (INVOIC) is not posted. How do you trace the inbound processing chain?
- Material master changes stopped reaching a warehouse system, while BD10 manual sends work. What do you check?
- A batch of inbound invoice IDocs remains in status 64. What does it mean and what do you do?