cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver File Adapter - Dynamic FTP Server Address (PI 7.31)

john_nijburg
Explorer
0 Kudos

Hi everyone,

Is it posisble to pass the FTP Server address to the Receiver File Adapter as an parameter (like Filename or directory for the File adapter) in SAP PI 7.31?

If not is there another way to achieve this (by the File adapter and the use the Operation System Command line after Message Processing for example)?

Thanks,

John

Accepted Solutions (1)

Accepted Solutions (1)

former_member192892
Active Contributor
0 Kudos

Hi John,

I believe that you have a requirement where the receiver(FTP server to where the file should go) would be determined dynamically based on some condition.

If you have limited list of such FTP servers then the easiest solution would be to create different communication channels under different BC and use a conditional receiver determination to route the data.

Now if you are hell bent on doing this dynamically, well then theoretically you can write a module/message mapping which uses directory API and updates the communication channel. But hey, its always better to keep things simple and I would suggest using multiple receivers if the number of receivers is limited.

Regards

Varun

john_nijburg
Explorer
0 Kudos

Hi Varun,

You are correct with the statement that i need to determine a FTP-server dynamically. In the Idoc-data the IP-Address is available but there can be many IP-Address that can be used for the FTP-servers (here a FTP-server is a  measurement device and we have over 50 or even over 100 of thoose devices and each with its own IP-Address). So to setup  a CC for each of them will not be possible.

Regards,

John

Former Member
0 Kudos

Hello,

You can write ur logic of sending files to multiple servers inside AM, but just make sure that error handling is done properly.

Code is there, but u have to modify it as per ur req. - instead of passing IP address from CC u can parse ur message inside module and populate FTP credentials.

Thanks

Amit Srivastava

former_member184720
Active Contributor
0 Kudos

You should be able to achieve this with AM or even by executing operating system command feature.

Write a script which can determine the target FTP server based on the content or filename and call that script from your file receiver channel.

Answers (1)

Answers (1)

former_member184681
Active Contributor
0 Kudos

Hi John,

Have a look at this document for a summary of possibilities:

Dynamic file name and directory in Receiver File Adapter - summary of possibilities - Process Integr...

Regards,

Grzegorz

john_nijburg
Explorer
0 Kudos

Hi Grzegorz,

Thank again. If have seen that document before bur it wasn't helping me either.

In the Operation Mappings i am using an XSLT as mapping from IDOC to File/FTP.

Is it possible to use ASMA instead and wenn how to add the FileName to the message content?

Regards,

John

former_member184720
Active Contributor
0 Kudos

You should be able to achieve dynamic configuration using xslt mapping as well. Please check the below blog for dynamic configuration.

However if your target payload is an xml then you can make use of variable substitution to determine the directory and file name from the message content.