
When you know what information is available in the payload of a message or its dynamic header, you can find such a message using the user-defined search feature. The process of finding messages with this feature is the following:
Define what kind of information you want to search.
Create filters and define search criteria. First you create a filter where you specify for which interface, sender, and receiver you want to search messages. Then you create search criteria for each filter. For each search criterion, you specify in which elements of the payload or the dynamic header you want to search.
Index the messages.
The system starts indexing messages for a filter from the moment the filter is created. If you want to index older messages processed by the system before creating the filter, use the available option for indexing messages for a specified period of time.
In message monitor, choose search criteria, and specify the values you want to find.
To do this in the message monitor you should have at least one filter available. The system checks the index and displays only the messages that correspond to your search criteria. For more information, see Advanced Message Search .
The user account you use should be assigned to one of the Process Integration monitoring roles. For more information about which roles allow you to view and modify messages, see Monitoring Roles .
To use the user-defined search functionality for synchronous messages you need to activate logging of these messages. For more information, see
Saving Message Versions in the AAE (Local Message Processing) and
SAP Note
1760915
.
1. Prepare Test Messages
Prepare at least one test message that contains the payload to be indexed. Make sure that this message is processed successfully and, that you see it in the NWA Message Monitor. Open it with the NWA Message Editor and make sure that it has a version that includes the payload you target for indexing. For optimal performance make sure that you configure it as few message staging and logging versions as possible. Mark down the exact header data for the specific message version that you target for indexing as you will need them in the next steps.
2. View Filters
Do one of the following to access the user-defined configuration options:
Open a browser and go to http://[host]:[port]/pimon to access the Process Integration tools. Then choose .
Open a browser and go to http://[host]:[port]/nwa to access SAP NetWeaver Administrator. Then choose .
Use the following options in the List of Filters screen area to display the filters:
Use the Show dropdown menu to display the active, inactive, or all filters.
Use the controls on the right to refresh the filter list, show, or hide the search or filtering options, and select the size of the table displaying the filters.
3. Create Filters
Do one of the following:
To create a new filter, choose the New button.
To edit existing filters, select them in the table and choose the Edit button.
You can select many filters by holding the Ctrl or Shift key.
Enter or modify the filter details as follows:
It is mandatory to enter the interface and namespace. If needed, you can create more than one filter for the same interface.
Set the status of the filter.
For new filters, it is mandatory to enter the name of the filter.
Optionally, enter details about the sender and the receiver.
The system does not display the input values for messages that are marked sensitive in Enterprise Services Repository as these messages contain confidential information.
Choose Add to finish modifying the filter.
Optionally, you can create new filter, or modify or delete some of the filters displayed in the list of unsaved filters.
Choose Save .
4. Define Search Criteria
Select the filter for which you want to define search criteria and choose the Search Criteria tab.
Choose New to create new search criteria.
If you want to edit some of the existing search criteria for this filter, select them and choose Edit .
For new search criteria, enter a name and optionally a description.
Select one of the following options for the type of the search:
Choose Dynamic Header if you want to search for additional information written to the message header by sender adapters. Enter the header and its namespace.
Choose XPath Expression if you want to search for information in a particular element or attribute inside the message payload.
<urn: OrderReqMT xmlns:urn="urn:test">
<Order>
<ID>1</ID>
<Name>nuts</Name>
</Order>
</urn: OrderReqMT>
You would use XPath: //ns0: OrderReqMT/Order/ID and prefix definition with value: ns0 and namespace: urn:test.
Enter the XPath expression using the rules of version 1.0 of the XPath
language. For more information, see http://www.w3.org/TR/xpath/
.
Choose Custom Dynamic Header if you want to search for additional information written to the message header by the users through channel modules. Enter the header and its namespace.
Choose Add to finish modifying the search criteria.
Optionally, you can create new criteria, or modify or delete some of those displayed in the list of unsaved search criteria.
Choose Save .
5. Define Namespace Prefixes
You can use a namespace prefix instead of a namespace in XPath expressions. You always define a namespace prefix for a given filter. You can then use it for all search criteria of type XPath for this filter. To define a namespace prefix, proceed as follows:
In the filter list, select the filter for which you want to define the namespace prefix.
Choose the Prefixes tab and then choose New .
Enter the namespace and the prefix and choose Add .
You can optionally define new prefixes or delete some of the unsaved prefixes.
Choose Save.
6. Index Messages and Test Search Criteria
The test result maintains the order of the attributes in the payload.
The system does not display the messages that are marked sensitive in Enterprise Services Repository while performing a search.
If the message is not stored in the Advanced Adapter Engine either after the receiver determination phase or the mapping phase, the system does not display the message in the test results.
For more information, see Saving Message Versions in the AAE (Local Message Processing)
Consider that the system indexes automatically messages for a filter from the moment the filter is created. You can use the Indexing Options feature when you want to index older messages processed by the system in a specific period of time before creating the filter.
Specify the start and end date of the period for which messages should be indexed. After the indexing starts, you can check whether the indexing job has been completed using the Indexing Status button.
7. Troubleshooting
The user-defined search is one of the many ways to find messages in the Advanced Adapter Engine using the message monitor. For more information, see Monitoring Messages .
The user-defined search is also available for searching messages in the Integration Engine. You can configure it using transaction SXMS_LMS_CONF. For more information, see the documentation of the Integration Engine.
For more information about how to activate logging of synchronous messages, see
http://wiki.sdn.sap.com/wiki/x/qQF8Dw
.