cancel
Showing results for 
Search instead for 
Did you mean: 

Material number as receiver file name in XI

Former Member
0 Kudos

hi experts,

here iam doing IDoc to file scenario, when i push data from BD10 the data will come to XI and i want that material number as file name.

can any one explains me how to do that dynamic configuration.

thanks in advance.

JOHN

Accepted Solutions (1)

Accepted Solutions (1)

former_member518917
Participant
0 Kudos

there are two ways.1)use variable substitution 2) write UDF in meg mapping, pass material number as input parameter , write code:

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

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

String ourSourceFileName = conf.get(key);

String newFileName = materialnumber;

conf.put(key,newFileName );

return ourSourceFileName;

Former Member
0 Kudos

can u give me the whole scenario that how to do that,

the documents which i seen was little bit confused,

Bcz i am nill in JAVA coding.

can u please help me.

thanks for response.

JOhn

Former Member
0 Kudos

Hi John,

U dont have code any thing.

Just follow the things given in below link........... in receiver file adapter.

http://www.saptechnical.com/Tutorials/XI/Variable/substitution.htm

Thanks,

Mahi

Edited by: Maheshwari Morbale on Jul 30, 2008 9:47 AM

Former Member
0 Kudos

THANKS FOR UR RESPONSE.

MY PROBLEM WAS SOLVED

RGDS

JOHN

Answers (4)

Answers (4)

Former Member
0 Kudos

You can do this with dynamic configuration. You just need to write following UDF in 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,a); // a is Material no that you need to pass to UDF

String ourSourceFileName = conf.get(key);

return ourSourceFileName;

in mapping

MaterialNo---->UDF ---> Target Root node

Also set Adapter Specific Message Attributes in receiver file adapter. there tick filename

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

Use Variable Substution...

By Sameer Shadab

Thanks

SaNv...

Former Member
0 Kudos

hi john

make use of VARIABLE SUBSTITUTION

checkn this blog for reference

An interesting usage of Variable Substitution in XI

SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean

regards

kummari

prateek
Active Contributor
0 Kudos

Use variable substitution in ur file channel to get the filename as material no from payload.

http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

Regards,

Prateek