none
Inbound 856 to Flat File Mapping RRS feed

  • Question

  • All,

    I am receiving an inbound 856 edi file and have to map it to a tab-delimited Flat File. My input structure goes like this

    ST*856*0012~

    BSN*00*197685220*20110713*121953~

    HL*1**S~

    TD1*CTN25*20****G*20*LB~

    TD5*B*2*FDEG~

    REF*BM*980313737290~

    REF*CN*980313737290~

    REF*ZZ*National Distributor~

    DTM*011*20110713~

    N1*ST*XXX US INC*92*BS1000~

    N3*XXX WAY~

    N4*XXX*IL*12345*US~

    N1*SF*WAREHOUSE*91*10110146~

    N3*13500 Indy Pkwy~

    N4*XXX*TX*78965*US~

    HL*2*1*O~

    PRF*80075264~

    HL*3*2*P~

    MAN*GM*00000530050193792707~

    HL*4*3*I~

    LIN*1*UP*635753483420*PD*GOPHONE~

    SN1*1*5*EA~

    REF*DJ*252011422~

    REF*SE*111480017710310~

    REF*SE*111480017710316~

    REF*SE*111480017710322~

    REF*SE*111480017710328~

    REF*SE*111480017710334~

    HL*5*2*P~

     

    My Flat File Structure is 

    SHP 8076514854 20110103 094100 8076514854

    ORD 84172 20101227

    ITM 000010 XXXX SCH-I500RKAVZW SCH-I500RKAVZW 3600 EA C NSCHI500CD819IVZN-10

    SLI A0000024B1CFF1 268435459611653105 07069838922000292805023682 999999 999999 DI01 58006

    SLI A0000024B1CFFB 268435459611653115 00521868049024135604195000 999999 999999 DI01 58006

    My requirement is such that, some information in the HLLoop needs to be mapped to the ITM level in my schema. However since the HLLoop is repeating node, the ITM node also gets repeated multiple time. So does my SLI. I only need my SLI to loop multiple times and ITM once. Any help.. It is really very urgent 

    Thanks

    Thursday, July 14, 2011 3:36 PM

Answers

