cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic File name based on Input field....

Former Member
0 Kudos

Greetings,

How can we set the Ouput file name based on the Input message field for file adapter?

with ASMA we can use the input file name or timstamps but is there a way to naming the file based on input message fields without passing that vale to the target message?

For Variable Substitution , Is it necessary to pass the value to the target field?

Thanks & Regards,

Hitesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

very basic question..search SDN

I am just pointing one, u will find tons of article

http://scn.sap.com/people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-su...

Answers (3)

Answers (3)

Former Member
0 Kudos

we have diifferent approaches to create file buy dynamically .

http://wiki.sdn.sap.com/wiki/display/XI/Combining+three+different+aspects+of+PI+in+one+shot

former_member184681
Active Contributor
0 Kudos

Hi,

Firstly, I agree with Amit that searching SDN would be enough for you to find the answer.

Secondly, there are even more ways to dynamically create file name than these two that mentions in his blog Amit has mentioned. Have a look at my Wiki here: Dynamic file name & directory in Receiver File Adapter - summary of possibilities.

Hope this helps,

Greg

Former Member
0 Kudos

file based on input message fields without passing that vale to the target message

as per my understand:

constant(fieldname) ->udf(dynamic conf) -> target node

String DynamicConfig(String a, Container container) throws StreamTransformationException{

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

conf.put(key,a);

return "";

....................

if morethan one field :

constant (field1)+constant (field2)->concat -> udf -> target rootnode