on 02-11-2008 10:49 PM
Hi All
I need to configure a receiver communication channel with file adapter. Important thing is target directory need to be decided dynamically based on some content in the message. Please let me know what are the possibilities to achieve this.
Thanks & Regards
Shantha
Edited by: Shantha Bandara on Feb 12, 2008 1:05 AM
Thanks every one. I used the solution provided by
Mike Hamer.
Shantha Bandara
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bandara,
Check this document also:
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank both of you . I will try this and come back to you soon.
Shantha Bandara
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Shantha,
A simple way is to use the variable substitution in the receiver file adapter configuration via an xpath
Refer to this url http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
Regards,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shantha,
Create UDF in that you derive directory name and/or file name based on message content and store them in Dynamic Configuration.
When you are giving Directory name just give generic name from UDF(from the following code in place of directory name just give %Directory% File name %FileName%).
Here the sample value UDF code
AbstractTrace trace = container.getTrace();
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String fnam = conf.get(key);
String dir = <Path to directory>;
String newfnam = <File name>;
conf.put(key,newfnam);
key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
conf.put(key,dir);
return("");
Please let me know if you have any issues.
Cheers,
Jag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.