Online Tutorials & Training Materials |
Register Login

Receiver Determination Enhancement

|| || 1

Receiver Determination Enhancement

Aware of File-to-File Scenario using Standard Receiver Determination.

Standard Receiver determination:

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 enhancement is available from Support Package Stack 06 in PI 7.0 and also its equivalent package in XI 3.0, which is Support Package Stack 15 onwards.

Enhanced Receiver Determination

You use an enhanced receiver determination to have a mapping program determine the receivers of the message dynamically at runtime. Instead of creating the receivers in the receiver determination manually, you assign a mapping to the receiver determination and this returns a list of receivers at runtime.

A typical usage case is if you do not yet know the names of the receivers at configuration time. In this case, you can define a mapping program, for example, which reads a list of receivers from a table or from the payload of the message at runtime.

Need for Usage

When there is a need of separating Applicants list into two, one for Major and other is for Minor grouping by age limits (<=25, >25) and send lists to different servers, then we can use this enhancement.

Graphical Representation of Scenario Steps to be Maintained in Integration Repository

  • Create Data Type, Message Type and Message Interfaces for Source and Target Systems.
  • Create Message Mapping between Source and Target Message types. One message mapping is to map applicants age less than or equal to 25 and other is greater than 25 into target message type. 
  • Create Interface Mapping between Source and Target Interfaces and use the message mappings created above.

Additional steps to be maintained in Integration Repository

  • Message Mapping:

Define Message Mapping between Outbound Message Type and Standard Message Type “Receivers” which is as Inbound message type and which is in the SAP BASIS -->


Define the message mapping or mapping program that is to determine the receivers at runtime. The screen shot of message Mapping is as shown below.


  • Create User Defined Function: User Defined function “countLevels” is to determine number of receivers dynamically. The logic includes, If there is at least one EMP having Age <= 25 then “A1Service” is added to the receivers list. In similar manner if there is at least one EMP is having Age > 25 then “A2Service” is added to the receiver's list. This is accomplished using the user-defined function “countLevels” and the code is given below and is used in the above Message Mapping.




    Define Interface Mapping:

    During the definition of the interface mapping, you assign the abstract message interface ReceiverDetermination as the target interface. The message interface ReceiverDetermination is in the Integration Repository in the software component SAP BASIS (namespace

    The message interface uses the message type Receivers and the data type Receivers. The data type Receivers describes a list of receivers.

    Assign the message mapping or mapping program to the interface mapping 

    Steps to be maintained in Integration Directory

    Receiver Determination: While defining receiver determination, chose the “extended” option button. Now we can select the Interface Mapping that we created in Integration repository as shown below.  


  • Define Interface Determinations, Sender and Receiver Agreements:

Interface determinations can be created and the original interface mappings for functionality can be chosen in these interface determinations.

The necessary sender and receiver agreements are created.

Testing the Scenario:  

Case 1: In order to test the scenario, creating and Applicants source file with one employee age less than or equal to 25 and other one employee with age greater than 25.

The corresponding XML file to be placed in the source FTP server is,  

Source File:

Ravi     26        Rajesh     23   

Output: The output of the above file is, two target files on two target FTP Servers, one with employees age <= 25 and other with employee age > 25. Here two receivers are identified based on content of the payload.

 FTP Server one:            Rajesh     23      
 FTP Server two:             Ravi      26       

Case 2: Creating Applicants source file with two employees greater than 25.  

The corresponding XML file to be placed in the source FTP server is,  

 Source File:        Ravi     26        Raju     28    Output: The output of the above file is only one target file on FTP Server, with employee age > 25. 

 Here only one receiver is identified based on the content of the payload.   

 FTP Server two:             Ravi      26            Raju      28      


  • 23 Nov 2008 6:31 pm
    good blog ..but few question for the authers..

    do we define list of receivers in receiver data type or they take it as default?
    If i need to do a file lookup for the destination (say i have written a udf for the same).after the udf is executed ..i have the destination.if i map this to receivers that sufficient?

Related Articles

0.0129 seconds.