Inbound EDI #810 transaction sets

The input type tree myedi.mtt installs in the following directory:

install_dir\Supplychain_EDI_vn.n.n\wtx\x12\examples\ansi

The output tree file flatinvc.mtt installs in the following directory:

install_dir\Supplychain_EDI_vn.n.n\wtx\x12\examples\ansi\editoinv

The input type of the executable map is a Partner X12 Inbound Transmission. The output type is File. The functional map, MakeInvoice, maps each #810 transaction set to the output invoice. The map rule for the output component Invoice(s) references this functional map, and the input argument is an #810 transaction set from the input side.

In the functional map MakeInvoice, the output is a single output invoice, which is made up of one header record and a series of detail records. Each header record was defined, in the Type Designer, as beginning with the initiator 0, and each detail record was defined as beginning with the initiator 1.

The header record is made up of three components, each containing name information. The rule for each component takes the Name Element from the appropriate N1 segment in the #810, by using the LOOKUP function. For example, the rule for BillTo Field looks up the N1 segment where the EntityIDCd Element is BT. The rules of the three components reference three different N1 segments:

  • one for bill to
  • one for remit to
  • one for ship to

The rule for the Detail Record(s) calls another functional map, MakeItem. The input argument for this map is a LoopIT1 from the input side.

The map MakeItem maps a LoopIT1 to a Detail Record. It maps data elements from the IT1 segment and the first PID segment to the item number, quantity, and price component of the Detail Record.

That completes the mapping process. There are three maps in this example:

  • Invoices (the executable map)
  • MakeInvoice (functional map)
  • MakeItem (functional map)

To build the map, perform the following steps:

  1. Click the Build map tool.
  2. Click the Run map tool.
  3. Click Run Results .
  4. Open the edi_inv.txt file to view the input EDI file.
  5. Open the flatinv.txt file to view the output EDI file.