cancel
Showing results for 
Search instead for 
Did you mean: 

REG: Dynamic File Name

Former Member
0 Kudos

Hi All,

I have Idoc to File scenario where my output is a flat file.I am using java mapping to achive this.My requirment is, i have to name the output file with respect to one field value in the IDOC.

So how can be this achived.

Thanks

Siva

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

you can access adapter specific attributes in your mapping.

Store the Value from the Idoc in a variable and pass that variable to the key.

eg:

String myfilename = <THE VALUE FROM IDoc>;

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

DynamicConfigurationKey key = DynamicConfigurationKey.create(
    u201Chttp://sap.com/xi/XI/System/Fileu201D,
    u201CFileNameu201D);

 conf.put(key, myfilename);

Ref:

http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm

Answers (5)

Answers (5)

Former Member
0 Kudos

This message was moderated.

former_member183908
Active Contributor
0 Kudos

Hi

You Can use VARIABLE SUBSTITUTION technique in the receiver communication channel.With this we can achieve the name of the target file as the Any one FIELD VALUE name.

Thanks

Former Member
0 Kudos

You can acheive this by using UDF Dynamic Configuration class and using adapter specific identier

properties

Rajesh

siddhesh_pathak4
Contributor
0 Kudos

Please go through the link,

[]

jyothi_anagani
Active Contributor
0 Kudos

Hi,

This link is very Useful for your scenario....Please read this link completely.....It will really help You.

/people/sravya.talanki2/blog/2006/12/20/accessing-system-parameters-in-mapping-runtime

Thanks.