on 09-22-2016 5:39 PM
Dear Team,
This is basically IDOC-FILE(xml) conversion.
Requirement is to populate the IDOC no and timestamp in Filename when the file gets posted into FTP server:
<FILENAME_IDOCNO_timestamp>
Please help on this. Thank you very much in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Rajesh,
Use the Dyamnic UDF code,Where IdocNumber(from Input) and Timestamp(Use Current Time in date function) will be ur inputs
String filename = new String("");
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
filename = "MARA" + IdocNumber+ Timestamp;
conf1.put(key1,filename);
return filename;
In the Channel enable adapter specific attributes under that filename and map this UDF to any root node.
Hi Raghu,
I'm facing error please find below code and screenshot:
String filename = new String("");
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
filename = "MARA_" + "DOCNUM_" + ".csv";
conf1.put(key1,filename);
return DOCNUM;
Hello Rajesh,
you don't required timestamp??
Mara is constant right ,hardcode in the UDF and for Idocnumber dont use " " as its passed from mapping,follow the code I used.
Try in Development first before deploying in production,If you face any errors post so that we can assist then you can move it to production.
Hi Raghu,
I'm using below code and ASMA. But still IDOC no. is not populated in filename.
String filename = new String("");
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
filename = "TSPA_" + "DOCNUM_" + ".csv";
conf1.put(key1,filename);
return filename;
Hello Rajesh,
Try as per the below link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I am hoping you know dynamic configuration.
EDIDC40 -> DOCNUM field contains IDOC number
and timestamp can be taken with currentdate (HHmmSS or any format)
so just pass FileName (concat) DOCNUM (concat) Timestamp into the UDF and set the filename.
Regards,
Vikas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.