cancel
Showing results for 
Search instead for 
Did you mean: 

getting filename into target message type

Former Member
0 Kudos

hi xi professionals.

i just want to know how we can get filename in message mapping and map it to targer message type.

is it through java functions.

here the thing is that iam not having netweaver developer studio.

waiting for ur excellent response.

bye.

regards.

seeta ram.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member335553
Active Contributor
0 Kudos

Hi

Refer this blog

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

then use the code below in ur mapping (simple user defined function) to get the filename:

try

{

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

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

ourSourceFileName = conf.get(key);

}

catch (Exception e)

{

//return e.toString();

}

return ourSourceFileName;

If this could help u refer these

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

><i>is it through java functions.</i>

You need to write a User defined Function in the mapping.

The code to be used in this UDF will be as follows,

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

><i>here the thing is that iam not having netweaver developer studio.</i>

You do not need NWDS for this.

Regards

Bhavesh

Former Member
0 Kudos

thanku bavesh.

thanks for ur good answer.

i think this will solve my problem.

bye.

regards.

seeta ram.