cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic file name

Former Member
0 Kudos

Hi,

In my IDOC to FILE senario, for getting dynamic file name in receiver side i used the variable substitution option(the part of the file name is from payload). Steps i followed in File adapter are

1. File name scheme : xxxx_POnumber, I want to get this POnumber from payload

2. Enabled the variable substitution and parameter in variable substitution are

varable name : POnumber

reference: payload:mtsp,1,BELNR,1 (BELNR is a field in target msg type)

but finally i am not getting what i need!....

SP19 support pack is also installed.

Any one can help me for this

Thanks

Rao

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Rao,

Your file name scheme should be like this:

xxxx_%POnumber%

Also can you give your target strcuture so that we can check whether you are referrring to the correct varibale or not.

Regards,

---Satish

justin_santhanam
Active Contributor
0 Kudos

Rao,

You can even try the same with adapter specific attributes, if you need it then consider the below code.

Get BELNR as input.

Write UDF.

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

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

conf.put(key, input+".txt");

return "";

BELNR -


> UDF -


> Root node of the target.

Don't forget to <b>check</b> the adapter specific message attributes, filename in sender/receiver comm.channel.

Hope it helps.

Best regards,

raj.

former_member184619
Active Contributor
0 Kudos

Hi Rao,

Check this link it might be helpful..

/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12

Sachin

sridharreddy_kondam
Active Contributor
0 Kudos

Hi Koteshwar,

Use that var(POnumber created in Variable substituion) in file Name schema as <b>%POnumber%</b>.Filename.txt

This works From SP16....

Regards,

sridhar