Dynamic Extended Receiver Determination SAP PI/PO

Extended or Dynamic Receiver Determination is useful when it comes to determining message receivers at interface runtime by evaluating content of the sender message using complex logics.

Standard Receiver Determination allows us to find the receivers based on Xpath of the sender message. Only limited number of operators are allowed to evaluate Xpath element data content. Operators in Standard Receiver Determination are limited to Equal to (=), Not Equal to (≠), Contain Pattern (≈) and Exists (EX).

Therefore, the main advantage of Extended Receiver Determination is that it facilitates complex logic-based receiver evaluation at runtime.

 

The Main Differences Between Standard and Extended Receiver Determination.

Extended Standard
Receivers are determined at runtime of Message Mapping. Receivers are determined by rule based at Design Time.
Complex logics can be build at massage mapping. Rules based on data content of Xpath
Mapping techniques such as UDFs or Java mappings can be used to build complex receiver rules. Rules only allow operators Equal to (=), Not Equal to (≠), Contain Pattern (≈) and Exists (EX).
Parameterized mapping can be used to import additional values required at runtime.
Special SAP BASIS standard data types, message types, interface objects are required.

 

Step by Step Guide on How to Create an Extended Dynamic Receiver Determination in SAP PO 7.5 Single Stack Version.

 

Example Scenario:

I have chosen a simple logic since the main purpose of the article is to show the functionality of the Extended Receiver Determination to avoid creating complex Message Mapping. Let’s assume we have an XML file which sends two integer values (value1 and value2) and if the sum of these two values is greater than 10, message should be send to receiver ‘Test_A’ else to ‘Test_B’.

Sender message xml.

Let’s base the receiver rule on sum of value1 and value2.

 

Prerequisites:

The objects under software component ‘SAP BASIS’,  namespace ‘http://sap.com/xi/XI/System’ should be available in Enterprise Service Repository (ESR).

  • Data Type: Receivers
  • Message Type: Receivers
  • Service Interface: ReceiverDetermination
Required SAP standard system objects under BASIS software components.
Required SAP standard system objects under BASIS software components.

 

We use data type ‘Receivers’ to populate the list of dynamic receivers determined at runtime.

 

Steps in Enterprise Service Repository (ESR).

 

Step 1: Create Data Type for input XML file format.

Create data type which reflects the XML inbound file format.

 

Step 2: Create Input Message Type.

Create Massage Type of the sender XML file using the Data Type created in step 1.

Create sender message type in ESR
Create sender message type in ESR

 

Step 3: Outbound Service Interface Configuration.

Create sender Outbound Service Interface for XML file.

Outbound Service Interface with sender Message Type attached
Outbound Service Interface with sender Message Type attached

 

Step 4: Dynamic Receiver Determination Message Mapping.

Message mapping to dynamically determine receiver.
Message mapping to dynamically determine receiver.

In the Message Mapping, we need to determine the receiver and assign the value of the receiver to <Service> element in ‘Receivers’ Message Type.

In this example, if the sum of ‘value1’ and ‘value2’ is greater than 10 then receiver should be ‘Test_A’ else ‘Test_B’.

 

Step 5: Create Dynamic Receiver Determination Operation Mapping.

Operation mapping for extended Receiver Determination
Operation mapping for extended Receiver Determination

Dynamic receiver determination’s target operation should be ‘ReceiverDetermination’ inbound interface under namespace http://sap.com/xi/XI/System of BASIS software component.

Next, attach the Dynamic Receiver Determination Message Mapping we created in Step 4.

 

Steps in Integration Directory (ID).

 

Step 6: Configure Inbound Processing.

Integration Configuration Object Inbound Processing Configuration
Integration Configuration Object Inbound Processing Configuration

XML sender channel assigned to ICO.

 

Step 7: Configure Extended Receiver Determination.

Integration Configuration Object Type of Receiver Determination - Extended
Integration Configuration Object Type of Receiver Determination – Extended

Check the option Extended in Type of Receiver Determination, then assign the Receiver Determination Operation Mapping we created in step no 5. Finally, list the possible receivers.

 

Step 8: Set receiver Interfaces and Operation Mappings.

Integration Configuration Object - Receiver Interfaces and Operation Mapping
Integration Configuration Object – Receiver Interfaces and Operation Mapping

Configure Receiver Interfaces and Operation Mappings for each receiver. Since I am not transforming the input XML file in this example, I have used Dummy Interfaces. But if you are required to transform the message to different formats, create operation mappings and message mappings accordingly.

 

Step 9: Configure Outbound Communication Channels.

Integration Configuration Scenario - Outbound Processing for Receiver A
Integration Configuration Scenario – Outbound Processing for Receiver Test_A

 

Integration Configuration Scenario - Outbound Processing for Receiver B
Integration Configuration Scenario – Outbound Processing for Receiver Test_B

 

Test Integration Configuration Scenario.

When total is less than 10.

 

Receiver is dynamically assigned at runtime as Test_B.

Message delivered to receiver Test B
Message delivered to receiver Test_B

 

When total is greater than 10.

 

Receiver is dynamically assigned at runtime as Test_A.

Message delivered to receiver Test_A
Message delivered to dynamic receiver Test_A

 

If you have any queries on Extended Receiver Determination, please leave a comment below.

Add a Comment

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