on 01-24-2014 2:05 PM
Hi All,
I have following udf for getting file-name from sender, but how to map and what is the input field I have to give.
As udf expects input, what is the input field I have to pass.
I have taken field (random input) mapped one input field as below and used udf shown in below picture. Please suggest if it is correct.
UDF is:
---------------------------------------------------
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
If u just want to read filename and pass it to one of the fields in ur proxy then u don't need to pass any input to ur UDF.
So ur UDF will be:
String filename = "";
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
filename = conf1.get(key1);
return filename;
Mapping:
UDF -> Target Field
Thanks
Amit Srivastava
Hi SP - I dont think it works. you are not getting the file name in the above method.
Use the below UDF and pass any input or map it with constant.
String filename = "";
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
filename = conf1.get(key1);
conf1.put(key1,filename);
return filename;
Source : http://scn.sap.com/thread/3156237
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.