# IDoc to EDI X12 Mapping Worksheet

> Source: https://netray.co/tools/idoc-to-edi-x12-mapping-worksheet
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

An editable mapping sheet that pairs IDoc segments and fields with X12 segments and elements, with rules and open questions, exported as an Excel spec.

## Category

sap

## Erp

SAP ECC / S/4HANA

## Audience

- SAP integration developer
- EDI analyst
- SAP PI/PO or CPI developer

## Tool

**Kind:** worksheet

**Mode:** editable

**Columns:**

#### IDoc segment

**Key:** idoc_seg

**Type:** text

#### IDoc field

**Key:** idoc_field

**Type:** text

#### X12 segment

**Key:** x12_seg

**Type:** text

#### X12 element

**Key:** x12_elem

**Type:** text

#### Mapping rule

**Key:** rule

**Type:** text

#### Requirement

**Key:** req

**Type:** select

**Options:**

- Mandatory
- Conditional
- Optional

#### Status

**Key:** status

**Type:** select

**Options:**

- Open
- Agreed
- Built
- Tested

**Rows:**

**Idoc seg:** E1EDK01

**Idoc field:** BELNR

**X12 seg:** BIG

**X12 elem:** BIG02

**Rule:** Invoice number, direct copy

**Req:** Mandatory

**Status:** Agreed

**Idoc seg:** E1EDK03

**Idoc field:** DATUM (qualifier for document date)

**X12 seg:** BIG

**X12 elem:** BIG01

**Rule:** Convert YYYYMMDD to CCYYMMDD, confirm qualifier with partner

**Req:** Mandatory

**Status:** Open

**Idoc seg:** E1EDK02

**Idoc field:** BELNR (qualifier 001)

**X12 seg:** BIG

**X12 elem:** BIG04

**Rule:** Customer purchase order number

**Req:** Conditional

**Status:** Agreed

**Idoc seg:** E1EDK14

**Idoc field:** ORGID (qualifier for company code)

**X12 seg:** REF

**X12 elem:** REF02

**Rule:** Use qualifier agreed in the implementation guideline

**Req:** Optional

**Status:** Open

**Idoc seg:** E1EDKA1

**Idoc field:** PARVW RE / PARTN

**X12 seg:** N1

**X12 elem:** N101 = BT, N104

**Rule:** Bill-to party code

**Req:** Mandatory

**Status:** Agreed

**Idoc seg:** E1EDKA1

**Idoc field:** PARVW WE / PARTN

**X12 seg:** N1

**X12 elem:** N101 = ST, N104

**Rule:** Ship-to party code

**Req:** Conditional

**Status:** Open

**Idoc seg:** E1EDP01

**Idoc field:** POSEX

**X12 seg:** IT1

**X12 elem:** IT101

**Rule:** Line number, strip leading zeros

**Req:** Mandatory

**Status:** Built

**Idoc seg:** E1EDP01

**Idoc field:** MENGE

**X12 seg:** IT1

**X12 elem:** IT102

**Rule:** Invoiced quantity

**Req:** Mandatory

**Status:** Built

**Idoc seg:** E1EDP01

**Idoc field:** MENEE

**X12 seg:** IT1

**X12 elem:** IT103

**Rule:** Convert SAP unit to X12 unit code with a lookup table

**Req:** Mandatory

**Status:** Open

**Idoc seg:** E1EDP01

**Idoc field:** VPREI

**X12 seg:** IT1

**X12 elem:** IT104

**Rule:** Unit price, check price unit PEINH

**Req:** Mandatory

**Status:** Open

**Idoc seg:** E1EDS01

**Idoc field:** SUMME (summary qualifier for total)

**X12 seg:** TDS

**X12 elem:** TDS01

**Rule:** Total in implied decimals as per X12 rules, confirm qualifier

**Req:** Mandatory

**Status:** Open

**Notes:** 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.

## Content

**Intro:** 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.

**Sections:**

#### How to use the worksheet

**Body:** 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

**Body:** 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.

**Bullets:**

- 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

**Body:** 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

**Body:** 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.

**Cta:** 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.

**Faq:**

#### Which IDoc maps to X12 810?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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?

**Answer:** 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.

## Search terms

idoc to x12 mapping, invoic02 to 810 mapping, sap edi mapping template excel, idoc x12 810 mapping, sap idoc edi mapping specification, e1edk01 big02, idoc to edi mapping document, sap edi 810 field mapping

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
