on 09-01-2008 12:45 PM
Hi Experts,
I need to achieve the following using standard receiver determination.
The material number in the source message structure has to lie within a perticular range and that should decide the receiver of the message.
For example:
MT_SRC
|---- Ele1
|----
MaterialNo.
If MaterialNo is between 100000100 and 100001000 then it should be sent to BS_TGT1 else it should be sent to BS_TGT2.
Is it possible to achieve this using the standard conditional receiver determination using XPATH and if yes, how exactly?
Regards,
Amol
What is the occurrence of this node within the message?
If it's just 0...1 (or 1...1), you could use two expressions combined:
(/MT_SRC/Ele1 [MaterialNo > 100000100 ] EX) AND
(/MT_SRC/Ele1 [MaterialNo < 100001000 ] EX) => BS_TGT1
(/MT_SRC/Ele1 [MaterialNo < 100000100 ] EX) OR
(/MT_SRC/Ele1 [MaterialNo > 100001000 ] EX) => BS_TGT2
If the max occurrence is more than 1, then the multiple fields will screw up the logic...
Regards,
Henrique.
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.
Hi Amol,
You can give ur own Xpath in the receiver determination screen instead of choosing graphically.
So construct ur own XPath (using the field at input message) for specific range and use it. I think it must be a kind of 100>f1<1000 expression.
[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3774] [original link is broken] [original link is broken] [original link is broken];
Regards,
Sudharshan N A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amol,
I think its possible. Never tried though for a range.
Go through this link and check out what is described under the section "Notes Regarding the Use of XPath Expressions"
http://help.sap.com/saphelp_nw04/helpdata/en/43/a513f2632c332ce10000000a11466f/frameset.htm
I am not sure whether it will work for two conditions though, i.e. for a range( Greater than 100000100, less than 100001000).
Just try and let us know.
Regards,
Sanjeev.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
We can not put the range in xPath in RD, so it is not possible here but my suggestion is you add one more field (sys_name) in your data type target structure and in mapping check if the material number is in between the range then map the BS_TGT1 to sys_name else map BS_TGT2.
Now you can use the xPath easily by checking the value BS_TGT1 & BS_TGT2 from target structure.
sorry, we can not do mapping before RD.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No it is not possible. If u dont want to use the Enhanced receiver determination option, perform this range calculation in mapping and based on it pass true or false value to any dummy or unused target field. Then u can use simple conditions of standard receive determination.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Its pretty straight forward with Enhanced receiver detrmination. But I not sure why you have avoided it.
I doubt if this could be done with X-path expression as the mapping is going to be changed based on the resulting values of Material from source side.
Please can you explain in more detail about the Material Range..as you may try to give the direct range in Conditional editor...but it depends upon the naming format of Material No.
Thanks
Swarup
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.