cancel
Showing results for 
Search instead for 
Did you mean: 

FTP adapter Condition based Posting files to multiple FTP Accounts

Former Member
0 Kudos

All,

I have a scenario where files should be posted to multiple accounts of a FTP server.

Based on sales organisation field in the idoc i need to send the files to different account folders of a FTP server.

For example if sales org is 4250 send the file to account 'ABC' of FTP server, if sales org is 2134 send file to account 'CDE' of the same FTP server.

ABC and CDE are two different folder accounts of the same FTP server.

Keerthi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

By using 3 ways we can achieve this

1. By writing OS script

2. By creating 2 receiver communication channels, 2 Receiver Agreements and configure the Receiver determination based on conditions.

3. By using dynamic configuration, by writing UDF in the mapping.

you can get the dynamic configuration code in this link

http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot

But that is not enough, you need to provide the directory dynamically for this you have to use below statement.

DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");

Regards,

Venkata Ramesh

Ryan-Crosby
Active Contributor
0 Kudos

Hi Keerthi,

It sounds like you would want to look into variable substitution for the receiver FTP channel. The FTP login account would need to have write access to multiple directories (accounts). You could achieve this simply by having a mapping for sales organization that determines the proper account on the FTP server (also if the file names differ between accounts you could have a second variable for that).

Regards,

Ryan Crosby

Former Member
0 Kudos

You can use an OS Script, passing value of Idoc Field (and into the OS Script, with an IF statement, choose the destination folder).

An alternative, is to use the Dynamic Receiver Determination (using different BS Name & CC for every case type)