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

SAP IDoc FlatFile to XML converter

One of our projects is to create/change hundreds of maps and switch from SAP IDoc flat files to XML files. All of the test files are in the FlatFile format, so I decided to create a converter to translate them into XML. It’s clear that this task requires some kind of a library with the IDoc documents structures description (hierarchy, records, positions, etc). I decided to use IDoc DDFs (format used by IBM/Sterling Map Editor for creating structures – you can download them from GIS/SI or just use existing GIS/SI map) and XSLT for it, and several hours later can convert my test data from FF to XML in seconds:

Just an idea.

PS I don’t have access to SAP at the moment so I cannot use it for XML Idoc generation. Also, I have appropriate I/Os for existing IDocs so it made sense to convert these existing files.

PPS it’s clear that an XML->FF converter is easier to develop – you don’t need to care about the hierarchy.

Here is my XSLT code. It doesn’t work without appropriate DDF file so if you have no idea about XSL/DDF you won’t be able to use it. It’s for those who is experienced but lazy – just like me 🙂 Continue reading

SAP IDoc qualifiers (Details)

Here are some qualifiers for the details data.

E1EDL20 (INCO1)

EXW	EX WORKS
FCA	FREE CARRIER 
FAS	FREE ALONG SHIP 
FOB	FREE ON BOARD 
CFR	COST AND FREIGHT 
CIF	COST, INSURANCE AND FREIGHT 
CPT	CARRIAGE PAID TO 
CIP	CARRIAGE AND INSURANCE PAID TO 
DAF	DELIVERED AT FRONTIER 
DES	DELIVERED EX SHIP 
DEQ	DELIVERED EX QUAY 
DDU	DELIVERED DUTY UNPAID 
DDP	DELIVERED DUTY PAID

Continue reading