cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting Files Before being send to Receiver (IDOC to File) FTP Scenario

Former Member
0 Kudos

Hi Experts ,

I have a requirement where  PI Needs to Sort  the Records on Position 1 to 24  ie (Target Message Before Sending it to Receiver System) .

Here my scenario is IDOC To File (using FTP ) .

The Target Structure looks like this

<Main Record>

     <Header Record>

        Item 1

        Item 2

   </Header Record>

   <Record_Address>

       Plant

        Item

   </Record_Address>

   <Record_Sequence>

       Customer_Route

        Customer_LSequence

   </Record_Sequence>

as this i the first time i am trying out the Sorting for Target Message  from 1 to 24 Position before sending it to the Receiver . 

Any helpful suggestions  would help me achieve the above logic .,

Regards,

Aziz khan

Accepted Solutions (0)

Answers (3)

Answers (3)

ambrish_mishra
Active Contributor
0 Kudos

Hi Aziz,

please elaborate on the requirement. Which field you need sorting for ? I did not understand <Sort  the Records on Position 1 to 24>

better to share the sample target file and target data type.

Ambrish

iaki_vila
Active Contributor
0 Kudos

Hi Ariz,

All depends about the complexity of the source or target structure. You should avoid a complex method or algorithm to sort. If it's possible to use a standard function in message mapping like sort and to be very careful with the context dependences. If every record is in the same context it will be easier to sort instead of a multiple structures with a key field to relation between them. If the message mapping sorting appears complex may be you should consider XSL or Java Mapping-

If you put two concrete examples (source and target), it would be easier to think the best way to do it.

Regards.

former_member184681
Active Contributor
0 Kudos

Hi Aziz Khan,

Normally for scenarios where I need sorting, I apply two Message Mappings in my Operation Mapping. In the first MM, I only manipulate the source message to achieve the required sorting. In the other MM, I develop the mapping from sender to receiver structure. This approach should work for your scenario, too

Regards,

Greg