How to filter messages in SAP PI/PO Robot based on values from the payload

Test Cases created automatically from SAP PI/PO Robot can be filtered based on the Payload. Thanks to this, it is possible to save only test cases with specific Payload values and match and save them to a particular Int4 IFTT folder.

In our example, we will prepare SAP PI/PO Robot to filter messages based on the customer number sent in the EDI flat file:

 

Steps:

  1. As a first step you have to define the variable in the Int4 IFTT Automation Object.
    Based on our example variable CUSTOMER will be filled based on the flat file expression shown below.
    In case your payload is a XML file - you have to use XPATH expressions instead.

     

  2. Next, in the SAP PI/PO Robot, you have to define the environment from which messages will be taken and other selection criteria. The main place where you can configure message filtering based on Payload is the The main place, where you can configure message filtering based on payload is the Open Extended Configuration.


3. Here, you can define for which interface you want to apply the filtering.

  • In the Test Case Folder, you have to manually type the name of the folder, to which messages will be saved, if they meet the conditions.

  • In the Variable Name, you have to provide a variable from the Int4 IFTT Automation Object created in step 1.

  • In the Value, you have to type the value from the Payload that fulfills the filtering requirement.

You can define up to 5 variables and conditions based on which filtering will take place.

Based on our example, all messages from EDI_SPLIT interface will be checked, and only the messages with customer value equal to 00555300, 00555100, or 00500100 will be saved as test cases. In addition, messages for each customer, based on the defined variable, will be saved to different folders.

4. Then, you have to provide a Target Folder and define New Test Case Name Pattern.
In our example, test cases will consist of the interface name, sender, and Customer Number.

 

5. After execution, you can verify whether new test cases were found based on the defined criteria and if they were created.

Based on our example, 15 messages were found in the PI/PO, and they have been automatically added to new folders. As you can see in the example below, all messages per customer number are separated into different folders.

 

 

© 2017 - 2022 Int4 AG All rights reserved