Skip to Content
0
Feb 13, 2009 at 05:52 AM

Dynamic file name creation problem

22 Views

Hi Friends,

I had a requirement where i had to generate file name at target side with the following format

" raw_text_yyyymmddhhmmss.txt" . This can be acheived by using "currentdate" function but there is no field at target side which holds this value, if there was a field then i would have used variable substitution method to generate the file name.Another option is Dynamic Configuration UDF already

my root node is mapped to some src field say FLD1 based on which i will be getting multiple files.

How to customise this udf to get current date as filename for multiple target files:

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

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

String Outputfile = conf.put(key,a);

return Outputfile;

Regards,

Vinod.