on 12-03-2013 1:19 PM
Dear Experts,
I want to change a character in variable substitution.
Let's say that I have a variable substitution named var1. The value of var1 will always have the slash '/' character.
This var1 will be used as part of the filename, such as filename_%var1%.xml
Now the problem is that slash '/' character is illegal in filename. I want to replace the slash '/' character with dot '.' character. So if var1 has the value '2/2/2' it will become '2.2.2'.
Is this possbile? Is there any workaround?
Changing the value in the message mapping is not an option as the receiver system wants to keep the format.
Thank you,
Suwandi C.
Hi Suwandi - You can go with Dynamic file name option
Whatever the mapping you are doing for var1 pass it as an input for UDF..
String outfilename = new String("");
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
outfilename = "filename" + (var1mapping)+ ".xml";
conf1.put(key1,outfilename);
return variablePart;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Suwandi ,
Can you please explain your original problem and not your solution.
this will be much more easy for us to assist you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As mentioned by hareesh you can go for dynamic Configuration.
under UDF you can replace '/' character with dot(.). so that receiver output will not be affected.
you can then avoid variable substition.
Regards,
Muniyappan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.