Typical X12/EDIFACT/SAP IDoc mapping: Demand Forecast

Today I want to show how different EDI documents are used for transferring forecast information between organizations.

Demand Forecast documents are widely used between manufacturers and their suppliers. For example, a company which produces DVDs with movies needs to be supplied with a certain amount of blank DVD discs. Demand for these blanks varies depending on different parameters, such as new movies releases, holidays (like Christmas) and so on. So, to be sure their trading partner(s) which produces blank DVDs is aware of this demand, they are sending demand forecast documents on a regular basis.

Usually manufacturer knows exactly how many blanks they need today, tomorrow, this and next week, but might be not that sure about next month or next quarter. But they could forecast these amounts.

Another example is “Delivery Just In Time” process (also known JIT manufacturing/production), used (for example) in automotive industry. To reduce inventory costs, manufacturer requests its supplier to deliver a certain amount of parts/raw materials needed this particular day. So, they only have enough inventory for one day production (for example). I hope it is clear that this requires a very accurate demand forecast process.
Continue reading


Business Analysis in B2B/EDI: 2.5.3. Paths

In my spare time I’m working on a huge document/book “Business Analysis in B2B/EDI”, decided to share a small part…

  • 2.5.3. Paths
  • In the structures of different complexity, it is necessary to be able to indicate the exact path to the record/segment and/or field/element. For example, in X12 there might be DTM segments at different levels, and just “DTM” won’t be enough to understand which one is needed in many cases. So, you should know how to provide the right paths. And, different formats use different approaches.

    Since records/segments are named entities, their names are a good starting point to use. But while records in SAP IDoc are unique (i.e. you cannot have 2 records with the same name at the different levels) and you can use the name to identify its exact position, the other formats can use the same records/segments at different levels.
    Continue reading

    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

    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

            Product A, 100 KGM
            Product A, 100 KGM
            Product B, 90 KGM
            Product B, 90 KGM
            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





    SAP IDoc:

    <E1EDP17 SEGMENT="1">
    <E1EDP17 SEGMENT="1">
    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





    SAP IDoc:

    <E1EDK03 SEGMENT="1">
    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


    N9*ZZ*Header Text~



    SAP IDoc:

    <E1EDKT1 SEGMENT="1">
    	<E1EDKT2 SEGMENT="1">
    	<E1EDKT2 SEGMENT="1">
    	<E1EDKT2 SEGMENT="1">
    	<E1EDKT2 SEGMENT="1">
    	<E1EDKT2 SEGMENT="1">
    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