cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic directory name in Receiving File adapter

Former Member
0 Kudos

Hi,

In File to File senario, In receiving system i want to create directory name dynamically. In my mapping there is a field called name, the directory name in the receiving system will be value in the name field. Any one can help me how to do this one...

Thanks

Rao

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi;

Refer therse weblogs

Dynamic File Name Part 1

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

Dynamic File Name Part 2

/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

Mudit

bhavesh_kantilal
Active Contributor
0 Kudos

Just a small change in the code provided by Raj,

DynamicConfiguration conf = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create(

“http://sap.com/xi/XI/System/File”,

“Directory”);

conf.put(key, "DIRECTORY VALUE");

In the receiver file adapter, provide some dummy value for directory name and then select adapter specific Identifiers --> Directory.

Regards

Bhavesh

justin_santhanam
Active Contributor
0 Kudos

Thanks Bhavesh

Best regards,

raj.

bhavesh_kantilal
Active Contributor
0 Kudos

No problem wat so ever

Regards

Bhavesh

justin_santhanam
Active Contributor
0 Kudos

Hello,

Please follow the below to achieve the same.

input - Store number,

UDF

String dynaname = input;

DynamicConfiguration conf = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION );

DynamicConfigurationKey key = DynamicConfigurationKey.create(

"http://sap.com/xi/XI/System/File","FileName");

conf.put(key,dynaname);

return "";

UDF mapping

Source[input] -


> UDF --> Rootnode of target structure.

Hope it helps.

best regards,

raj.