on 12-23-2007 11:07 AM
Hi,
We are using a receiver file channel and we need to populate the temporary file name dynamically , in the message mapping (similar to main file name and folder).
Please let me know as to how to achieve this in message mapping and what configuration needs to be done in the receiver file channel.
Regards
Ganesh
Hi,
A way to fetch File name Dynamically (from source File Adapter) in message mapping is through a UDF and then pass this Filename in XML payload of your message.
Then this Dyanamic File name can be put into Receiver File Adapter by configuring Advanced Tab in Receiver File Adapter as explained in this Link:
under Advanced Tab Page
http://help.sap.com/saphelp_nw70/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
UDF is as Follows:
"
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String valueOld = conf.get(key);
return (valueOld);
".
This code fetches File Name of the files picked up by Sender File Adapter.Give a suitable file name in Sender as "*.txt" or anthing you wish.
If you find the information helpful, rewards points.
Thanks,
Anurag Garg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Refer the following blogs, they might be useful;
[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1888] [original link is broken] [original link is broken] [original link is broken];
[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6400] [original link is broken] [original link is broken] [original link is broken];
Award points if useful.
Regards,
Yashaswee.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ganesh,
To give the same name as the source file u need not do any mapping.
Just activate "adapter specific attributes" in source and target adapter nd select filename and directory attributes.
To change the name dynamically, in addition to the above step u have to write a small user defined which takes source filename from the container object,change it and return the changed filename.
Hope this helps.
Regards,
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.