cancel
Showing results for 
Search instead for 
Did you mean: 

Merging two files in File to File

Former Member
0 Kudos

Hi all,

I have file to file scenerio like this,

I will get multiple Source files with names XXXXddmmyyABCD

where XXXX can be same or may change.

Now i need to merge source files with same XXXX and create one Target file.

so for example if i have two files with name X101010682ABCD and two files with X102100688EFGH,

I need to form one merged file for first set of files with XXXX as X101 and one merged file for next set of XXXX as X102.

Thanks in advance.......

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

You would need a BPM with correlation and multiple receive steps inside a FORK.

BPM.

FORK with "N" branches to receive the N files. Each fork will contain a RECEIVE STEP with correlation.

Then you will have n:1 mapping where you will cominbe the N files into single file and send step to send the data to the target file.

http://help.sap.com/saphelp_nw04/helpdata/en/0e/56373f7853494fe10000000a114084/content.htm

note:reward points if solution found helpfull.....

regards

chandrakanth.k

Former Member
0 Kudos

I dont want to use BPM for this ( client not intrested in BPM).

Is there any other way.

Former Member
0 Kudos

Hi Dinesh,

it is not possible without BPM.

Regards Mario

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Dinesh

You can use a receive step in a loop to receive multi messages that come one after the other, or you can also define a correlation to receive multi messages you want to map together(ie. map the messages that have the same purchase order number).

Afterwards define a transformation step to define a mapping of those. You need to use a message mapping that defines a n:1 mapping; you can set the number of messages to be mapped in the "Messages" tab of the message mapping. Then map the fields as you like and use it in your transformation step.

At last, you may use value mapping to map

http://help.sap.com/saphelp_nw04s/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm

Using N:1 multimapping

/people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi

The other condition can be handled easily using standard functions - equals, constant, if

If all the messages have the same structure, then, in BPM, you can use a while loop which contains the receive step followed by the container step into which the messages will be collected. You can use "APPEND" option in the container step. After the while loop, use a transformation step and then followed by the send step.

Now for the loops, you can go with a Time-Dependent, Message-Dependent or Payload-Dependent Loops. Now, that depends on your business requirement.

For this scenario to work, you need to create a correlation, for which incoming messages should have one field in common and also should contain the same value. Else, it would fail.

If that is not the case, then in the correlation, define a constant and set it's value to 1 for all the messages. This will make it work.

Check out the Integration Processes BPMPatternCollectTime, BPMPatternCollectPayload, BPMPatternCollectMessage under the http://sap.com/xi/XI/System/Pattern of the SAP BASIS Software component.

/people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm

regards

sandeep

if helpful reward points