cancel
Showing results for 
Search instead for 
Did you mean: 

FTP to RFC: transfering the pathname to the rfc-function

matthiasschaw
Explorer
0 Kudos

Hello Community,

I have the following problem: the payload of the message has no reference to any organisation. But the pathname has.

The sender-adapter is FTP - receiver is RFC. Is it possible to transfer the server - pathname to the rfc-function?

LG Matthias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Matthias,

Try this UDF to get file name

Best Regards,

Vladimir

public String Filename(Container container) throws StreamTransformationException{

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

String SourceFileName = "";

if (conf != null) {

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

SourceFileName = ""+conf.get(key);

}  else {SourceFileName = "no filename";}

return SourceFileName;

}

matthiasschaw
Explorer
0 Kudos

Hello Vladimir,

today I could test it and it works great. Thank you very much.

Matthias

Answers (2)

Answers (2)

matthiasschaw
Explorer
0 Kudos

Hello Mark and Vladimir,

thanks for the answers. In the next days I'm not in the office but then I'll try it

Matthias

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Matthias,

The host and the directory should be retrievable by using dynamic configuration.

Configuring the Sender FTP Adapter - Advanced Adapter Engine - SAP Library

Regards,

Mark