ERPClimb logoERPClimb
Login
IDoc Integration with S/4HANA
Integration Suite & Cloud Integration (CPI)advanced

CPI IDoc Part 3: IDoc Mapping, Splitting and Troubleshooting

Full lesson currently free to read · AI practice limits apply separately

Key takeaway

Handle IDoc specifics in iFlows: importing IDoc structures, mapping control and data records, splitting bundled IDocs, extensions and custom segments, and a troubleshooting path from S/4HANA status to Cloud Integration logs.

Visual overview

CPI IDoc Part 3: IDoc Mapping, Splitting and Troubleshooting — learning sheetFlow: IDoc XSD import → Control record via parameters → Splitting bundles → Segment mapping and value mapping → End-to-end tracing. Key ideas: IDOC STRUCTURES; CONTROL RECORD; BUNDLED IDOCS; MAPPING PRACTICES. Watch out: Hard-coding control record values breaks when systems or partners change.ERPClimb.com / CPI / LESSON 8/14 / LEARNING SHEETCPI IDoc Part 3: IDoc Mapping, Splitting andTroubleshooting1 · HOW IT FLOWS1IDoc XSDimport2Controlrecord viaparameters3Splittingbundles4Segmentmapping andvalue…5End-to-endtracing2 · KEY IDEAS EXPLAINEDIDoc StructuresMappings need the IDoc structure as XSD. It can beexported from S/4HANA (for example via WE60documentation or tools that produce XSD) or…Control RecordEDI_DC40 contains sender and receiver partner,port, message type and IDoc type. For inboundIDocs, these must match partner profiles in…Bundled IDocsOutbound packets can contain several IDocs in onemessage. An IDoc splitter or general splitterprocesses them individually, which allows routing…Mapping PracticesMap only needed segments, handle qualifiers andrepeating segments carefully, and keep code valueconversions in value mappings. Test with real…3 · REMEMBER · WATCH OUTRememberIDoc XSDs are imported from S/4HANA to use in message mappings.Control record fields (EDI_DC40) must be set correctly for inboundposting.Several IDocs can arrive in one message; splitters process themindividually.!Watch outHard-coding control record valuesbreaks when systems or partnerschange.4 · IN A REAL PROJECTInbound IDocs failed with status 56 after a system copy, because the iFlow hard-coded the old logical systemname in the control record. Externalising sender and receiver partners as parameters per tenant fixed theissue and simplified future copies.Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

📌 KEY POINTS
✅ IDoc XSDs are imported from S/4HANA to use in message mappings.

✅ Control record fields (EDI_DC40) must be set correctly for inbound posting.

✅ Several IDocs can arrive in one message; splitters process them individually.

✅ Extended IDoc types with custom segments need the extended structure in mappings.

⚠️ Hard-coding control record values breaks when systems or partners change.

━━━━━━━━━━━━━━━━━━━━
▶ WHERE WE ARE

This final IDoc part covers mapping details and troubleshooting.

━━━━━━━━━━━━━━━━━━━━
▶ 1. IDOC STRUCTURES

Mappings need the IDoc structure as XSD. It can be exported from S/4HANA (for example via WE60 documentation or tools that produce XSD) or created from the IDoc type. For extended types with custom segments, the extension must be included.

━━━━━━━━━━━━━━━━━━━━
▶ 2. CONTROL RECORD

EDI_DC40 contains sender and receiver partner, port, message type and IDoc type. For inbound IDocs, these must match partner profiles in S/4HANA. Use externalised parameters or value mappings for values that differ by landscape instead of hard-coding them.

━━━━━━━━━━━━━━━━━━━━
▶ 3. BUNDLED IDOCS

Outbound packets can contain several IDocs in one message. An IDoc splitter or general splitter processes them individually, which allows routing and error handling per document. Consider ordering requirements when splitting.

━━━━━━━━━━━━━━━━━━━━
▶ 4. MAPPING PRACTICES

Map only needed segments, handle qualifiers and repeating segments carefully, and keep code value conversions in value mappings. Test with real IDocs from S/4HANA, including edge cases like multiple partners or items.

━━━━━━━━━━━━━━━━━━━━
▶ 5. TROUBLESHOOTING PATH

Outbound: WE02 status and SM59 tests in S/4HANA, then the message processing log and trace in Cloud Integration. Inbound: Cloud Integration log for delivery, then WE02 in S/4HANA for 51 or 56 statuses (56 often means partner profile issues). Correlate by IDoc number and message ID.

━━━━━━━━━━━━━━━━━━━━
▶ STEP BY STEP

  1. Import an IDoc XSD into a message mapping.
  2. Externalise control record values as parameters.
  3. Split a bundled IDoc message and process items individually.
  4. Trace one IDoc end to end by number.

✅ CHECKPOINT: IDoc mappings use correct structures and parameters, and any IDoc can be traced end to end.

How the SAP process fits together

SAP PROCESS EXPLORER · Integration: sender to receiver

ERPClimb.com

IDoc Integration with S/4HANA — process breakdown

Topic-specific conceptual flow: how key objects and decisions fit together. SAP configurations and exceptional cases can follow different paths.

1/4

Selected process stage

Configure

Ports, RFC destinations and partner profiles in S/4HANA

What this specific lesson teaches

Handle IDoc specifics in iFlows: importing IDoc structures, mapping control and data records, splitting bundled IDocs, extensions and custom segments, and a troubleshooting path from S/4HANA status to Cloud Integration logs.

Key lesson principle: IDoc XSDs are imported from S/4HANA to use in message mappings.

Representative SAP learning flow, not a guarantee of system runtime sequence in every scenario. The chapter-specific facts come from the published lesson text.

Real project scenario

Inbound IDocs failed with status 56 after a system copy, because the iFlow hard-coded the old logical system name in the control record. Externalising sender and receiver partners as parameters per tenant fixed the issue and simplified future copies.

Common mistakes

  • Hard-coded control record values.
  • Missing custom segments in structures.
  • Not splitting bundles when needed.
  • Tracing only one side.

Best practices

  • Externalised parameters for partners.
  • Complete extended IDoc structures.
  • Splitters for per-document handling.
  • Correlate IDoc number and message ID.

Interview angle

Interviewers ask how to map IDocs in Cloud Integration, how to handle control records and bundles, and how to trace IDoc problems end to end.

Practice this lesson

Original educational case studies for SAP consultants, not official SAP certification exam questions. Verify product edition and implementation details against the current SAP documentation.

Quick check

0 of 3 questions attempted

1. Which IDoc record contains sender, receiver, port and message type?

2. What does status 56 on an inbound IDoc commonly indicate?

3. Why externalise control record values instead of hard-coding them?

Interview questions

1. How do you build robust IDoc mappings in Cloud Integration?

Answer it in your own words first, then compare.

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.

More lessons in this topic

Related SAP topics