on 08-07-2007 5:35 PM
I am using a file to File Scenario.
On the sender side I need to pick the files placed in a particular directory, the file names will vary everytime. so on the Sender Side i have used the "." to pick up the file name.
Now my requirement is I have to plug in the same file name on the Receiver File adapter, as what I have used in the Sender side.
How to achieve that?
Thanks.
Hi,
Take a look at this blog: <a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14: The same filename from a sender to a receiver file adapter - SP14</a>
Regards,
Jakub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jenny,
As mentioned above you need to check "Adapter-Specific Message Attributes" and then select "File Name" from list. But this way you are making sure that you can read your file name.
You need to write UDF to read input file name...code is as below..
//write your code here
// Function reads the input file name base on cc paremeters and returns it.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
This function will retiurn you Input file name. Inyour receiver File adapter specify file name as %var%
where are var is variable which you need to declare in Variable substitution..
Referece to the payload file name.
Hope this will help you.
Nilesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the sender CC select adapter specific message attributes and file name, in the receiver do the same.
Then in the file name scheme, I think you use %FileName%
or you have to use variable substitution with FileName as your parameter for a variable name of your choice.
see this SAP reference:
http://help.sap.com/saphelp_nw04s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jenni,
In your file sender and receiver communicaiton channel there is an option with ASMA. For this check the check box Set Adapter-Specific Message Attributes and then check the filename check box in both sender and receiver. You will get the same filename as receiver whatever you have read as sender.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jenni,
You can use Adapter specific message attributes. You can achieve them by checking the check box option ASMA - Filename in both sender/Receiver comm.channels.
Best regards,
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.