Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
MichalKrawczyk
Active Contributor

It turnes out that sometimes we need to be able to not only use User Defined Message Search in PI to find related messages on the basis of their content but also to be able to use this functionality outside of our PI system. How can we achive that? We have a standard web service which allows to get the message data on the basis of the message ID as per my article:  PI/XI: how to get a PI message from java stack (AAE) in PI 7.11 from ABAP? but how to get the message ID on the basis of the User Defined Message Search ? We can also do this by creating a simple "select" web service on our PI system. The flow can look like this:

Sync WS (with SOAP adapter) <- ->  PI  <- -> JDBC  (to call PI's DB)

Step 1

Create a User Defined Message Search configuration as per my article:

PI/XI: Selecting messages using the content of the message in SAP PI 7.3 - teaser

Step 2

I named the search criteria - KRAW - as shown in Figure below.

You can easily check that the extractor for search criteria - KRAW exists in table - XI_AF_LMS_EXTRACTOR as shown in the figure below.

Step 3

Now the fun part - on the basis of the extractor's name (KRAW) and the User Defined Message Search's value (in our case - "Michal Krawczyk") we can get the message ID from table XI_AF_LMS_DATA and we can use the message ID to get the content of the message as per my article metioned at the beginning of this blog.

Further notes:

If we need we may also use another table: XI_AF_LMS_FILTER to check that the filter was created from our configuration:

Hopefully soon we will get a web service from SAP which will have the same functionality but in the meantime we can create our own on the basis of the tables metioned here.

9 Comments
Labels in this area