cancel
Showing results for 
Search instead for 
Did you mean: 

Posting multiple files and a finish file after posting all the data files.

Former Member
0 Kudos

Hello ,

I have a requirement in my project where i have to pick 5 zip files from BW and post them to a ftp location, third party system.

The five zip files will be availbale on PI file directory, so picking them will not be a problem . But the files should be picked on the basis of a finish file.

For eg : when all the five zip files have been written to the PI directory a finish file will be written to indicate that the zip files are ready for transnfer to target system.

On the target system these five zip files should be posted as it is and the finish file should also be posted only after all five files have been successfully posted.

It is File(NFS) to File(FTP) scenario.

Please suggest how this can be achieved. I have tried sending zip files as attachment in sender file adpater and SOAP axis adapter on receiver side , but the files(attachments) are posted in a folder at the target system , which is not correct as the target does not expect files to be in a folder but posted separately.

Please Help .

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try using Additional Files option in the File sender channel.

Regards,

Aravind

former_member184944
Participant
0 Kudos

Sending the file is fine , but the problem is posting them to target location along with the finish file. As receiver file adapter does not support attachments.

former_member854360
Active Contributor
0 Kudos

Mention the finish file as an additional file in Sender file adapter.

Addtinal file will be picked up by PI as an attachment and mail file as a payload

Main file will picked up only if additinal file is available

refer this,

Specifying Additional Files Sender File Adapter

http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm

former_member184944
Participant
0 Kudos

Thanks for you reply , but the target is an ftp location .

former_member854360
Active Contributor
0 Kudos

when all the five zip files have been written to the PI directory a finish file will be written to indicate that the zip files are ready for transnfer to target system.

The concept of additinal file is bulit for the above mentioned kind of requirement

Your sender is NFS? in sender adapter you need to use additional file.

former_member184944
Participant
0 Kudos

Yes my sender is NFS, and i have tried sending the files in sender adapter as additional files , the files are picked up.. But then how do i post them to target ftp location with the finish file in the end ? any idea. Not sure how can mail adapter be used on receiver side for this as mentioned by you .

former_member854360
Active Contributor
0 Kudos

Sorry for the TYPO its main not mail.

You can try to use Payloadswapbean module

it swap the attachment and main payload.

Refer this

http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/content.htm

Here is an simple approach,

Pick the file as additinal file in sender adapter.

in receiver you need to copy the mail file as well as additinal file.

Add two receiver in receiver determination.

First receiver channel normal main file (coming as main payload ) will be copied in FTP server.

Now in second receiver chaneel use Payloadswapbean to convert the attachment(additinal file) to main payload.

After this module operation your attachment will become a main payload and it will be copied to the same FTP server.

Please let me know if this concept helps you.

former_member184944
Participant
0 Kudos

Can i use PayloadSwapBean for multiple attachments in reciever file adpater ?

former_member854360
Active Contributor
0 Kudos