Typical X12/EDIFACT/SAP IDoc mapping: transportation stages in logistics EDI

(Disclaimer 🙂 I’ve been working with logistics documents (Ocean and Road primarily, plus some Rail and Air) a lot recently, but I see them from the EDI prospective and might not fully understand business behind them. So I probably not always use the right terms, or misunderstand some details. This technical article is more about the structures used to describe transportation stages and related data.)

Another complex EDI case, related to the logistics EDI documents, is how different formats describe transportation stages (legs, conveyances, …). There are 2 main ways of describing transportation legs: stages and stops. For example, we need to move cargo from point A to point D, with points B and C in between.

A -> B -> C -> D

In case of Ocean Logistics it might be:

  • A-B, pre-carriage (warehouse to loading port)
  • B-C, main-carriage (loading to unloading ports)
  • C-D, on-carriage (unloading port to delivery destination)

In case of Motor it might be A as the loading point (warehouse) and B, C and D as Ship To store locations.

So, we could describe this route (A->D) as a set of stops (A, B, C and D) or as a set of legs (stages, conveyances, …) (AB, BC and CD). As we’ll see, different formats use one of these approaches.

Of course, for very simple cases, when we are interested in the first and last points only, we can always use Ship From and Ship To locations (N1 in X12, NAD in EDIFACT and something like E1EDKA1 in SAP Idoc (depends on the document)). It is typical for Orders or ASNs. But when it comes to Logistics, especially complex scenarios (like Ocean) and such things as Booking Request/Response, Shipping Instructions or Load Tender Motor documents, we need to know much more details – locations, requested/estimated/scheduled/actual dates of departure/arrival, carriers and sub-carriers, information about consignments/products loaded/unloaded in different points and so on. And logistic-specific documents contain structures for them.
Continue reading

Advertisements

Typical X12/EDIFACT/SAP IDoc mapping: ASN (Ship Notice) and Packaging structures

One of the most complex things you can encounter working on the maps is the mapping of hierarchical (nested) packages/products in ASNs (Ship Notices). Things like partners, dates or references usually are straight-forward and in a lot of cases you can use simple direct connections. But different formats use different approaches when it comes to hierarchical (nested) structures.

So, let me show you how X12, EDIFACT and IDocs describe this: one container C1 with 5 pallets, 2 pallets (P1 and P2) are for Product A, 2 pallets (P3 and P4) are for Product B and 1 pallet (P5) is a mixed load with Product A and Product C

C1
    P1
        Product A, 100 KGM
    P2
        Product A, 100 KGM
    P3
        Product B, 90 KGM
    P4
        Product B, 90 KGM
    P5
        Product A, 20 KGM
        Product C, 90 KGM


Continue reading

Typical X12/EDIFACT/SAP IDoc mapping: Delivery Terms

Delivery Terms – FOB in X12, TOD + LOC(s) in EDIFACT and E1EDK17 in ORDERS05 IDoc

Examples:
X12:

FOB*PP****EXW*DL*DELIVERY LOCATION NAME~

EDIFACT:

TOD+++EXW'
LOC+1+DELIVERY LOCATION NAME'
LOC+28+NL'

SAP IDoc:

<E1EDP17 SEGMENT="1">
	<QUALF>001</QUALF>
	<LKOND>EXW</LKOND>
</E1EDP17>
<E1EDP17 SEGMENT="1">
	<QUALF>002</QUALF>
	<LKTEXT>DELIVERY LOCATION NAME</LKTEXT>
</E1EDP17>
Entity X12 (4010) EDIFACT (D96A) SAP IDoc (ORDERS05)
Delivery Terms FOB group TOD segment E1EDK17 records
  Delivery Terms Code (INCO) FOB-05 (335), Transportation Terms Code TOD-03C01 (4053), Terms of delivery or transport, coded E1EDK17 / LKOND, Delivery condition code. E1EDK17 / QUALF = 001 (Incoterms part 1)
  Location Type FOB-06 (309) Location Qualifier
—-
DL = Delivery Location
LOC-01 (3227), Place/location qualifier
—-
1 = Delivery
28 = Destination Country
  Location FOB-07 (352) Description LOC-02C01 (3225), Place/location identification E1EDK17 / LKTEXT, Delivery condition code. E1EDK17 / QUALF = 002 (Incoterms part 2)

