X12 850 TO ORDERS
https://edigkim.wordpress.com/2018/10/22/typical-x12-edifact-sap-idoc-mapping-purchase-order/
https://cdn.cdata.com/help/AZH/mft/EDI850-CSV.html
SAMPLE INPUT PAYLOAD AND UNDERSTANDING.
Typical X12/EDIFACT/SAP IDoc mapping: Purchase Order
Here is a typical mapping between Purchase Order business documents in different formats – X12 850, EDIFACT ORDERS and SAP IDoc ORDERS05.
As always, it is just an idea, and you implementation might be different. But in the most cases the core logic will follow this idea.
Please also use this to find more detailed information about typical mapping for References, Dates, Partners, FreeText and other.
Entity | X12 850 | EDIFACT ORDERS | SAP IDoc ORDERS05 |
Envelopes | |||
Envelope’s segments/structures | ISA, GS and ST | UNB | EDI_DC40 |
Transaction ID – a unique ID of this transaction | ST-02 | UNB-0020 | EDI_DC40/DOCNUM |
Transaction Date/Time | ISA-09 (date in YYMMDD format) and ISA-10 (time in HHmm format) | UNB-S004-0017 (date) and UNB-S004-0019 (time) | EDI_DC40/CREDAT (date in CCYYMMDD format) and EDI_DC40/CRETIM (time) |
Sender ID | ISA-06 and/or GS-02 | UNB-S002 | EDI_DC40/SNDPRN and/or EDI_DC40/SNDLAD |
Receiver ID | ISA-08 and/or GS-03 | UNB-S003 | EDI_DC40/RCVPRN and/or EDI_DC40/RCVLAD |
Header | |||
PO Number | BEG-03 | BGM-1004 | E1EDK02 / BELNR where QUALF = “001” (Customer Purchase Order) |
PO Date | BEG-05 | DTM-2380 where DTM-2005 = “137” (Document Date) | E1EDK03 / DATUM where IDDAT = “022” (Purchase order date), or E1EDK02 / DATUM where QUALF = “001” (Customer Purchase Order), or EDI_DC40 / CREDAT |
Currency. Usually ISO 4217 code. | CUR segment, CUR-02 | CUX segment, CUX-6345 | E1EDK01 / CURCY |
References (more details). References might be used under header, details or both. | REF segment | RFF group (RFF + DTM) | E1EDK02 record |
Dates (more details). Dates might be used under header, details or both. | DTM segment. Typical date used in Purchase Order is Requested Delivery Date (“002”) | DTM segment. Typical date used in Purchase Order is Requested Delivery Date (“2”) | E1EDK03 record. Typical date used in Purchase Order is Requested Delivery Date (“002” Requested delivery date (customer)) |
Shipment Terms (more details) | FOB segment, where FOD-04 = “01” (Incoterms); FOB-05 (INCO); FOB-03 might be used for Location; | TOD group; TOD-03C01 (4053), Terms of delivery or transport, coded (INCO); LOC-01 (3227), Place/location qualifier | E1EDK17 records (001 and 002); E1EDK17 / LKOND where QUALF = 001 (Incoterms part 1), Delivery condition code; E1EDK17 / LKTEXT where QUALF = 002 (Incoterms part 2), Delivery condition code. |
Shipment Method of Payment | FOB segment; FOB-01 element (Shipment Method of Payment). Usually PP (Prepaid) or CC (Collect) | These formats do not have a dedicated place for Method of Payment. Sometimes INCO Terms values are used to understand if it’s Collect or Prepaid | |
Terms of Sale | ITD segment; ITD-03 (Terms Discount Percent); ITD-04 (Terms Discount Due Date); ITD-05 (Terms Discount Days Due); ITD-08 (Terms Discount Amount); ITD-12 (Description) | PAT group; PAT + DTM segments; PAT-4276 (Terms of payment); DTM-2380 where DTM-2005 = “138” (Payment date); | E2EDK18 record (Document Header Terms of Payment) where QUALF = “001” (Payment term 1); E2EDK18 / PRZNT (percentage for terms of payment); E2EDK18 / TAGE (Number of days); E2EDK18 / ZTERM_TXT (Text line); |
Free Text, Instructions (more details). Free Text might be used under header, details or both. | N9 group (N9 and MSG) | FTX | E1EDKT1 group (E1EDKT1 + one or more E1EDKT2s) |
Partners (more details). Partners (especially Ship From and/or Ship To) might be used under header, details or both. | N1 group, N1, N2, N3 and N4 segments | NAD group | E1EDKA1 record |
Details | |||
Product Data | PO1 group | LIN group | E1EDP01 group |
Purchase Order LineItem Number. This might be very important data and it is more than just the position of product in PO. Often other documents (such as PO Response/Change, Invoice, ASN) use this data for the reference purpose. | PO1-01, Assigned Identification | LIN-1082, Line item number | E1EDP01 / POSEX, Purchase Order LineItem Number |
Product Quantity and UoM | PO1-02, PO1-03 | QTY segment where QTY-6063 = “21” (Ordered quantity); QTY-6060 and QTY-6411 | E1EDP01 / MENGE, E1EDP01 / MENEE |
Price | PO1-04. In some cases CTP segment might be used (for example, to indicate the price basis) | PRI segment, PRI-5118 (price), PRI-5284 (Price Basis), PRI-6411 (Price Basis UoM) | E1EDP01 / VPREI (price), E1EDP01 / PEINH (Price Basis), E1EDP01 / PMENE (Price Basis UoM) |
Product Identifier(s) | PO1-06/07, PO1-08/09, …, PO1-24/25 (type/ID) pairs | LIN-7140/7143 or PIA-7140/7143 (type/ID) pairs | E1EDP19 / IDTNR where QUALF might be one of (but not limited by) “001” (Buyer product ID), “002” (Seller Product ID) |
References (more details). References might be used under header, details or both. | REF segment | RFF group (RFF + DTM) | E1EDP02 record |
Dates (more details). Dates might be used under header, details or both. | DTM segment. Typical date used in Purchase Order is Requested Delivery Date (“002”). In some cases, SCH group might be used to indicate different quantities/dates. | DTM segment. Typical date used in Purchase Order is Requested Delivery Date (“2”) | E1EDP03 record. Typical date used in Purchase Order is Requested Delivery Date (“002” Requested delivery date (customer)). In some cases, E1EDP20 might be used to indicate different quantities/dates. |
Free Text, Instructions (more details). Free Text might be used under header, details or both. | N9 group (N9 and MSG) | FTX | E1EDPT1 group (E1EDPT1 + one or more E1EDPT2s) |