cancel
Showing results for 
Search instead for 
Did you mean: 

Get the file name using XSLT mapping

Former Member
0 Kudos

Hi

How to get the file Name at receiver side using XSLT mapping.

Could any one please help me

Regards

sowmya

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

You can use XSLT mapping with Java enhancement. Refer below link and try to use above code in XSLT.

http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm

Thanks,

RamuV

Former Member
0 Kudos

Sowmya

If you will use Grpahical Mesage Mapping then this can be achieved using Adapter-Specific Attribute u201CFileNameu201D

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

Code Snippet -->

DynamicConfiguration conf = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create(

u201Chttp://sap.com/xi/XI/System/Fileu201D,

u201CFileNameu201D);

But in case you have to ONLY use XSLT mapping then I would suggest to use the same jave code & call it from your XSLT mapping. I never tried such thing you might use couple of jar files too.

- lalit -

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

1. Select the option Adapter Specific Attribute in the sender file adapter.

2. Use the Dynamic Configuration to retreive the file name.

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

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

String SourceFileName = conf.get(key);

Thanks

SaNv...

Former Member
0 Kudos

Hi

But here i am not using graphical mapping. I am using XSLT mapping . Where to write this code

Regards

sowmya