cancel
Showing results for 
Search instead for 
Did you mean: 

merging of files without BPM

former_member190284
Participant
0 Kudos

Hi

I want to merge, 2 files coming from same source system but different strcuture into the receiver system.

I dont want to use BPM.

can any1 help me with that, please help me with full end to end flow

Thanks

Nunu

Accepted Solutions (0)

Answers (4)

Answers (4)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Nunu,

                You can break the scenario into two parts

scenario 1

--------------------

sender adapter (NFS,FTP,SFTP) picks file and writes it to a target directory in PI server using receiver file adapter (NFS) in append mode. You can turn on the sender adapter at specific time of the day using  availability planning. provide a new name to the newly created /merged file.

Scenario2

----------------

Runs only once a day to pick up appended file and write to target server.

Regards

Anupam

former_member182412
Active Contributor
0 Kudos

Hi Anupam,

This will not work if we need to pickup multiple files during the day, if the source got A1,B1,A2,B2,A3,B3 files in the folder, the requirement is to merge A and B files and send it to target like AB1, AB2,AB3. for your scenario all the files are appended to one single file and send it to target.

Regards,

Praveen.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Praveen,

                  I have provided the solution for only two files a day.

From Nunu's post it seems there will be two files per day.

Again in Nunu's post there is no mention on how the merging will take place. It might very well be all files get appended together. My answer was based on two files per day. 

Regards

Anupam

former_member182412
Active Contributor
0 Kudos

Hi Nunu,

If you use SFTP adapter in the sender side then you can pickup second file as additional file option then adapter will pick up both files as one message, one with main payload and another one with attachment then using java mapping you can merge these payloads into one single message and send it to receiver system.

Regards,

Praveen.

iaki_vila
Active Contributor
0 Kudos

Hi Praveen,

AFAIK that option is available with the FTP channel as well: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/404ee507-3fbc-2e10-00bc-be90ab28d...

The only doubt that i have is if PI can control at sender side that the two files are present and it doesn't take only one if the second is not present. May be with OS command to check this?, but the poll will continue, i haven't clear this check.

Regards.

former_member182412
Active Contributor
0 Kudos

Hi Inaki,

The additional files option is not available for File adapter with FTP transport protocol, only it is available for NFS transport protocol.

If you set additionalFile.optional parameter with "NO" then adapter will not pick up the first file only if the second file is not avaialable, adapter will pick up the files only if both are present, if not present the channel will raise an error with mandatory file is missing.

Regards,

Praveen.

iaki_vila
Active Contributor
0 Kudos

Hi Praveen,

Thank for your comment!, I didn't know the parameter NO. Always i can learn something in this forum.

Regards.

iaki_vila
Active Contributor
0 Kudos

Hi nunu,

The main problem is that you must know when the two files are available. You can do this check with file lookup at mapping level:

You can do it in several ways, if you have an ECC system involved in the infrastructure you can do a job in ABAP and to call proxy - file scenario and at mapping level to pick the two files

Regards.

konrad_thalheim3
Active Participant
0 Kudos

Hi Nunu,

maybe you can try to use the file adapter receiver channel. Click check box append.

With the use of dynamic attributes by setting the file name you will append the files into one file.

Kind regards

Konrad