Skip to Content
0
Former Member
Jan 22, 2009 at 08:23 PM

UDF to get the filename for File Sender Adapter

551 Views

Hi,

I had an requirement to get the the Filename and map to the target payload.

I had configured the File Sender Adapter settings in the ID

This is the following UDF i got from SDN.

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;

But when iam using this UDF iam getting an error

RuntimeException in Message-Mapping transformation: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MM_ORDER_CRS_OB_SAP_PROXY_IB_ method Filename$[com.sap.aii.mappingtool.tf3.rt.Context@54e154e1]

Please help me in correcting the error.

Thanks

Srinivas