Showing results for 
Search instead for 
Did you mean: 

Merging 2 files in SAP PI 7.4 Single Stack

Former Member
0 Kudos

Hi Guys,

I have a requirement (FTP to IDoc) to merge 2 files containing the Headers and the Items respectively. The catch is we are not just expecting two files. I mean there are 2 files to be merged (Header and Detail) but there are also multiple sets of these Headers and Details on the fileserver that needs to be merge.






I know this can be done easily via ccBPM but we are currently using PI 7.4 single stack installation. I have already gone through several blogs but i couldnt find any plausible solution except for NW BPM which i believe should be able to do what ccBPM can do. Is there any know documentation on how to use NW BPM to merge files?


Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Answers (3)

Answers (3)

Active Participant
0 Kudos

You can send two files, in the same message, with NFS

Specifying Additional Files in the Sender File Adapter

0 Kudos


For these type of merging scenarios using NWBPM, we create a super message type which means message type of header file + message type of trailer file in your case and then merge the files in NWBPM.

Please refer following blogs to get a good idea about it.



Former Member
0 Kudos

Hello Bryan,

Did you get any work arounds do this or only BPM is the option to pick up multiple files(different structures) from FTP location and send to Idoc as one ? We got similar requirement with SAP PI 7.4 single stack and we don't have complete Process Orchestration (PI + BPM + BRM ) to use BPM.

Your inputs are highly appreciated.



Former Member
0 Kudos

Hi Seshagiri,

My apologies for the late reply.

We did not use NWBPM because the client doesnt want to.

Instead, we utilized the FTP channel's 'Append' function for the merging.

We have to use 2 stages for this approach:


1st stage: Merging

          This stage requires 2 interfaces*:


           Interface1a - processes the Header File

                             - added Key field with value 'Header'

                             - use dynamic configuration to change the filename

                               from File1_H_123.txt to File1_merge_123.txt **

          Interface1b - processes the Detail file

                             - added Key field with value 'Detail'

                             - use dynamic configuration to change the filename

                               from File1_D_123.txt to File1_merge_123.txt **

2nd stage: IDOC transformation

                             - picks up the merged file and convert to IDoc

*We could have just picked up both files for the merging by using only 1 interface

but we dont have the keyfield to identify the headers and the Details for the next staged FCC. Both files are also of different structure.

**Both files needs to be of the same filename for the append to work

*** The risk of the files being not completely merge has been eliminated since the client has a third party tool that could control the Sender Channel externally and would only start it up after it checks that the file is not being modified. Base on experience, PI's own modified check only works with NFS and not with FTP.

Its been almost 2 months since you have posted your inquiry, are you able to find a solution? May i know what approach did you use?