All replies

  • conditional looping functoid and restricting ITM node to maxoccurs 1 should do the trick for you I guess.
    http://biztalkguide.blogspot.com/ Please mark as answer if this solved the issue.Thanks
    Thursday, July 14, 2011 4:00 PM
  • Amsullu, 

    What do you mean by conditional looping functoid?

    Thursday, July 14, 2011 4:05 PM
  • Hi,

    It means looping with logical funtoids(to control the output). Please refer to:

    Conditional Looping
    http://msdn.microsoft.com/en-us/library/aa561739(v=bts.70).aspx

    Thanks,


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Wednesday, July 20, 2011 9:20 AM
    Moderator
  • Hi Wen,

    Thanks for your reply. Now I have another problem. Based on a value I need to order my output schema. 

    My source would look something like this, 

     

    LIN*0001*UP*635753486537***VC*65203~

    SN1*0001*5*EA~

    REF*DJ*252012420~

    REF*SE*04055~

    REF*SE*04056~

    REF*SE*04057~

    REF*SE*04058~

    REF*SE*04059~

    HL*5*2*P~

    MAN*GM*00006073750360568167~

    HL*6*5*I~

    LIN*0001*UP*635753486537***VC*65203~

    SN1*0001*5*EA~

    REF*DJ*252012420~

    REF*SE*04050~

    REF*SE*04051~

    REF*SE*04052~

    REF*SE*04053~

    REF*SE*04054~

    HL*7*2*P~

     

     

    But my expected output needs to look something like this, 

     

    SHP 197686200 20110715 110036 06073750002152785

    ORD 80075364 20110715

    ITM 4 0000000000 635753486537 5

    SLI 04055 04055 04055 04055

    SLI 04056 04056 04056 04056

    SLI 04057 04057 04057 04057

    SLI 04058 04058 04058 04058

    SLI 04059 04059 04059 04059  

    SLI 04050 04050 04050 04050

    SLI 04051 04051 04051 04051

    SLI 04052 04052 04052 04052

     

    But the output I am getting is 

     

    SHP 197686200 20110715 110036 06073750002152785

    ORD 80075364 20110715

    ITM 4 0000000000 635753486537 5

    SLI 04055 04055 04055 04055

    SLI 04056 04056 04056 04056

    SLI 04057 04057 04057 04057

    SLI 04058 04058 04058 04058

    SLI 04059 04059 04059 04059

    ITM 6 0000000000 635753486537 5

    SLI 04050 04050 04050 04050

    SLI 04051 04051 04051 04051

    SLI 04052 04052 04052 04052

    SLI 04053 04053 04053 04053

    SLI 04054 04054 04054 04054

    I need to group it based on the value 635753486537. Can you tell me how to achieve it. If you provide me a possible working code would be really helpful. 

     

     


    Wednesday, July 20, 2011 3:12 PM
  • Hi,

    In this case, do not using looping functoid for ITM node. Instead, you can use Index functoid and specify the index value to 1 to generate only 1 ITM node.

    HTH,


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Thursday, July 21, 2011 8:21 AM
    Moderator
  • Wen,

    I need to split the same file into multiple different files based on the ITM value specified above. For example if am receiving 

    SHP 197685220 20110713 121953 980313737290

    ORD 80075264

    ITM 4 00000000 Sony 635753483420 5 EA B 321548764131

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

    ITM 5 00000000 Sony 635753483420 5 EA B 321548764131

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

    ITM 6 00000000 Sony 063575348789 5 EA B 321548764131

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

     

    If you see ITM 4 and ITM 5 have the same value 635753483420 where as the ITM 6 has different value 063575348789 

    Now I must split the file into two different files. The first file being like this, 

    SHP 197685220 20110713 121953 980313737290

    ORD 80075264

    ITM 4 00000000 Sony 635753483420 5 EA B 321548764131

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

    SLI 252011422 252011422 252011422 252011422 231871364

    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364

    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364

    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364

    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364

    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364

    The second being like this,
    SHP 197685220 20110713 121953 980313737290
    ORD 80075264
    ITM 6 00000000 Sony 635753483420 5 EA B 321548764131
    SLI 252011422 252011422 252011422 252011422 231871364
    SLI 111480017710310 111480017710310 111480017710310 111480017710310 231871364
    SLI 111480017710316 111480017710316 111480017710316 111480017710316 231871364
    SLI 111480017710322 111480017710322 111480017710322 111480017710322 231871364
    SLI 111480017710328 111480017710328 111480017710328 111480017710328 231871364
    SLI 111480017710334 111480017710334 111480017710334 111480017710334 231871364
    Can you tel me how to achieve this??

    Monday, July 25, 2011 7:34 PM
  • Greetings prav2483,

     

    were you able to Do your Biztalk Map on INBOUND 856 to FLat File? I'm in same situation and are not able to quite get it working using CONDITIONAL LOOPING Functoid.

    i have a similar situation with 856 XML ==> Positional FLAT File.

     

    can you share your map with me please? 

    Tuesday, January 31, 2012 8:36 PM
  • Hi biztank,

     I used an intermediate schema to flatten the records first and then mapped it to my destination schema. This solved my problem. 

    Post what issues you are facing exactly, if i can help you will surely do. 

     

    Thanks,

     

    Tuesday, January 31, 2012 8:58 PM
  • Hi biztank,

    What are all the functoids i can use in this  Map specification. Else send the XSL code. th

    anxs in Advance.

    Designation Schema

    Inbound X12 856 ASN

    Header

    For every HL Detail Loop

    load

    BSN02

    system

    "RSS"

    transaction

    "ADDLV"

    supplier_num

    N104 where N101 = "SU"

    order_num

    PRF01 from HL Loop when HL03 = "O"

    sup_paper

    LIN02 from HL Loop when HL03 = "I"

    width_uom

    MEA04 when MEA02 = "WD" and HL03 = "D"

    width

    MEA03 when MEA02 = "WD" and HL03 = "D"

    rolls_div

    Count of HL Loops where HL03 = "D"

    weight_div

    Total of MEA03 when MEA02 = "G" and HL03 = "D"

    length_div

    Total of MEA03 when MEA02 = "LN" and HL03 = "D"

    docket

    BSN02

    wagon

    If TD301 = RR Then "RL:" + TD302 + TD303     Else "TR:" + TD302 + TD303

    diam_uom

    MEA04 when MEA02 = "DI" and HL03 = "D"

    diameter

    MEA03 when MEA02 = "DI" and HL03 = "D"

    Order

     

    load

    BSN02

    system

    "RSS"

    transaction

    "ADRCV"

    plant_num

    3 characters after "KCC" of N104 where N101 = "ST"

    supplier_num

    N104 where N101 = "SU"

    order_num

    PRF01 from HL Loop when HL03 = "O"

    sup_paper

    LIN02 from HL Loop when HL03 = "I"

    width_uom

    MEA04 when MEA02 = "WD" and HL03 = "D"

    width

    MEA03 when MEA02 = "WD" and HL03 = "D"

    sup_roll_id

    LIN03 when LIN02 = "RO" and HL03 = "D"

    weight_rcv

    MEA03 when MEA02 = "G" and HL03 = "D"

    length_dlv

    MEA03 when MEA02 = "LN" and HL03 = "D"

    docket

    BSN02

    wagon

    If TD301 = RR Then "RL:" + TD302 + TD303          Else "TR:" + TD302 + TD303

    diam_uom

    MEA04 when MEA02 = "DI" and HL03 = "D"

    diam

    MEA03 when MEA02 = "DI" and HL03 = "D"

    Thanks,

     murugan

    Monday, December 10, 2012 9:01 AM
  • Hi prav2483,

    Biztalk Map on INBOUND 856 to FLat File? Can you share yoour map with me please. Client want xsl coding mapping can you guide me. 

    i have a similar situation with 856 XML ==> Positional FLAT File.

    Thanxs in advance. send ur mail id.

    Thursday, December 13, 2012 9:56 AM