Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Introduction

Enhanced Receiver Determination was introduced in SPS16 for SAP NetWeaver XI 3.0 (6.40) and SPS07 for SAP NetWeaver PI 7.0 (7.00). This feature basically allows for dynamic receiver determination at runtime. More details on the enhanced receiver determination feature can be found on the SAP Help Portal and also in blog Illustration of Enhanced Receiver Determination - SP16.

Out-of-the-box, this feature can only be implemented for asynchronous scenarios. This limitation is mainly due to a design time check for the Interface Mapping that prevents synchronous and asynchronous interfaces to be matched up within an interface mapping. Since the ReceiverDetermination interface object that is contained in the SAP BASIS software component is delivered as an asynchronous interface, the design time check prevents the use of enhanced receiver determination in synchronous scenarios - i.e. the activation will fail.

Well, there are a couple of workarounds for this:

  1. Circumvent the check
  2. Convert the ReceiverDetermination interface into a synchronous interface

Applying the Workarounds

Circumvent the check

A quick and easy way to allow for synchronous enhanced receiver determination setup is to circumvent the check that prevents a synchronous interface to be matched to an asynchronous interface in an interface mapping. This can be done simply by manually entering the name and namespace of the ReceiverDetermination interface object (e.g. 'ReceiverDetermination' and 'http://sap.com/xi/XI/System' respectively) for the target/receiver interface in the interface mapping, but leaving the value for the Software Component Version empty.

Here's a closer look...

By doing this, the check is bypassed and the interface mapping object can be activated.

Convert the ReceiverDetermination interface into a synchronous interface

If for some reason you don't feel comfortable circumventing the interface mapping check, an alternative option is to convert the ReceiverDetermination interface into a synchronous interface. But since the ReceiverDetermination object is a SAP delivered object within the SAP BASIS software component, we do not want to modify this object directly. Instead, we want to add it into our own software component and modify this instance of the object. This is done by making the SAP BASIS software component a dependent component via the Usage Dependencies feature. More info on setting up Usage Dependencies can found in this The specified item was not found. and on the SAP Help Portal.

Once the usage dependency to the SAP BASIS software component version is set up, navigate to the http://sap.com/xi/XI/System -> Interface Objects -> Message Interfaces -> ReceiverDetermination and open the ReceiverDetermination object. Then switch to edit mode which will launch the following Edit Message Interface dialog:

Select Modify and then change the mode to synchronous. Since a synchronous interface requires an input message as well, you can reuse the Receivers message type used in the output message - it doesn't really matter as long as some message type is used.

The object can be saved and activated at this point. Once saved, the modified version of the ReceiverDetermination object will have a symbol next to it indicated that it has been modified.

Now this modified version can be used in the interface mapping.  The remaining items in order to finish the enhanced receiver determination and scenario setup can be completed as normal.

Additional Notes

  • At this point, one workaround is not necessarily recommended over the other. Both will work as a workaround until SAP PI development comes out with an official solution. I would hazard a guess that the solution might either be a synchronous version of the ReceiverDetermination object being delivered in the SAP BASIS software component version or possibly eliminating the Interface Mapping check when used for enhanced receiver determination or perhaps something else.
  • Remember that the mapping used for the enhanced receiver determination feature is used for logical routing purposes only. Thus at runtime, the workarounds presented do not have a runtime impact on the actual interfaces used. This is still based on the interfaces set up within the Interface Determination configuration.
  • Keep in mind that synchronous scenarios do not allow for message splits to multiple receivers. So the enhanced receiver determination mapping must be designed such that, at most, one receiver, is returned. This is the case whether enhanced receiver determination is used or not.
  • 6 Comments