How often have you been asked to search through a set of messages for a particular value in the payload? Well, I suppose quite often. It is actually achievable with a little effort. This guide is here to help! 🙂
Let me explain what steps need to be done. There are 3 of them:
- Define custom filter in SXMS_LMS_CONF transaction.
- Index processed messages so the payload is accessible to your filter.
- Invoke your custom-made filter in SXI_MONITOR
- Go to t-code: SXMS_LMS_CONF
2. Create Filter as shown in below screenshot. You need to provide Name for the filter, namespace. If necessary you can also provide Party or Communication Components for sender or receiver side. Make sure to check filter ‘active’ in the left bottom corner of the pop-up window.
3. Create Search Criteria as shown below. Double-click on the filter to mark it and create a search criteria. Provide name, xpath to the element you want to search through and mark both boxes in the bottom of the window.
4. Define namespace prefixes. To do so, provide the prefix and namespace of messages you want to search through. The easiest way to dodge mistakes it so fill in required fields in steps 1- 3 according to sample message you’re building your search criteria to.
Once you complete your custom configuration in SXMS_LMS_CONF, before being able to use your selection criteria, you need to index processed messages. If you can’t see any result trying to use your user-defined selection criteria in sxi_monitor you most probably skipped below steps. Follow them and then try again:
- Go to SE38 and run report SXMS_EXTRACT_MESSAGES.
- Provide time interval or range for messages to be indexed. Additionally you can fill in another filters available in the report to narrow down the range of messages to be indexed. In the end, press ‘Execute’ (F8).
Now you’re ready to test.
Running your custom filter in SXI_MONITOR
- Go to SXI_MONITOR, tab User-Defined Selection Criteria. In field name provide given filter name. Value to be found should be put in self-explanatory field Value 🙂
2. After executing search you should see the list of messages which contain requested value.
Find more awesome tutorials on lessonslearnedsap.com
Here is a link to part 2 of this guide (java stack).