on 03-28-2011 8:16 AM
Hi,
I'm working on file to file scenario...where I need to take some part of Input file name (first 3 chars) and make it as a output file name. I had used the below code to get the same. But still I'm getting the whole file name. can anybody help me for the same.
Please correct me if I am wrong?
Example :
Input fileName: ABC20110328.txt
Desired Output fileName: ABC.txt
Used Code:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
String a = conf.get (key);
String var1 = (a.substring(0,3));
return var1;
Note: I have checked the ASMA in sender and receiver comm channels and In receiver comm channel, I have used the %var1%
-Esha
Hello,
Please check the below wiki:
I guess you need to use the below code:
conf.put(FileName, var1);
return "";
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Esha,
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
String a = conf.get (key);
String var1 = (a.substring(0,3));
conf.put(key, var1);
return var1;
I guess this might work ...
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Esha,
Ref: /people/madanmohan.agrawal/blog/2009/05/20/combining-three-different-aspects-of-pi-asma-af-module-and-variable-substitution-in-one-shot - Combining three different aspects of PI (ASMA, AF Module and variable substitution) in one shot
Thanks,
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 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.