After 25+ years in the EDI industry, I still have no love for this transaction. Years ago, I was learning BizTalk Server and read a book called Pro Mapping in BizTalk Server 2009 by Jim Dawson and John Wainwright. They did a fantastic job of helping me visualize how the HL Loop should work. Below is their explanation.
Visualize a freight car container, like the kind you see on a railroad car or being hauled by a Semi.
HL*1*0*S | Railroad car = Shipment |
HL*2*1*0 | The Order = Order |
HL*3*2*P | Pallet 1 inside the Railroad car = Package 1 |
HL*4*3*I | Box 1 inside Pallet 1, inside the Railroad car = Item 1 |
HL*5*3*I | Box 2 inside Pallet 1, inside the Railroad car = Item 2 |
HL*6*1*P | Pallet 2 inside the Railroad car = Package 2 |
HL*7*6*I | Box 1 inside Pallet 2, inside the Railroad car = Item 1 |
HL*8*6*I | Box 2 inside Pallet 2, inside the Railroad car = Item 2 |
The HL01 is always a sequential number
In the example above, you can see it numbers 1 through 8
The HL02 is a parent\child reference.
In the example above, you can see that this is not a sequential number but rather uses numbers to tie boxes to pallets and pallets to containers.
The HL03 is always an alpha representation of which loop you’re in.
S - Shipment
O - Order
P - Package
I – Item
Being able to visually see how the HL should worked helped me get the map configured correctly. Hope it helps you too!