cancel
Showing results for 
Search instead for 
Did you mean: 

Reciever File Adapter to create multiple target files

Former Member
0 Kudos

Hi All,

I have done the mapping to create multiple output messages . I would like each of the messages to be stored as a separate file in the target .

Below is the output message with 2 separate MT_CANCELOUT messages . However, both end up in one single xml file .

How do I configure the receiver file adapter to ouput 2 separate xml files ?

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">

<LineItem>

<id>456</id>

<name>HEY</name>

</LineItem>

</ns1:MT_CANCELOUT>

<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">

<LineItem>

<id>567</id>

<name>RAT</name>

</LineItem>

</ns1:MT_CANCELOUT>

</ns0:Message1>

</ns0:Messages>

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Michel,

I am also having the same requirement. In my scenario, i have to deliver a multiple file based on the input database values and i have to update the SAP system with the message. So i have used multimapping. One message is to create a file and other message is to create a input for SAP system.

Now my problem is i dont know how many files i need to generate in the output. If i get the 5 input values then i have to generate 5 output messages. then FILE adapter easily generate file for each input. How to do in message mapping. please give some guidness to do this.

Regards,

Ramalakshmi.G

RafaelVieira
Active Participant
0 Kudos

Did u get this question answered?

Could you share the information with us?

Tks.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

There are many ways to create multiple target files. Are you using BPM? or without BPm?

Example: Refer this link

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/600b455f-01cd-2b10-0cab-a50e47a8f...

Former Member
0 Kudos

Thanks for the responses.

Raj, I tried changing the file construction mode to "Create", "AddTimestamp" and "Addcounter" , but it still outputs only one file .

I have done it without BPM , using multimapping . So there is no problem with the mapping. I am getting 2 separate messages (as shown in my previous post) .

Problem is how to configure Receiver File Adapter to output separate files , one for each message.

Former Member
0 Kudos

Hi,

Sorry to say you that but your post show the opposite, it shows you have only one target message !

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>______<<<<<<<

<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">

<LineItem>

<id>456</id>

<name>HEY</name>

</LineItem>

</ns1:MT_CANCELOUT>

<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">

<LineItem>

<id>567</id>

<name>RAT</name>

</LineItem>

</ns1:MT_CANCELOUT>

</ns0:Message1>______<<<<<<<

</ns0:Messages>

If you want two files, you should generate two Messages, and so to do that:

In MM, in your target (tab before "function"), you should have 1 source MT and in target MT, you should have two lines (even if you use the same target MT), after having changed the ouccurence 1->N.

do the same in your operation mapping: 1->N with two receiver service interface (even if it's the same)

because you should have something like:

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">

<LineItem>

<id>456</id>

<name>HEY</name>

</LineItem>

</ns1:MT_CANCELOUT>

</ns0:Message1> _____<<<<<<<

<ns0:Message2> _____<<<<<<<

<ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">

<LineItem>

<id>567</id>

<name>RAT</name>

</LineItem>

</ns1:MT_CANCELOUT>

</ns0:Message2>

</ns0:Messages>

regards

mickael

Edited by: Mickael Huchet on Dec 2, 2011 8:58 PM

rajasekhar_reddy14
Active Contributor
0 Kudos

execute your scenario end to end then check in moni inbound payload how many messages generated.

I hope you had used multi mapping concept in mapping to generate multiple messages(by changing the occurrence to 0 to unbounded).

Receiver channel enable add time stamp option, so that you can differentiate files easily.

Regards,

Raj