on 09-25-2006 1:48 PM
Hi all,
Please clarify the following issue.
I have two source field
Transfer Order number - 0000000222
Tranfer Order line item - 0001
Both i map it into one target field
The target field output is - 0000000222#0001
I need a file name which starts with ABC <TranferOrderNumber>.txt.
The problem is, when i try to use payload i get output
(ABC0000000222#0001.txt). The reason is i use the target field which has concatenated.
Please give me a solution where i would get output
(ABC0000000222.txt).
Anandha,
use Dynamic Configuration of Adapter-Specific Message Attributes to set the file name instead of plain Variable Substitution.
You can do it in the same mapping you use to generate target message.
Check these references on dynamic configuration:
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
Just make the mapping and then set your receiver file adapter to use the adapter specific attribute instead of the default name field.
In your specific case, the filename string should be something like:
String filename = "ABC" + order_number + ".xml"
Regards,
Henrique.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use Adapter Specific Identifiers , instead of Variable Name substitution.
Sender File adapter --> Adapter Specific Attributes --> Select File Name
Reciver File Adapter -->Adapter Specific Attributes --> Select File Name
In the mapping , use this code in an UDF to change the filename to what you want,
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String filename="YOURFILENAME";
String rSourceFileName = conf.put(key,filename);
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anandha,
To get the value correct what you need to do is that you can add up a new node in your target structure and pass the transfer order no only to that field.
In the filename schema give the value as ABC%var%.txt where %var% stands for the XML path for your new node in your target structure for transfer order number.
when you use the content conversion you can use the 'Cut' method to suppress the node which is having only the transfer order number. For this you can refer to the configuration of the sender file adapter
Cheers
JK
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 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.