SAP NetWeaver Process Integration: Enhanced Receiver Determination for Synchronous Scenarios
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:
- Circumvent the check
- 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.
Good blog was bit struck in these situation .In convert the ReceiverDetermination interface into a Synchronous interface. if want to again use it for Asynchronous scenario then will it work because I have modified to Synchronous one.
Thanks
Sreeram.G.Reddy
Since the ReceiverDetermination object is added to your own SWC when you try to modify it, you are essentially working with two objects now. The original one within SAP BASIS SWC remains asynchronous - you'll see this if you go directly to the SAP BASIS SWC and not within the 'Basis objects' node). So you can still use the original for async.
Regards,
Jin
this scenario is very useful and a recurring subject in the forums. Some not so efficient alternatives have been presented there (such as BPM with receiver determination). Your 2 options seem much more clean and easy to implement.
Just one quick question: the ReceiverDetermination interface will be modified in the SAP BASIS namespace or in the custom namespace?
I mean, if any other scenarios use the ReceiverDetermination interface, it will be async or sync?
Best regards,
Henrique.
When you modify the ReceiverDetermination object within the 'Basis objects' node of the custom SWC, it will be modified within the custom SWC (and only within the custom SWC). All other scenarios that use the ReceiverDetermination interface will remain as before - async.
Regards,
Jin
Regards,
Henrique.
Regards
Arvind R