How to use Receiver Rule in PI 7.1


SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

How to use Receiver Rule in PI 7.1

How to use Receiver Rule in PI7.1

Scenario:

Suppose scenario is File to IDOC. PI will receive all customer details through file and PI will send this to IDOC to different system. All customers with Country US should go to system A and all customers with Country India should go to system B and so on, so here we need determine receiver business system on value of field Country..

How we can use Receiver Rule in above scenario..

Receiver Rule step by step

Create Data type “CustomerDetails” for File sender

Create Message type ”MTCustomerDetails”

Create Context Object: “Country”

To create Context Object go to Create ObjectàInterface ObjectsàSelect Context Object and click ok create object provide name “Country” and reference type as “string”

Now create outbound service interface as following

Click on Context object in service interface to assign context object to Field from service interface.

Assign “Country” Context object in front of field “Country”  as shown below you can select Context object by taking search help here..

Now create your Mapping and other objects..

ID side configuration:

Inside Configuration scenario create Receiver rule object as following

To create Receiver rule object

And now provide conditions to this same as xpath condition as following

And then select the receiver system for this condition.

As in our case if Country= India then we need to send message to SystemB as following

And so on add as many conditions as you want

Now here you can add as many conditions as you want…and can assign respected Business system.

Now after this create Receiver determination as following

SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

Now configure your remaining object like Interface determination, sender agreement , and receiver agreement

Advantages of Receiver Rule over normal Condition based routing is as following

  • Working of Receiver Rule is same as working of Condition based receiver determination the only but the difference is in case of Receiver Rule we need not have to configure these conditions rules for each and every receiver determination for every interface. Instead we will configure this at separate Receiver Rule object and which we can reuse in different scenarios.
  • So it will be easy to maintain and support in future. In future if you want to change the condition just change it at one place and it will reflect in all places wherever this Receiver Rule object is used.

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 sap pi 7.1 tutorials and tagged . Bookmark the permalink.

Leave a Reply

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