cancel
Showing results for 
Search instead for 
Did you mean: 

Pass ftp filename to RFC

Former Member
0 Kudos

Hi

I have a scenario in which I need to pull a file from a ftp location and move it to another ftp location. When I am doing this, I need to pass the file name to an rfc ( This is not synchronous..means the file name is passed to rfc and it will trigger a function to do some other process) . How I can achieve this? Your suggestions highly appreciated

Thanks

Skaria

Accepted Solutions (1)

Accepted Solutions (1)

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

1. Set Adapter-Specific Message Attribute in the sender file adapter.

2. Use the following UDF to get the filename from the dynamic configuration and pass it to the RFC.

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

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

String ourSourceFileName = conf.get(key);

return ourSourceFileName;

Thanks

SaNv...

Answers (3)

Answers (3)

Former Member
0 Kudos

For your requirement you need to do 2 things. First you need to fetch the file name from payload by using this blog and secondly after getting the file name in your mapping you need to send the file name to R/3 system for further processing which you can do by writing a small R/3 lookup function and just map the file name to this lookup function.

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

Also check my Blog [Impede Duplicate Files|].

It addresses a similar scenario of passing a filename to a RFC.

Thanks

SaNv...

sunilchandra007
Active Contributor
0 Kudos

Hi,

You can use Dynamic configuration in User defined functions in message mapping. It is perfect solution in ur case.

Regards,

Chandra