cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic filename to payload

Former Member
0 Kudos

Hi Guys,

I have a file to IDoc scenario in which the Sender system places a file on FTP Directory at source side. PI picks up the file, generates a IDoc and take a "FileName" from the name of the source file.

For example, If "Sender A" sends a file "20140404.TXT" then I have take the name like

<IDOC>

<filename>20140404.TXT </filename>

</IDOC>

It would be helpful if some helpful suggestions/approach can be provided for this scenario. Thanks, PM

Accepted Solutions (1)

Accepted Solutions (1)

Muniyappan
Active Contributor
0 Kudos

Hi Peter,

you have to create udf for this.

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

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

String name = conf1.get(key1);

return name;

in the sender file adapter check ASMA properties. and select File name.

Regards,

Muni.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

There are tons of thread on Dynamic File Name .

  Following links would be helpful to you........

  http://scn.sap.com/thread/2090348

  http://scn.sap.com/thread/448214

  Dynamic File Name - UDF | SCN

BR, Anirban