Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dynamic Filename and directory

Hi All,

Filename and directory details are coming from source system.Through dynamic configuration udf we can set the filename and directory.

Whether it is possible to achieve it in single UDF by taking 2 input parameters instead of writing 2 different UDF for filename and directory.

Could you please provide the java UDF for this.

Regards,

Karthiga

Former Member
replied

Hi Karthiga,

Yes, of course. Just use two input arguments e.g var1 and var2. UDF can be simple type

Here is a sample code:

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

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

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

conf.put(fname,var1);

conf.put(dir,var2);

return "";

Regards,

Mark

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question