cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic file name

Former Member
0 Kudos

Hi Experts,

there is a scenario were the client wants the name of the file at the target side should be from one of the field of source

for example there is a DATE ID field depending on this field the data at the target side are split depends on different dates and this date is not found at the target side but when the file is generated at the target side it have DATE ID value i known it can be done by UDF is there any other go rather than that

Thanks

Sampath

Accepted Solutions (1)

Accepted Solutions (1)

former_member192295
Active Contributor
0 Kudos

Hi,

Find below link for more help on dynamic file name

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping

Both sender and receiver communication channels we need to enable Adapter Specific Message Attribute option, without this option we can't work.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Refer these blogs:

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping

or use this UDF:

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

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

String Outputfile = conf.put(key,a);

return Outputfile;

Regards,

Nithiyanandam

Former Member
0 Kudos

Hi venkat,

all you have to do is to make the use specific adapter properties (filename) in the receiver file adapter

and then populate the filename in the mapping:

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

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

conf.put(key, "ournewfilename");

Regards,

Swetha.

Former Member
0 Kudos

Hi

You have to do adapter specific settings in the sender communication channel, there you have to check on FileName.

This will include your filename to the dynamic configuration.

Former Member
0 Kudos

Hi,

Dynamic File Configuration:

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

Regards,

Boopathi