on 08-09-2008 12:25 PM
Hi,
I have a scenario, where i am receiving a a file and based on the file name i have to decide who is the receiver and send it to that particular receiver.I do not have to do any mapping.
can someone suggest me how can I achieve this.
Thanks in advance.
>>where i am receiving a a file and based on the file name i have to decide who is the receiver
If the filename is coming within the payload itself(to which i doubt)you can simply give condition in conditional receiver determination(no message mapping required) and branch off the messages.
But if you are not getting the filename within the payload,then you need to get filename via UDF and use this UDF to branch off message in conditional receiver determination(message mapping required),you might need to use extended receiver determination in this case.
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Without Mapping it is very difficult to route the message based on the name of the File. As I know you cannot apply this logic directly in the Receiver
Determination Conditions.
Better solution is to use Enhance Receiver Determination. [|]
In the second screen shot of the above blog, you can take any dummy MT and at the target select MT Receiver (describe in the blog). Then create the UDF and get the File Name. Based on that File name map the Receiver Business Service (using FixedValues or ValueMapping or Lookup)
Thanks
Farooq.
>>>I am not receiving the filename in payload.
Even though you can read the file name from Adapter Specific Message Attributes using Dynamic Configuration (as suggested by Sbrish).
It is not required to read the payload. Just create the UDF (without any input) and write the code:
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;
Now you have file name...and based on that you can route the message.
Refer this Blog : https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2664
Thanks
Farooq.
>>I have a scenario, where i am receiving a a file and based on the file name i have to decide who is the receiver and send it to that particular receiver
In this case you need to read the FileName
>>cannot read the file contents
If you need only file Name then no need to read its contents.
Thanks
Farooq.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.