on 08-04-2015 1:34 PM
Hi Experts,
We have one Requirement that is RFC to File Scenario.
This is a straightforward interface which gets data from SAP and sends it to Target server .
File Name will be in the following format PARENT-<Actual Shipment Number >-Dyy-mm-dd-Hhh-mm-ss.txt
Where Actual shipment Number can be obtained from X field , D is date in YMD, and H is time in HMS.
Y will be in the following format “D3B1R2166271” where 3B1R2 is the Z Field and 166271 is the shipment Number.
So each file name will be unique.
This will be done through dynamic meta object.
If Y is like D3B1R266271 output file name will be PARENT_66271_D11-05-12-H14-40-00.txt.
Please help on this
Regards,
Kamal.
Hi Kamal,
Use the below udf code. The input parameters to the udf are Y(of the format D3B1R266271) & currentdate DATE function as below. Map the output of the udf to the Root node of the target message.
'D'yy-MM-dd-'H'hh-mm-ss
udf code:
DynamicConfiguration dc = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dck = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
String fname = "PARENT_" + shipnum[0].substring(6) + "_" + date[0] + ".txt";
dc.put(dck,fname);
result.addValue(fname);
Try end to end testing and let me know if you face any issues.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kamal,
Use dyanmic file name UDF and enable adapter specific attributes->filename in the receiver channel
give constant ' parent' + X field + date(in the required format)as input to this UDF.
let me know if you face any difficulities
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
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.