User-Defined Message Search
In previous SAP XI or PI releases, it was really hard to search on a specific value within a message payload. I once extended the XI monitor on an ABAP stack to accomplish this. It worked, but took some time and was not a standard solution.
Now, in our SAP PO 7.4 system, it is really easy to accomplish this and it is standard available.
This is just a small blog to walk you through the different steps.
Create a filter
Go to Monitoring Home (http://<host>:<port>/pimon) -> Configuration and Administration tab -> Adapter Engine -> User-Defined Message Search Configuration, and create a new filter.
You can choose freely for which interfaces you want to create a filter. Just make sure to set the filter to active.
Define search criteria
Create a new search criteria using an XPath expression. Provide a name and a description.
Use an XPath expression or choose header fields. In case you choose for an XPath expression, do not forget to indicate possible namespace prefixes.
Just to be sure, check how a specific message enters the system and see if namespace prefixes are involved.
Indexing options
In case you want to use the filter for older messages, make sure you create an index.
If the index is not set, only messages being processed after the filter creation are taken into account.
Restrictions
Currently, the search term is case-sensitive. I still need to investigate if this is a bug or a configuration problem.
Usage
Go to the Message Monitor screen -> Database tab -> Advanced (on the right-hand side).
If you are just on the database tab, looking at all messages, and you click on a message having a search attribute, an extra tab appears on the bottom of the screen:
Nice One Dimitri !!!
Had fun learning this one 🙂
Nice blog. What will be the impact on System Performance if we configure the user defined message search for a specific interface? Any decision making factors on determining the maximum no of user defined search one can configure in the Production server?
Hi Dimitri,
I tried implementing as stated but I am not getting extra tab(UDS) in message monitoring.
Enabled the indexing option as well.
Please suggest, what I am missing.
Thanks,
Nidhi
As far as I remember, the xpath expression is very sensitive and needs to be correct.
If I'm not mistaken, you can test this before using the search
I took the xpath by selecting from receiver determination condition in ICO. Copied and pasted it here. Since, this is IDoc not sure if prefix need to be added or not.
There are dozens of online tools where you can test your xpath expression with the actual payload of your message and see if it's correct or not. Try to use them first.
Hi Dimitri,
1) For outbound the requirement is like we need the PO Number from the path - E1EDK02_BELNR when the E1EDK02_QUALF=002, so can we handle this anyhow?
2) For inbound IDoc Number, The IDOC will be posted in ECC system so if we want the details of the IDOC number can we get that? I tried by using the target path but it didn't worked. Is this not possible?
Please let me know your inputs.
Thanks,
Nidhi Srivastava
Hi,
1. I guess this is feasible.
2. I guess the IDOC number is assigned on your ECC system. To get that back, I guess you need to work with something like ALEAUD.
Kind regards,
Dimitri
Hi Nidhi,
By any chance were you able to implement the first point?
Regards,
Asma
Can you unhide those prefixes you setup? I found defining the prefix and xpath the most confusing part of the search. Hiding those makes this blog a lot less helpful.