PI 7.3 – Adapter User-Defined Message Search without TREX
This blog will explain how to configure and monitor user defined message search for an AEX installation (PI Adapter User-Defined Message Search). The user-defined search is one of the many ways to find messages in the Advanced Adapter Engine using the message monitor without the use of TREX.
Configuration:
Procedure:
User Defined Message Search could be accessed in one of the following ways:
- Open a browser and go to http://<host>:<port>/pimon to access the Process Integration tools
- Then choose Configuration and Administration >> Click User Defined Message Search
(Step 1): Create a New Filter
- Now click on the new button to create a filter and provide the values for required fields along with sender and receiver components as shown below. All the values will be available via drop down (search help).
- Enter all the values and Click Save.
Note: The Filter Name can be specified by the User (Eg Test Filter 1, Test Filter 2 or IDOC Search 1)
(Step 2): Enter the Search Criteria as below
- Now we need to create the search criteria for this filter (in the details section).
- Enter Name as “IDOC”
- Select Type as “XPath Expression
- Enter XPath* as /CREMAS03/IDOC/EDI_DC40/DOCNUM (eg.)
- XPath path will vary from one IDOC to another.
- Click Save
The configuration is complete. Now check if the Filter is Active.
(Step 3): Testing Filter Configuration
- Now we can test our filter configuration by using the Test Search Criteria button. Give any message ID relavent for the above Filter.
- Using Message ID, We can retrieve the relevant search result ( In our case, DOCNUM )
(Step 4): Message Monitoring – User Defined Search:
- Now to search any IDOC for the Interface we have already configured in the filter.
- Navigate to the Message Monitoring section In the Message Monitoring->Database>> Advanced >> User Defined Criteria. Make sure the time period is appropriate for the search.
- Check the List Box User-Defined Search Criteria
- Select the configured search filter from the list
- Enter the IDOC number in the Value field to search
- Click OK
Search Result:
- Using IDOC Number (Predefined), we have retrieved Message ID with relevant message details.
Important things to remember:
Note:
- For Idocs namespace and message types no need for declaring Prefixes.
- For any other message types we need to configure the namespace prefixes as below:
Suppose the Input XML is as below:
Payload:
Configuration:
- Filter configuration as mentioned earlier.
- Under Search configuration click on the Prefixes Tab and enter the details as below.
- Now define the search criteria and XPath as below.
Hi Suseelan,
thanks for the document. I'm assuming this also applies to any other type of interface (non IDOC)?
You mention the option of indexing. Does this mean that without configuration the search attributes are not indexed? What kind of impact does this indexing have on the perfomance of the operational PI system?
Thanks is advance
Marcel Rabe
Hi Marcel,
Yes it is possible for Non IDOC Interface also. Regarding indexing ensures faster retrieval of data when the time interval is more. It has little performance overheads. Thanks.
Regards,
Hari Suseelan
I decided slightly to expand this article: our task was to search for messages after mappings (for inbound messages), because outbound contained only binary code and making search (before mapping) for them was hard and extremely not effective. Moreover, it was necessary to search for messages using only java stack. So what you have to do:
1. For required ICO (integrated configuration) you have to turn on staging - mapping (step AM) or you can do this globally:
2. Configure all steps as for outbound proccessing (step 1 - 4 in this doc), but instead of using outbound interface, you must use inbound one.
Thereafter extractors are written for messages after mapping.
P.S. If you turn on step MS in staging of ICO, you may search for messages both for outbound and inbound attributes.
Hi Alexey,
i am having trouble with user defined message search criteria.
can you kindly ellaborate point number 1. that you have given. what should i do in ICO ?
what is staging? what is turning on step MS in staging of ICO?
I am having problem with before mapping payload i.e., outbound
can you kindly suggest anything.
Thanks,
Nirmal.
Hi Nirmal,
If you look at the last tab of ICO (called advanced settings), you can find different configurations of staging:
Number 1: this a default configuration, means that message will be saved at the receiver configuration step (before mapping). So this way you can use message search only before mapping (outbound step).
Number 2: If you need to use your message search after mapping (for inbound step), you have to turn on staging at mapping step. (And turn off staging at receiver configuration step). This way messages will be saved after mappings. You can find this at RWB/ Pimon message monitoring.
If you need to use message search both for outbound and inbound steps (before mapping and after mapping), you have to turn on both staging (at receiver determination and at mapping step). But be carefull that this way PI will save both messages, and it is more expensive way of logging 🙂
And one more thing, you can do this configurations globally in NWA for all ICO in your PI.
Hope it helps, best regards Alexey Kudryashov.
Thank you Alexey very much for the explanation.
Hi Suseelan,
is it possible to define automatic indexing like in the previous version (ABAP) of PI?
Best regards
Tamas
you can refer my document
http://scn.sap.com/docs/DOC-50601
Good, helps. Thx
This article is great. Very helpful.
Just to add-on to the indexing point, my understanding is that you need to manually run the indexing program first, if you have just created a new filter, but trying to search against the old data in the system.
Else, the filter will automatically take care of indexing on day to day basis and the user/admin doesn't need to worry about it.
Is my understanding right?
Regards,
Prajeet
yes Correct