(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.
Let’s use this example – there are 3 stages (4 stops):
- A, Loading point for Product A, 01 Jun 2017
- B, Loading point for Product B, 02 Jun 2017
- C, Unloading point for Product A, 20 Jun 2017
- D, Unloading point for Product B, 22 Jun 2017
SAP IDoc (SHPMNT)
Let’s start with SAP IDoc, SHPMNT05. It uses stages, not stops – i.e. three (AB, BC and CD) legs for our example. E1EDK33 (Shipment Stage) group is used to describe them
E1EDT10 QUALF (002 pickup) NTANF E1EDT10 QUALF (005 delivery) NTANF E1EDK33 (Shipment Stage) TSNUM TSRFO VSART << type E1EDT44 (Shipment stages point) QUALI (Qualifier for stage point, 001 for Origin, 002 for Destination) E1ADRM6 (Address) NAME1 E1ADRM7 PARTNER_Q (SP = Carrier) E1EDT45 (Date (shipment stage)) QUALF (005 delivery) NTEND << delivery E1EDT01 (Shipment Item Assignment) VBELN (Delivery #)
For our case, there will be the following structure (it depends on implementation, but you should expect something similar):
E1EDT10 QUALF = 002 NTANF = 20170601 E1EDT10 QUALF = 005 NTANF = 20170622 E1EDK33 <<< leg AB TSRFO = 0001 E1EDT44 QUALI = 001 E1ADRM6 NAME1 = A E1EDT44 QUALI = 002 E1ADRM6 NAME1 = B E1EDT45 QUALF = 005 NTEND = 20170602 E1EDK33 <<< leg BC TSRFO = 0002 E1EDT44 QUALI = 001 E1ADRM6 NAME1 = B E1EDT44 QUALI = 002 E1ADRM6 NAME1 = C E1EDT45 QUALF = 005 NTEND = 20170620 E1EDK33 <<< leg CD TSRFO = 0003 E1EDT44 QUALI = 001 E1ADRM6 NAME1 = C E1EDT44 QUALI = 002 E1ADRM6 NAME1 = D E1EDT45 QUALF = 005 NTEND = 20170622
I hope it is clear – every leg (AB, BC and CD) creates a separate E1EDK33 group. E1EDT44s are used to describe “points” (stops). E1EDT44 with QUALI of 001 describes start point of this leg, and E1EDT44 with QUALI of 002 – end.
There are some other important records under these E1EDK33s, which are out of scope of this article. But I want to mention them due to their importance:
- E1ADRM7 (PARTNER_Q = SP) is used for the Carrier which is responsible for this stage.
- E1EDT01(s) is used to connect this stage and delivery(ies) on this stage. Deliveries – E1EDL20(s). If Product A belongs to delivery DA, and Product B belongs to delivery DB, then
E1EDK33 (A to B) E1EDT01 VBELN = DA <<< Delivery DA appears on this leg - it was loaded on stop A E1EDK33 (B to C) E1EDT01 VBELN = DA <<< Last stage for Delivery DA - it was unloaded on stop C E1EDT01 VBELN = DB <<< Delivery DB appears on this leg - it was loaded on stop B E1EDK33 (C to D) E1EDT01 VBELN = DB <<< Last stage for Delivery DA - it was unloaded on stop D
There are many logistics messages in EDIFACT which use transportation stages, including IFTMBF (booking request), IFTMBC (booking response) and IFTMIN (instructions). All of them use the same structure – TDT group. Similar to IDoc, EDIFACT uses stages – not stops.
TDT <<< Details of transport TDT-01 (stage type) TDT-03 (transportation mode) TDT-04 (transportation means) TDT-05 (carrier) DTM (133) <<< Departure date, estimated DTM (132) <<< Arrival date, estimated LOC (9) <<< Place of loading LOC (11) <<< Place of discharge
TDT-01 might be 10 (pre-carriage), 20 (main-carriage) or 30 (on-carriage) for Ocean logistics; 1, 12 or 20 for inland and so on. Dates (DTM) might use 2 (Delivery date, requested), 10 (Shipment date, requested), 133 (Departure date, estimated), 132 (Arrival date, estimated) and others. Locations (LOC) might be 9 (Place of loading), 11 (Place of discharge) and others.
For our case it might be (depends on implementation, but something like this):
TDT DTM+133:20170601 DTM+132:20170602 LOC+9+A LOC+11+B TDT DTM+133:20170602 DTM+132:20170620 LOC+9+B LOC+11+C TDT DTM+133:20170620 DTM+132:20170622 LOC+9+C LOC+11+D
X12 uses different sets of documents depending on the means of transport. 2xx (204 for Load Tender Motor, 214 for Shipment Status) for Road, 3xx (300 for Booking Request, 301 for Booking Confirmation, 304 for Instructions and 315 for Shipment Status) for Ocean and 4xx (404 for Rail Carrier Shipment Information) for Rail. X12 uses stops/points, not legs. And since different documents use different groups/segments for transportation stages, we’ll review Road (204 Load Tender Motor) and Ocean (300 Ocean Booking Request) separately.
X12 204 Motor Carrier Load Tender
S5 <<< Stop Off Details G62 <<< DateTime N1 Group <<< Partner data
As I mentioned above, the X12 uses stops, so every S5 represents some point on the route. S5-01 (Stop Sequence number) is used to indicate the number of the stop in sequence (1, 2, 3, …). S5-02 (Stop Reason code) is used to indicate the nature of stop – typical values are PL (Partial Load), CL (Complete Load), PU (Partial Unload) and CU (Complete Unload). G62 is used for dates, for example 68 (Requested Delivery Date) and 69 (Scheduled Pick-Up Date). N1 is used for location, and typically they are either SF (Ship From) or ST (Ship To) locations. Our example might be represented by something like this:
S5*1*PL~ G62*69*20170601~ N1*SF*A~ S5*2*CL~ G62*68*20170602~ N1*SF*B~ S5*3*PU~ G62*68*20170620~ N1*ST*C~ S5*4*CU~ G62*68*20170622~ N1*ST*D~
As you can see, A is Partial Load point, B is Complete Load, C is Partial Unload and D is Complete Unload.
Here I want to step aside and tell a funny story from one of the projects I was working on. A client had been using X12 204 Motor Load Tender for a long time when I found that they use the reverse order of S5s – i.e. the first stop in their 204 was CU (Complete Unloading) and the last – CL (Complete Loading). I was about to “fix” it, but decided to ask. It turned out that a 3PL company they worked with used these 204 as the loading instructions – which pallets should be loaded first in truck and which – last. I.e. pallets which should be dropped off last should go into truck first (LIFO, last-in-first-out queue). So they asked to be sending S5s this way 🙂
X12 300 Reservation (Booking Request) (Ocean)
R4 <<< Port or Terminal DTM <<< DateTime
Ocean logistics document use similar approach. R4 represents stops, and includes the type (L for Port of Loading, D for Port of Discharge, T for Transshipment port and so on). Also it includes location names/codes and other information. DTM is used for dates – and in Booking Request they often send delivery dates (for example, 071 is for Requested for Delivery (After and Including)), and Carrier/Forwarder sends Pickup/Cut Off/… dates back. So, it might be like this:
R4*L*ZZ*A~ R4*L*ZZ*B~ R4*D*ZZ*C~ DTM*071*20170620~ R4*D*ZZ*D~ DTM*071*20170622~
As always, it is an idea to help you to read and understand the EDI data 🙂