Topic
3 replies Latest Post - ‏2013-12-14T05:16:42Z by prap
Kachu
Kachu
3 Posts
ACCEPTED ANSWER

Pinned topic Single Order per file

‏2013-11-16T01:18:53Z |

Hi Experts,

 

I require your help with below scenario.

 

In the edifactToXml sample provided with the WTX EDI industry pack, I want to achieve the goal of one PO/File.

The XML output generated  has the structure:

-<EDIFACT>

    +<segUNA>

    -<segUNB>

            +<segUNH1>

            +<segUNH2>

            +<segUNZ>

     -</segUNB>

</EDIFACT>

But my requirement is one PO (UNH segement per file).

1. File 1 as:

-<EDIFACT>

    +<segUNA>

    -<segUNB>

            +<segUNH1>  

            +<segUNZ>

     -</segUNB>

</EDIFACT>

 

2. File 2 as:

-<EDIFACT>

    +<segUNA>

    -<segUNB>

            +<segUNH2>

            +<segUNZ>

     -</segUNB>

</EDIFACT>

 

The output file should be generated for each occurence of the UNH segment.

 

Please help me with the approach and logic.

 

Best Regards | Kachu

  • Kachu
    Kachu
    3 Posts
    ACCEPTED ANSWER

    Re: Single Order per file

    ‏2013-11-18T08:12:10Z  in response to Kachu

    Hi Experts,

     

    Please Reply. :(

    • vijji_WTX
      vijji_WTX
      124 Posts
      ACCEPTED ANSWER

      Re: Single Order per file

      ‏2013-11-18T08:48:41Z  in response to Kachu

      You Have to use PUT function as follows

      you create output card with (1:s) range and give below rule

      =PUT ("FILE","singleOrder1.txt",singleOderGrp)

      syntax:

      PUT (adapter_alias , adapter_commands , data_to_send_to_adapter)
       

      • prap
        prap
        7 Posts
        ACCEPTED ANSWER

        Re: Single Order per file

        ‏2013-12-14T05:16:42Z  in response to vijji_WTX

        I guess, u need 2 separate output cards cards , one for generating UNB/order  with unique control numbers and another to generate a UNB/file.

        Op card1 -->  F_test1 (trasaction) separation  and then map the complete UNB to UNZ along with the filtered Transaction..This is needed as UNB should contain a new unique control number..

        Op card2 --> F_test2 (UNB ) --> and inside the functional map, you can the PUT function to generate a file/UNB.