Illustration of Enhanced Receiver Determination – SP16


SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

This blog illustrates the use of Enhanced Receiver Determination.
In the standard receiver determination, we used to have the condition editor. But only XPaths can be given in the condition editor and so the functionalities are limited. Using Xpaths become complex in case we have to get substring, 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 allows us to evaluate any condition, since all the functionalities of message mapping can be used.
Screenshots of Input and Output files.
Input File:
image
Output File1:
image
Output File2:
image
Steps for using Enhanced Receiver Determination.
Integration Repository
1. Create the Data types, Message types and Message interfaces.
2. Now create the message mappings. In order to use the enhanced receiver determination, create a message mapping which has the target message as “Receiver Determination” in the SAP BASIS –> http://sap.com/xi/XI/System.
image
3. For determining the receivers I have used a user defined function.
image
If there is at least one “name” starting with “Mr” then MrService is added to the receivers list. In a similar manner if there is a “name” starting with “Ms” then MsService is added to the receivers list. This is accomplished using the user defined function given below.

————————————————————————————————————————————

int i;
int mr=0;
int ms=0;
for(i=0; i<a.length;i++)
{
       if( a[i].substring(0,2).equals("Mr") && mr==0)
       {
             result.addValue("MrService");
             mr=1;
      }
      if( a[i].substring(0,2).equals("Ms") && ms==0)
       {
             result.addValue("MsService");
             ms=1;
      }
}
</textarea>

 

————————————————————————————————————————————

SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

4. Other message mappings are created based on the scenario.
image
Similarly mapping for “Ms” is also created.
5. Create the Interface Mapping for the message mappings.
image
Integration Directory
1. Create the receiver determination. In that chose the “extended” option button. Now we can select the Interface Mapping that we created in Integration repository.
image
2. Other Interface determinations can be created and the original interface mappings for functionality can be chosen in these interface determinations.
3. The necessary sender and receiver agreements are created.
The activation of all the objects completes the scenario.
This Enhanced Receiver Determination feature is useful in many ways and can solve many complex things. Hope this blog helps you to understand the enhanced feature.
For more information, check the following help link:
Enhanced Receiver Determination.

SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter
PDF24    Send article as PDF   
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *