SAPFree worksheetPDF, Excel, Word exportSAP ECC / S/4HANA

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.

Download:
IDoc segmentIDoc fieldX12 segmentX12 elementMapping ruleRequirementStatus

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.