Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help in mapping line levels detaisl in 856 with missing Parent-Child Hirerachy

Status
Not open for further replies.

KitShri

Programmer
Mar 24, 2021
1
0
0
IN
Hi All,

I am working on implementation using ITX-9, where we need to map Purchase Order(PO) value from HL-O loop. Challenge is that Child Segments doesnt points to their parent, and even though the Line info from HL-I is picked up correctly, however PO# from HL-O is only picked one time and copied for remaining all occurrences.

I am thinking that if somehow I am able to make array or gather value in a variable at occurance of each HL-O and print it from its respective HL-I, it should work..however there is something i am missing while writing logic. As I am quite new to ITX mapping, any help in this regard will be much appreciated.

many thanks in advance

Sample of input i am working with:

HL*1**S~ (Shipper's group)
TD1*PT94*****A*2597~
TD5*1****HOTSTAR***MMM*ZZ~
REF*BM*K93012~
REF*EQ*3239~
REF*PK*K93012~
REF*CN*3239~
HL*2**O~ (Order Loop, missing parent reference in HL03 position)
PRF*848509~ (Order Number that should be included in below lines - HL*3 & HL*5...this will be copied as PO# to HL*8, whereas it has its own PRF segment)
REF*CO*07137~
REF*OI*111~
HL*3**I~ (Item Level Loop from where current logic is triggered, missing parent reference in HL03 to HL*2 order loop)
SN1*301*8*EA*8*8*EA~
SLN*0000**I***0*CP~
HL*4**P~
CLD*1*8*PT94~
REF*LS*777888999444~
HL*5**I~ (Item Level Loop from where current logic is triggered, missing parent reference in HL03 to HL*2 order loop)
SN1*22011*2*EA*2*2*EA~
SLN*0000**I***0*CP~
HL*6**P~
CLD*1*2*PT94~
REF*LS*777888999444~
HL*7**O~ (Order Loop, missing parent reference in HL03 position)
PRF*84912~ (Order Number that should be included in below lines - HL*8)
REF*CO*071726~
REF*OI*11~
HL*8**I~(Item Level Loop from where current logic is triggered, missing parent reference in HL03 to HL*2 order loop)
SN1*1000*2*EA*2*2*EA~
SLN*0000**I***0*CP~
HL*9**P~
CLD*1*2*PT94~
REF*LS*00777888999444~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top