Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 4 of 5

From transaction set to IDoc

9 min

Listen to this lesson

0:00 / 10:29

Every EDI document has an SAP twin. Learning the pairs is the fastest way to become useful on an SAP EDI project, because the X12 number, the EDIFACT message name and the SAP message type are used interchangeably in meetings, tickets and specifications. Someone says "the 856 for Great Lakes failed" and means the outbound DESADV IDoc built from delivery 80001234.

Message type, basic type, process code

Three SAP terms carry the mapping, and they are easy to mix up:

  • Message type: the business meaning, such as ORDERS (purchase order or sales order), ORDRSP (order response), DESADV (despatch advice) or INVOIC (invoice). SAP took most names from EDIFACT. Message types are listed in transaction WE81.
  • Basic type (IDoc type): the technical structure and version of segments, such as ORDERS05, DELVRY07 or INVOIC02. One message type can use several basic types; WE82 shows which basic types belong to which message type.
  • Process code: the pointer from a partner profile to the program that builds or posts the IDoc, such as ORDE for inbound sales orders or DELV for outbound deliveries. Course sap-edi-201 covers them in detail.
Business documentX12EDIFACTSAP message typeTypical basic typeDirection at Contoso
Purchase order850ORDERSORDERSORDERS05Inbound from Great Lakes (creates sales order); outbound to Lakeside (from purchase order)
Order change860ORDCHGORDCHGORDERS05Not in scope with Great Lakes yet
Order acknowledgment855ORDRSPORDRSPORDERS05Outbound to Great Lakes
Ship notice856DESADVDESADVDELVRY07Outbound to Great Lakes
Invoice810INVOICINVOICINVOIC02Outbound to Great Lakes
Planning schedule / forecast830DELFORDELINSDELFOR01 / DELFOR02Not used by Contoso today
The common order-to-cash and procure-to-pay documents and their names in X12, EDIFACT and SAP.
The Sign-Off Table · thesignofftable.com/academy/sap-edi-101

Three details in that table catch people out. First, the order acknowledgment ORDRSP uses the same basic type as the order, ORDERS05: SAP's order IDoc structure serves orders, changes and responses. Second, the forecast is not called DELFOR in SAP: the 830 and EDIFACT DELFOR arrive as SAP message type DELINS with basic type DELFOR01 or DELFOR02, and just-in-time schedules (X12 862, EDIFACT DELJIT) use message type DELJIT. Third, the same message type can go in either direction: Contoso receives ORDERS from Great Lakes and sends ORDERS to Lakeside Components.

What an IDoc looks like

An IDoc has three parts. The control record holds the envelope: IDoc number, direction (1 outbound, 2 inbound), message type, basic type, sender and receiver partner and port. The data records hold the content in segments named like E1EDK01 (header general data) or E1EDP01 (item general data). The status records log each processing step with a two-digit status code, such as 53 (application document posted) or 51 (application document not posted).

An IDoc is one control record with many data records and a growing list of status records.
The Sign-Off Table · thesignofftable.com/academy/sap-edi-101

Following one 850 into SAP

When Great Lakes' 850 arrives, the translation is mostly a re-arrangement. The X12 envelopes are consumed by the middleware; the control record is built from the partner IDs instead. The business segments map to IDoc segments with SAP qualifiers:

X12 850ORDERS05 segmentNotes
BEG03 GLF-PO-55120E1EDK02 with qualifier 001Customer purchase order number; it lands in the sales order's customer reference
DTM*002E1EDK03 with qualifier 002Requested delivery date
N1*BY / N1*STE1EDKA1 with partner function AG / WEIDoc partner functions use SAP's internal codes: AG sold-to, WE ship-to
PO1 quantity and unitE1EDP01Item number, quantity, unit
PO1 BP part numberE1EDP19 with qualifier 001Customer's material number; qualifier 002 would carry the supplier's material number

How the main parts of Great Lakes' 850 land in an ORDERS05 IDoc.

One purchase order from Great Lakes becomes an IDoc, a sales order and, later, an 855 back to the customer.
The Sign-Off Table · thesignofftable.com/academy/sap-edi-101

Two qualifier facts from SAP's own mapping tables are worth memorizing because they show up in every EDI project: in E1EDP19, qualifier 001 carries the customer's material number and qualifier 002 the supplier's; and in E1EDKA1 the partner function is SAP's internal, German-derived code (AG, WE, RE, RG, LF) even when the user interface shows the English codes (SP, SH, BP, PY, VN).

Who owns which part of the mapping

An EDI flow crosses three owners, and a defect report is only useful if it reaches the right one. The partner owns its file and its guide. The middleware team owns the translation between the file and the IDoc: envelopes, qualifiers, code conversions such as the X12 unit of measure EA to the ISO unit code the IDoc expects, and field-by-field mapping. The SAP team owns what the IDoc does once it arrives or how it is built when it leaves: partner profiles, output determination, customer and material determination, and the application logic. When Maria finds a wrong ship-to on a sales order, the first question is where the value went wrong: in the file, in the map or in SAP's conversion tables.

SymptomLook first atOwner
Wrong value already in the raw 850The partner file and its guidePartner
Right value in the file, wrong value in the IDoc segmentThe map in the middlewareMiddleware team
Right value in the IDoc, wrong value in the sales orderSAP conversion and determination settingsSAP team

Locating a defect by comparing the file, the IDoc and the SAP document.

Key points
  • Message type = business meaning (ORDERS, ORDRSP, DESADV, INVOIC); basic type = structure version (ORDERS05, DELVRY07, INVOIC02).
  • 850 ↔ ORDERS, 855 ↔ ORDRSP, 856 ↔ DESADV, 810 ↔ INVOIC, 830 ↔ DELFOR, which SAP calls DELINS.
  • An IDoc has a control record, data records in segments, and status records with two-digit codes.
  • Qualifiers do the work in the IDoc too: E1EDP19 001 is the customer's material number, 002 the supplier's.

Check your understanding · not graded

Lesson check

  1. 1. Which SAP message type corresponds to the X12 856 ship notice?

  2. 2. Which basic type does SAP use for the ORDRSP order response in its standard outbound setup?

  3. 3. An X12 830 planning schedule arrives for a component supplier. Which SAP message type receives it?

  4. 4. In an inbound ORDERS05 IDoc, what does segment E1EDP19 with qualifier 001 carry?