cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the file name in one of the Xml node field?

Former Member
0 Kudos

Hi Experts,

i have one requirement with file name in xml file.

i need to get <b>the file name of file</b> in one of the node in xml content of that file.

how can i achieve that req?

treat this as Very Urgent.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have a look at these,

<a href="/people/sravya.talanki2/blog/2006/12/20/accessing-system-parameters-in-mapping-runtime:///people/sravya.talanki2/blog/2006/12/20/accessing-system-parameters-in-mapping-runtime

thanks.

Answers (2)

Answers (2)

santhosh_kumarv
Active Contributor
0 Kudos

Hi Bheem,

Explain your scenario in detail..

>>i need to get the file name of file in one of the node in xml content of that file.

1. Create an node <b>Filename</b> in the target datatype.

2. Check the Option Filename in the Adapter Specific Message Attributes in the sender file CC.

3. Use the following UDF and map it to the Filename field in the target message type.

public String getFileName(Container container)

{

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);

return ourSourceFileName;

}

Regards

San

former_member189387
Active Contributor
0 Kudos

Hi ,

Byusing Special Access to Mapping Runtime Constants you can achive this

Accessing Adapter-Specific Attributes

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

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm">Special Access to Mapping Runtime Constants.</a>

    • Assign points if you found helpful

Regards.,

V.Rangarajan