Some INCO Terms:
——————–
CFR = Cost and Freight
CIF = Cost, Insurance, and Freight
CIP = Carriage and Insurance Paid To
COL = Buyer pays
CPT = Carriage Paid To
CPU = Pickup
DAF = Delivered at Frontier
DAP = Delivered at place
DAT = Delivered at Terminal
DDP = Delivered Duty Paid
DDU = Deliver Duty Unpaid
DEQ = Delivered Ex Quay
DES = Delivered Ex Ship
EXW = Ex Works
FAS = Free Alongside Ship
FCA = Free Carrier
FOB = Free on Board
PPA = Seller prepays
PPD = Prepaid and delivered

Gennady Kim

Typical X12/EDIFACT/SAP IDoc mapping: Date/Time

Free-Form Text – DTM in X12, DTM in EDIFACT and E1EDK03 (or E1EDP03) in ORDERS05 IDoc

Examples:
X12:

DTM*002*20141210~

EDIFACT:

DTM+2:20141210220000:204'

SAP IDoc:

<E1EDK03 SEGMENT="1">
	<IDDAT>002</IDDAT>
	<DATUM>20141210</DATUM>
	<UZEIT>220000</UZEIT>
</E1EDK03>
Entity X12 (4010) EDIFACT (D96A) SAP IDoc (ORDERS05)
Date/Time DTM segment DTM segment E1EDK03 record
  Type DTM-01 (374), Date/Time qualifier DTM-01C01 (2005), Date/time/period qualifier E1EDK03 / IDDAT, Qualifier for IDOC date segment
  Date DTM-02 (373), Date DTM-01C02 (2380), Date/time/period. Both date and time might be included into this sub-element. The format depends on DTM-01C03 (2379) E1EDK03 / DATUM, Date
  Time DTM-03 (337), Time DTM-01C02 (2380), Date/time/period. Both date and time might be included into this sub-element. The format depends on DTM-01C03 (2379) E1EDK03 / UZEIT, Time

Gennady Kim

Typical X12/EDIFACT/SAP IDoc mapping: Free-Form Text

Free-Form Text – N9+MSG in X12, FTX in EDIFACT and E1EDKT1+E1EDKT2 (or E1EDPT1+E1EDPT2) in ORDERS05 IDoc

Examples:
X12:

N9*ZZ*Header Text~
MSG*TEXT LINE1~
MSG*TEXT LINE2~
MSG*TEXT LINE3~
MSG*TEXT LINE4~

EDIFACT:

FTX+ZZZ+++TEXT LINE1:TEXT LINE2:TEXT LINE3:TEXT LINE4:TEXT LINE5'

SAP IDoc:

<E1EDKT1 SEGMENT="1">
	<TDID>001</TDID>
	<E1EDKT2 SEGMENT="1">
		<TDLINE>TEXT LINE1</TDLINE>
	</E1EDKT2>
	<E1EDKT2 SEGMENT="1">
		<TDLINE>TEXT LINE2</TDLINE>
	</E1EDKT2>
	<E1EDKT2 SEGMENT="1">
		<TDLINE>TEXT LINE3</TDLINE>
	</E1EDKT2>
	<E1EDKT2 SEGMENT="1">
		<TDLINE>TEXT LINE4</TDLINE>
	</E1EDKT2>
	<E1EDKT2 SEGMENT="1">
		<TDLINE>TEXT LINE5</TDLINE>
	</E1EDKT2>
</E1EDKT1>
Entity X12 (4010) EDIFACT (D96A) SAP IDoc (ORDERS05)
Free-Form Text N9 group FTX segment E1EDKT1+E1EDKT2 records
  Type N9-01 (128), Reference Ident Qual FTX-01 (4451), Text subj qualifier E1EDKT1 / TDID, Text ID
  Text MSG-01 (933), Free-form Message Text FTX-04C01, 04C02, 04C03, 04C04 and 04C01 (C108 / 4440), Free Text E1EDKT2 / TDLINE, Text line

Gennady Kim

Typical X12/EDIFACT/SAP IDoc mapping: Reference Information

Reference Information – REF in X12, RFF (+DTM) in EDIFACT and E1EDK02 in ORDERS05 IDoc

Entity X12 (4010) EDIFACT (D96A) SAP IDoc (ORDERS05)
Reference Information REF segment RFF group E1EDK02 record
  Type REF-01 (128), Reference Ident Qual RFF-01C01 (C506 / 1153), Reference qualifier E1EDK02 / QUALF, IDOC qualifier reference document
  Reference value REF-02 (127), Reference Ident RFF-01C02 (C506 / 1154), Reference number E1EDK02 / BELNR, IDOC document number
  Item Number RFF-01C03 (C506 / 1156), Line number E1EDK02 / POSNR, Item number
  Reference Date DTM segment in RFF group E1EDK02 / DATUM, IDOC: Date
