cancel
Showing results for 
Search instead for 
Did you mean: 

Question regardin Receiver Determination

Former Member
0 Kudos

Hi,

IS there any way to determine the receiver from multiple receivers based on value which is coming from User defined function?

I tried XPATH but I am able to populate only Sender Message Type in that. In my requirements I've to put condition based on value coming from User define function in message mapping

for example : I am getting values LOC1, LOC2, LOC3 from database. Now want to put condition like If LOC1 then Receiver1, If LOC2 the Receiver2 etc.. But I am not able to get LOC1 field in XPATH.

Anyone can suggest how to do this? Is there any alternative way to achieve this?

Please help me ASAP.

Thanks in advance.

Chintan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thank you so much..

now my all doubts are cleared. Following points I learned from this discussion.

1) Enhanced Receiver determination can be used with Asynchronous Scenario. To use it with synchronous scenario we have to use BPM

2) We can't evaluate User Define Function (which is created in Message mapping to get some external data) in XPATH Condition. In XPATH we can use only Source structure to put the condition and find the receiver.

Please make me correct if I am wrong.

Thanks once again to all of you.

Regards

Chintan

henrique_pinto
Active Contributor
0 Kudos

> 1) Enhanced Receiver determination can be used with Asynchronous Scenario. To use it with synchronous scenario we have to use BPM

Actually, it is possible. You just have to implement a few workarounds. Check this blog: /people/jin.shin/blog/2007/12/11/sap-netweaver-process-integration-enhanced-receiver-determination-for-synchronous-scenarios

Also, make sure your mapping for the enhanced receiver determination always result in at most 1 receiver (since sync scenarios can't process more than 1 receiver at once).

> 2) We can't evaluate User Define Function (which is created in Message mapping to get some external data) in XPATH Condition. In XPATH we can use only Source structure to put the condition and find the receiver.

The answer for this questions comes naturally once you understand a little further how XI works internally.

In the message pipeline, the receiver determintion step comes before the interface determination, which is the step that executes the mapping runtime. Hence, at receiver determination, no mapping has been exeucuted in the payload yet, so the evaluation is done over the sender (outbound) interface.

Regards,

Henrique.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi, Chintan,

Use message split in XI message mapping from msg1 to msg1, msg2, msg3. Depend on your result from UDF, you can define the mapping fule

for which output message will be generated eventually(msg1/msg2/msg3). In ID, you can just config with one receiver determination and multiple

interface determinations (There is an advance function you may find for configuraion) according to your multiple receiver system.

Thanks

Nick

Former Member
0 Kudos

Thanks all of you for replying.

Hi Suraj Kumar & Nick,

As per my understanding I can use Enhanced Receiver determination be means of Message Split only for Asynchronous scenario (that's what I read from different blog)

Here in my case it is Synchronous scenario and BAPI Response should be sent back to sender So If I use message split I am not able to send the response.

Is anybody have Idea about it? Can I do Enhance receiver determination with synchronous scenario?

Regards

Chintan

prateek
Active Contributor
0 Kudos

No. U cant cant configure sync scneario with enhanced receiver determination. U ll have to use BPM with receiver step for that.

Regards,

Prateek

Former Member
0 Kudos

Patel,

You can work in BPM at the same time use Receiver Determination Enhancement.

Regarding the points:

Our motivation to provide you answers is getting some points.

When you get a answer, find whether it is helpful/veryhelpful etc.. Mark it helpful/veryhelpful, then ask another question. This is how normally goes.

Best Regards,

Suraj Kumar

Former Member
0 Kudos

Chintan,

In the receiver determination, you can use the condition expression editor to determine which receiver should be the target ... For example, let's take such xpath for the condition /emp/loc, you could set it up like this :

/emp/loc = 1 then RECEIVER = receiver1 OR

/emp/loc = 2 then RECEIVER = receiver2 OR ...

xpath could be a little bit more complex depending on the xml structure and complexity of your conditions

Chris

henrique_pinto
Active Contributor
0 Kudos

>

> No. U cant cant configure sync scneario with enhanced receiver determination. U ll have to use BPM with receiver step for that.

yes he can. Just check the blog I've mentioned above.

Please make sure you are absolute certain before providing any answers in the forums...

Henrique.

Former Member
0 Kudos

Hi Henrique,

Thanks a lot. The information you provided is really really helpful to all of us and saved lots of time to accomplish my scenario without BPM.

It's really helpful for all and I applogies for my previouse comment " Enhance determination can not be achieved with Synchronous receiver"

Now I can say It's possible.

Thanks once again to all of you for your contribution.

Regards

Chintan

Former Member
0 Kudos

Patel,

In the standard receiver determination, we used XPath to find out the Receivers in the Condition editor. But, with the use of XPath, the functionalities are limited. Using XPath become complex in case we have to get substring or do arithmetic operations etc. Moreover, more than one node cannot be used in evaluating conditions.

All these features can be incorporated using the enhanced receiver determination. The list of receivers can be determined dynamically at runtime, using a message mapping.

This should help you, go through this link

[Receiver Determination Enhancement|http://www.saptechnical.com/Tutorials/XI/RecvDetermination/Enhancement.htm]

Regards,

Suraj Kumar

Former Member
0 Kudos

According to your scenario it seems you have an user defined function which retrieves the possible receivers. So you want to know how you would XPATH to do receiver determination.

Conditional Routing of messages can done by using XPATH, which evaluates the value of the source message and not the user defined function, as receiver determination is done earlier than message map being executed.

Please explain the scenario so that I can assist.

Indranil

Rewards points if helpful

Former Member
0 Kudos

Hi,

Thanks for your help.

The scenario is

" From Source I am getting Emplyee Id, based on this Employee Id I am retriving LOC code & some BAPI input parameters from the external database table by using User define function.

At Receiver side I've 3 different SAP System. All the receiver has same BAPI structure.

Now based on value of LOC code which is coming from database I've to determine which Receiver is going to receive BAPI input parameter. "

This is SOAP to RFC sync scenrio.

Regards

Chintan

Former Member
0 Kudos

Chintan:

Following blog should help you

/people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16

Former Member
0 Kudos

Dear Chintan,

Please could you provide the document you wanna use for your receiver determination, and what current xpath expression you've been working with ?

I'm not sure to understand everything, so it would help

Rgds

Chris