Skip to Content
0
Former Member
Oct 23, 2012 at 07:00 AM

Dynamic receiver determination

16 Views

Dear All,

I have a requirement where payload containing customer data is coming from SAP.

One payload may contain more then one customer data.

one customer data contains status flag

<MT_Customer>

<customer Data>

<customer name>123<customer name>

<Flag> CE</Flag>

<customer Data>

<customer name>789<customer name>

<Flag> CE</Flag>

</customer Data>

<customer Data>

<customer name>234<customer name>

<Flag> CS</Flag>

</customer Data>

<customer Data>

<customer name>345<customer name>

<Flag> VE</Flag>

</customer Data>

<customer Data>

<customer name>456<customer name>

<Flag> VS</Flag>

</customer Data>

</MT_Customer>

my requirement is :

Since here i have 4 status : CE,CS,VE,VS

based on flag value receiver should be assigned to separate business service and 4 file should get generated on FTP

Output file 1: it should be assigned to BUSSYS1

<MT_Customer>

<customer Data>

<customer name>123<customer name>

<Flag> CE</Flag>

<customer Data>

<customer name>789<customer name>

<Flag> CE</Flag>

</customer Data>

</MT_Customer>

output file 2: it should be assigned to BUSSYS2

<MT_Customer>

<customer Data>

<customer name>234<customer name>

<Flag> CS</Flag>

</customer Data>

</MT_Customer>

output file 3: it should be assigned to BUSSYS3

<MT_Customer>

<customer Data>

<customer name>345<customer name>

<Flag> VE</Flag>

</customer Data>

</MT_Customer>

output file 4: it should be assigned to BUSSYS3

<MT_Customer>

<customer Data>

<customer name>456<customer name>

<Flag> VS</Flag>

</customer Data>

</MT_Customer>

Also if more then one line item contains similar flag value those should be clubbed into one file : as see case 1 output file 1. that contains 2 line item with flag value CE

Experts please suggest me : how to go about this requirement???

Sandeep Sharma