E1EDK02 / UZEIT, IDOC: Time

Gennady Kim

Typical X12/EDIFACT/SAP IDoc mapping: Partners

I’m going to share information about some typical relationships between X12, EDIFACT and SAP IDoc. As always, it’s just to give you an idea. Let start with Partners – N1 group in X12, NAD in EDIFACT and E1EDKA1 in ORDERS05 IDoc

Entity X12 (4010) EDIFACT (D96A) SAP IDoc (ORDERS05)
Trading Partner N1 group NAD group E1EDKA1 record
  Type N1-01 (98), Entity ID Code
——
BY = Buyer, SE = Seller, ST = ShipTo, SF = ShipFrom, etc
NAD-01 (3035), Party qualifier
——
BY = Buyer, SE = Seller, ST = ShipTo, SF = ShipFrom, etc
E1EDKA1 / PARVW, Partner function
——
AG = Buyer, LF = Seller, WE = ShipTo, etc
  Name N1-02 (93), Name NAD-04C01 (C080 / 3036), Party Name E1EDKA1 / NAME1
  Additional Name N2-01 (93), Name
N2-02 (93), Name
NAD-04C02, 04C03, 04C04 and 04C05 (C080 / 3036), Party Name E1EDKA1 / NAME2
E1EDKA1 / NAME3
E1EDKA1 / NAME4
  Partner ID Type N1-03 (66), ID Code Qualifier
——
1 = DUNS, 91 = Assigned by Seller, 92 = Assigned by Buyer, etc
NAD-02C03 (C082 / 3055), Code list resp agency
——
16 = DUNS, 91 = Assigned by Seller, 92 = Assigned by Buyer, etc
  Partner ID N1-04 (67), ID Code NAD-02C01 (C082 / 3039), Party id. ID E1EDKA1 / PARTN, Partner number
-or-
E1EDKA1 / LIFNR, Vendor number at customer location
  Address Line N3-01 (166), Address Information
N3-02 (166), Address Information
NAD-05C01, 05C02, 05C03 and 05C04 (C059 / 3042), Street and num/po box E1EDKA1 / STRAS, Street and house number 1
E1EDKA1 / STRS2, Street and house number 2
  City N4-01 (19), City Name NAD-06 (3164), City name E1EDKA1 / ORT01, City
  State/Province N4-02 (156), State or Province Code NAD-07 (3229), Country sub entity ID E1EDKA1 / REGIO, Region
  Postal Code N4-03 (116), Postal Code NAD-08 (3251), Postcode ID E1EDKA1 / PSTLZ, Postal code
E1EDKA1 / PSTL2 (P.O. Box postal code)
  Country N4-04 (26), Country Code NAD-09 (3207), Country, coded E1EDKA1 / LAND1, Country Key
  Contact PER segment CTA segment
    Contact Type PER-01 (366), Contact Funct Code
——
IC = Information contact, etc
CTA-01 (3139), Cont funct coded
——
PD = Buyer Name or Department (Purchasing contact), etc
    Contact Name PER-02 (93), Name CTA-02C02 (C056 / 3412), Department or employee E1EDKA1 / BNAME
    Phone PER-04, 06 or 08 (364), Comm Number
where appropriate PER-03, 05 or 07 (365), Comm Number Qualifier = TE (Telephone)
COM-01C01 (C076 / 3148), Comm number
where appropriate COM-01C02 (C076 / 3155), Comm chan qualifier = TE (Telephone)
E1EDKA1 / TELF1, 1st telephone number of contact person
E1EDKA1 / TELF2, 2nd telephone number of contact person
    Fax PER-04, 06 or 08 (364), Comm Number
where appropriate PER-03, 05 or 07 (365), Comm Number Qualifier = FX (Fax)
COM-01C01 (C076 / 3148), Comm number
where appropriate COM-01C02 (C076 / 3155), Comm chan qualifier = FX (Fax)
E1EDKA1 / TELFX, Fax number
    Email PER-04, 06 or 08 (364), Comm Number
where appropriate PER-03, 05 or 07 (365), Comm Number Qualifier = EM (Email)
COM-01C01 (C076 / 3148), Comm number
where appropriate COM-01C02 (C076 / 3155), Comm chan qualifier = EM (Email)

Gennady Kim