IDoc to EDI X12 Mapping Worksheet
Most EDI projects stall on the mapping spec, not the tooling. This worksheet gives you a structured sheet pairing IDoc segments and fields with X12 segments and elements, plus the rule, requirement and status for each, so analysts and developers work from the same document.
| IDoc segment | IDoc field | X12 segment | X12 element | Mapping rule | Requirement | Status | |
|---|---|---|---|---|---|---|---|
This is a starter for an INVOIC02 to X12 810 mapping. Always confirm segment qualifiers, field names and release specifics in WE60 for your IDoc version, and follow the trading partner implementation guideline for X12 rules. Add one row per field you map and track status to the end of testing.
Speed up EDI mapping work
Ask how an on-prem assistant could draft mapping rows from your partner guideline for your team to review.
Optional. The tool and every export work without this. No spam.
How to use the worksheet
Start from the sample rows for an outbound INVOIC to 810 and edit them to your partner guideline. Add one row for every field you map, set the requirement from the guideline and update the status as you build and test. Export to Excel and share it with the trading partner for sign-off before development.
How IDoc and X12 structures differ
An IDoc is a hierarchy of segments with fixed field names, while X12 is a flat sequence of segments grouped in loops, with elements identified by position such as BIG02. Mapping is not only copying fields: qualifiers, units, dates and implied decimals need rules, and repeating loops like N1 need qualifier logic.
- Use the qualifier fields in E1EDKA1 and E1EDK02 to pick the right target
- Convert SAP unit of measure to the X12 unit code with a lookup
- Check date formats and time zones
- Handle repeating items (IT1) and totals (TDS) consistently
Where the mapping runs
The mapping can live in an EDI subsystem, SAP CPI, PI/PO or a managed service. Whichever tool you use, keep the spec independent of it, so you can test the logic with sample files and re-implement it if the platform changes.
Common mistakes
Copying the guideline once and never updating it, ignoring conditional segments, treating all partners alike when each guideline differs, and testing only with clean data are common. Add test cases for credit memos, zero quantity lines and multiple ship-to parties.
Frequently Asked Questions
Which IDoc maps to X12 810?
Billing documents are normally sent as message type INVOIC with basic type INVOIC02, and the usual X12 counterpart is the 810 invoice. The exact segments and qualifiers vary by trading partner and by SAP release.
Do I map IDoc directly to X12 in SAP?
Usually not inside the ERP. SAP sends the IDoc to an EDI subsystem or an integration platform like CPI or PI/PO, which performs the conversion to X12. The ERP side stays a standard IDoc interface.
How do I handle units of measure?
SAP stores internal unit codes, often different from the X12 unit of measure codes. Maintain a lookup table in the mapping or the integration platform and fail the message clearly if a unit has no match rather than sending a wrong code.
Why track status per row?
A row-level status shows exactly what is still open with the partner, what is built and what is tested. It avoids the common late discovery that a conditional segment was never agreed, and it makes handover to support cleaner.
Netray can help you build EDI mapping assistants that draft mapping rows from a partner guideline and an IDoc type, with your team approving each line.
Related Tools
SAP IDoc Message Types Reference (ORDERS, DESADV, INVOIC, MATMAS, DEBMAS)
Searchable list of common SAP IDoc message types with the basic IDoc type, business meaning and the X12 or EDIFACT message they usually map to.
SAPSAP CPI iFlow Design Template
A fill-in design document for an SAP Cloud Integration iFlow, covering adapters, mappings, exception handling and monitoring, ready to hand to reviewers.
SAPSAP IDoc Status Codes Reference
Look up any IDoc status code, see whether it is inbound or outbound, whether it is an error, and which transaction to use to fix it.
SAPSAP OData Service URL Builder
Generate a correct SAP Gateway OData V2 request URL with query options, test it in a browser or REST client, then reuse it in your code.
More SAP tools
See all- SAP Sales Document Types Reference
- SAP Pricing Procedure Design Worksheet
- SAP Item Category Determination Reference
- SAP Delivery Block Reasons Template
- SAP Credit Management Checklist
- SAP Output Determination Checklist
- SAP Billing Types Reference
- SAP Incompletion Log Checklist
- SAP SD Tables Reference (VBAK, VBAP, LIKP, VBRK and More)