none
convert to flat file RRS feed

  • Question

  • Hi all,

    I have a x12 850 file please see below sample:

    PO1*1***45.56**IN*20077
    PID*F****Keurig K10 Mini Plus Black with K-Cups
    SCH*2664*EA***005*20130912*****1*1
    SCH*150*EA***005*20130910*****2*1
    PO1*2***45.56**IN*20079
    PID*F****Keurig K10 Mini Plus Red with K-cups
    SCH*2664*EA***005*20131005*****1*2
    SCH*20*EA***005*20131002*****2*2

     

    how can i convert it to flat file like:

    POITEM,20077

    SCHITEM,2664

    SCHITEM,150

    POITEM,20079

    SCHITEM,2664

    SCHITEM,20

    Please help!!!!

    Thank you

    Friday, September 20, 2013 1:09 AM

Answers

All replies

  • The X12 you have copied here is not complete, but I assume that we are talking about a complete X12 document?

    -Use the out-of-the-box EDIReceive Pipeline together with the appropriate X12 Schema to convert the document to "X12 XML".

    -Generate an internal Purchase Order Schema.

    -Create a map from the X12 XML to the Internal Order.

    -Apply the Map on the Receive Port.

    -Generate a File File Schema.

    -Create a Send Port that subscribes to all Purchase Orders

    -Create a Map that maps from the Internal Order to the Flat File Schema

    -Create a Flat file Pipeline that uses the FF Schema.

    -Apply the Pipeline and the second Map on the Send Port.

    Morten la Cour

    Friday, September 20, 2013 4:51 AM
  • Thanks you..

    The below is complete X12:

    ISA*00*          *00*          *ZZ*BTS-SENDER     *ZZ*RECEIVE-PARTNER*130902*0824*U*00401*000000475*0*T*>
    GS*PO*BTS-SENDER*RECEIVE-APP*130902*0824*475*T*00401
    ST*850*0368
    BEG*00*NE*0000027247**20130901
    CUR*BY*USD
    REF*VR
    PER*BD*KWANG*TE**EM
    TD5*O****DESTCOLL
    N1*CompanyA*92*PUR02
    N1*CompanyA.*92*PUR02
    N3*CompanyA.*PO Box 607
    N4*CompanyA*VT*05676*USA
    N1*ST*CompanyA*92*K_HGKG01DI
    N3*CompanyA.*.
    N4*Reading*MA*01867*USA
    PO1*1***45.56**IN*20077
    PID*F****Keurig K10 Mini Plus Black with K-Cups
    SCH*2664*EA***005*20130912*****1*1
    SCH*150*EA***005*20130910*****2*1
    PO1*2***45.56**IN*20079
    PID*F****Keurig K10 Mini Plus Red with K-cups
    SCH*2664*EA***005*20131005*****1*2
    SCH*20*EA***005*20131002*****2*2
    CTT*2*5498
    SE*23*0368
    GE*1*475
    IEA*1*000000475

    I use this above and convert to flat file but the result show me as below:

    POITEM,20077

    POITEM,20079

    SCHITEM,2664

    SCHITEM,150

    SCHITEM,2664

    SCHITEM,20

    But i want the result is after POITEM then it will follow it SCHITEM as well:

    POITEM,20077

    SCHITEM,2664

    SCHITEM,150

    POITEM,20079

    SCHITEM,2664

    SCHITEM,20


    • Edited by lansishao Friday, September 20, 2013 6:17 AM change
    Friday, September 20, 2013 6:00 AM
  • anyone can help me??
    Tuesday, September 24, 2013 6:40 AM
  • Hi Lanshishao,

    I would ask you to go through articles which will help you and will give you lot of insight:

    BizTalk Server: Transform Text Files (Flat Files) into XML
    Complex Flat File Conversion using BizTalk schema and Map



    I hope this helps!!!!!!

    Maheshkumar S. Tiwari|BizTalk Developer Interview Questions and Answers

    http://tech-findings.blogspot.com/


    • Marked as answer by Pengzhen Song Monday, October 7, 2013 9:48 AM
    Thursday, October 3, 2013 9:16 AM