Skip to Content
Author's profile photo Michal Krawczyk

Michal’s PI tips: How to use User Defined Message Search from external applications in PI 7.3 ?

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.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Andy Silvey
      Andy Silvey

      Hi Michal,

      excellent blog as usual.

      Thank you.

      All the best,


      Author's profile photo Agasthuri Doss
      Agasthuri Doss

      Thanks Michal,

      Another excellent blog from your end.. Thanks for sharing with us.



      Author's profile photo Nageshwar Reddy
      Nageshwar Reddy

      Nice one Michal. Thanks tor sharing. J

      ust curious to know if you used this or similar approaches in customer landscapes?

      Author's profile photo Michal Krawczyk
      Michal Krawczyk
      Blog Post Author


      no, mate - I only remember requirements like that on SDN forum and me saying - "no it's not possible" hence the blog - to show that it is possible 🙂


      Michal Krawczyk

      Author's profile photo Former Member
      Former Member

      Hi Michal

      Has SAP provided any standard web service to fetch the UDMS values .



      Author's profile photo Former Member
      Former Member

      Hi Michal,

      Assuming you're using the SFTP adapter to get all xml files setting it as * to. How can you define a filter on it's filename? Other filters I have are working except for filename (which i want to include as well).

      I have defined it as:

      Nothing was populated. Not sure if this approach is feasible.



      Author's profile photo Former Member
      Former Member

      Hi all,

      Could anyone please elaborate where in PI server can we find the above mentioned tables XI_AF_LMS_EXTRACTOR, XI_AF_LMS_DATA & XI_AF_LMS_FILTER.

      I am new to PI single stack & hence having trouble in getting accustomed.

      Appreciate your kind response.



      Author's profile photo Sendhil Kumar
      Sendhil Kumar

      Hi Former Member,

      Did you find how to access the table, I am looking for similar information. Please let me know if you have got some leads.



      Author's profile photo NarayanaSwamy Mariyala
      NarayanaSwamy Mariyala

      Hi Michal,

      Exceptional blog!

      I would like to call the  XI_AF_LMS_DATA table using JDBC lookup to check the UDS entries in mapping.

      Is it recommended?