on 01-21-2011 2:42 PM
Hi there,
is it possible to set up one communication channel that will use different target folders based on file name?
E.g.
File abcdef will be saved to /root/abcdef/abcdef or /root/abcdef/abcdef.txt
File xyz will go to /root/xyz/xyz or /root/xyz/xyz.txt
I know I could use Sender/Receiver Service, Interface/namespace or data from message for variable substitution but could not find an easier solution for this scenario than to create multiple communication channels.
Thanks.
Hi,
You can determine your target directory in your message mapping, using a java udf, inf function of your filename.
...
String Name2 = var2;
DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
conf.put(key2, Name2);
return "";
Regards,
Carme
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>> is it possible to set up one communication channel that will use different target folders based on file name?
Yes. Use dynamic configuration logic in udf or java mapping. This is pretty standard.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all guys for your answers,
I knew I could do it in the mapping, sorry I was not clear about the requirements.
The scenario does not use any mapping nor other repository object at all as of yet.
The file is taken from one FTP directory and placed on different FTP directory, no mapping involved.
So it seems that this will not work and I have to create at least a dummy mapping, right?
If you haven't a message mapping, then you can create only an interface mapping with an abap mapping.
In your abap mapping:
DATA l_record type mpp_dynamic.
l_record-namespace = 'http://sap.com/xi/XI/System/File'.
l_record-name = 'FileName'.
l_record-value = "your filename"
dynamic_configuration->add_record( l_record ).
l_record-namespace = 'http://sap.com/xi/XI/System/File'.
l_record-name = 'Directory'.
l_record-value = "your directory ".
dynamic_configuration->add_record( l_record ).
Afther that, you must activate Adapter Specific Message Attributes (directory and/or filename) in your target communication channel .
Regards,
Carme.
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.