How to Configure and Execute User Defined Message Search SAP NetWeaver How-To Guide

SAP NetWeaver
How-To Guide
How to Configure and Execute User
Defined Message Search
Applicable Releases:
SAP NetWeaver Process Integration 7.3x and higher
Topic Area:
SOA Middleware
Capability:
SOA Management
Version 1.0
April 2012
© Copyright 2012 SAP AG. All rights reserved.
No part of this publication may be reproduced or
transmitted in any form or for any purpose without the
express permission of SAP AG. The information contained
herein may be changed without prior notice.
Some software products marketed by SAP AG and its
distributors contain proprietary software components of
other software vendors.
Microsoft, Windows, Outlook, and PowerPoint are
registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, OS/2, Parallel
Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390,
OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP,
Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix,
i5/OS, POWER, POWER5, OpenPower and PowerPC are
trademarks or registered trademarks of IBM Corporation.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader
are either trademarks or registered trademarks of Adobe
Systems Incorporated in the United States and/or other
countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered
trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame,
WinFrame, VideoFrame, and MultiWin are trademarks or
registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or
registered trademarks of W3C®, World Wide Web
Consortium, Massachusetts Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems,
Inc., used under license for technology invented and
implemented by Netscape.
MaxDB is a trademark of MySQL AB, Sweden.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP
NetWeaver, and other SAP products and services
mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP AG in
Germany and in several other countries all over the world.
All other product and service names mentioned are the
trademarks of their respective companies. Data contained
in this document serves informational purposes only.
National product specifications may vary.
These materials are subject to change without notice.
These materials are provided by SAP AG and its affiliated
companies ("SAP Group") for informational purposes only,
without representation or warranty of any kind, and SAP
Group shall not be liable for errors or omissions with
respect to the materials. The only warranties for SAP
Group products and services are those that are set forth in
the express warranty statements accompanying such
products and services, if any. Nothing herein should be
construed as constituting an additional warranty.
These materials are provided “as is” without a warranty of
any kind, either express or implied, including but not
limited to, the implied warranties of merchantability,
fitness for a particular purpose, or non-infringement.
SAP shall not be liable for damages of any kind including
without limitation direct, special, indirect, or consequential
damages that may result from the use of these materials.
SAP does not warrant the accuracy or completeness of the
information, text, graphics, links or other items contained
within these materials. SAP has no control over the
information that you may access through the use of hot
links contained in these materials and does not endorse
your use of third party web pages nor provide any warranty
whatsoever relating to third party web pages.
SAP NetWeaver “How-to” Guides are intended to simplify
the product implementation. While specific product
features and procedures typically are explained in a
practical business context, it is not implied that those
features and procedures are the only approach in solving a
specific business problem using SAP NetWeaver. Should
you wish to receive additional information, clarification or
support, please refer to SAP Consulting.
Any software coding and/or code lines / strings (“Code”)
included in this documentation are only examples and are
not intended to be used in a productive system
environment. The Code is only intended better explain and
visualize the syntax and phrasing rules of certain coding.
SAP does not warrant the correctness and completeness of
the Code given herein, and SAP shall not be liable for
errors or damages caused by the usage of the Code, except
if such damages were caused by SAP intentionally or
grossly negligent.
Disclaimer
Some components of this product are based on Java™. Any
code change in these components may cause unpredictable
and severe malfunctions and is therefore expressively
prohibited, as is any decompilation of these components.
Any Java™ Source Code delivered with this product is only
to be used by SAP’s Support Services and may not be
modified or altered in any way.
i
Document History
Document Version
Description
1.00
First official release of this guide
ii
Typographic Conventions
Icons
Type Style
Description
Example Text
Words or characters quoted
from the screen. These
include field names, screen
titles, pushbuttons labels,
menu names, menu paths,
and menu options.
Caution
Cross-references to other
documentation
Example
Example text
Emphasized words or
phrases in body text, graphic
titles, and table titles
Example text
File and directory names and
their paths, messages,
names of variables and
parameters, source text, and
names of installation,
upgrade and database tools.
Example text
User entry texts. These are
words or characters that you
enter in the system exactly as
they appear in the
documentation.
<Example
text>
Variable user entry. Angle
brackets indicate that you
replace these words and
characters with appropriate
entries to make entries in the
system.
EXAMPLE TEXT
Keys on the keyboard, for
example, F2 or ENTER.
Icon
Description
Important
Note
Recommendation or Tip
iii
Table of Contents
1.
Introduction .......................................................................................................................... 1
2.
Business scenario ............................................................................................................... 1
3.
Prerequisites ........................................................................................................................ 2
4.
5.
2.1
Roles ............................................................................................................................. 2
2.2
Software ........................................................................................................................ 2
2.3
Objects .......................................................................................................................... 2
2.4
Relevant SAP Notes ..................................................................................................... 2
Configuration Overview ...................................................................................................... 2
4.1
Define Filters................................................................................................................. 2
4.2
Define Search Criteria .................................................................................................. 2
4.3
Define Namespace prefixes ......................................................................................... 3
4.4
Index Messages............................................................................................................ 3
4.5
Test Search Criteria ...................................................................................................... 3
Configuration steps in Integration Engine ........................................................................ 3
5.1
Define Filters................................................................................................................. 3
5.2
Define Search Criteria .................................................................................................. 4
5.3
Defining Namespace Prefixes ...................................................................................... 5
5.4
Test Search Criteria ...................................................................................................... 5
6.
Execution in Integration Engine ........................................................................................... 6
7.
Configuration steps in Adapter Engine.............................................................................. 10
7.1
Create Filters .............................................................................................................. 11
7.2
Define Search Criteria ................................................................................................ 11
7.3
Define Namespace Prefixes ....................................................................................... 12
7.4
Activate Filter .............................................................................................................. 13
7.5
Index Messages.......................................................................................................... 13
7.6
Test Search Criteria .................................................................................................... 14
8.
Execution in Adapter Engine .............................................................................................. 14
9.
Appendix ............................................................................................................................... 18
9.1
Help Documentation ................................................................................................... 18
iv
How To Configure and Execute User Defined Message Search
1.
Introduction
User Defined Message Search enables to search for asynchronous messages using the information
available in payload or adapter-specific message attributes. Payload search is integrated in local
message monitoring of both Integration engine and Adapter Engine. Payload fields are extracted
during message processing and are stored in an index table for the messages that meets the filter
criteria which is described in detail in section 3.
Index are archived together with message, Indexed fields can also be displayed in message based
alerts. User defined attributes are displayed for each message if it is configured. Using User defined
message search, messages can be searched for one attribute or for more than one attribute.
2.
Business scenario
Material master details are transferred from SAP ERP System to a legacy system using Process
Integration.
Figure 1: Business Scenario
At a later point of time, user wants to check a message status or the contents of a message processed
earlier with a particular material number in payload.
This can be achieved using the user defined message search feature available in Process Integration.
Figure 2: User Defined Message Search Process flow Diagram
May 2012
1
How To Configure and Execute User Defined Message Search
3.
Prerequisites
2.1 Roles
Users should have assigned to one of Process Integration monitoring roles, for more information about
roles check Monitoring Roles.
2.2 Software
SAP NetWeaver PI 7.3 Java Only Installation or
SAP NetWeaver PI 7.3 (ABAP + Java) Installation or higher is installed.
2.3 Objects
An asynchronous scenario in working condition with all the required objects created in Enterprise
Service Repository and configured in Integration Directory.
2.4 Relevant SAP Notes
1424832- Include User-Defined Search Attributes in XI Alerts
1247043- Release Restrictions for EHP 1 for SAP NetWeaver PI 7.1
4.
Configuration Overview
User Defined Message Search can be configured locally on each component:

NWA for Adapter Engine

SAPGui for Integration engine
Steps to configure UDMS in IE and AE:
4.1
Define Filters
Filters are created by specifying Service Interface, Sender and Receiver details to search messages.
4.2
Define Search Criteria
For each filter, search criteria have to be created by specifying which elements of the payload or the
dynamic header to be searched.
There are two types available here to choose:

XPath
This type of Search Criteria uses an XPath expression to search for attributes in the main
payload of a message

Dynamic Header
May 2012
2
How To Configure and Execute User Defined Message Search
This type of extractor searches for adapter-specific message attributes. These are
identified by interface name and namespace.
4.3
Define Namespace prefixes
For each filter, namespace prefix has to be defined instead of specifying a namespace in XPath
expressions. It can be used it for all search criteria of type XPath for this filter.
4.4
Index Messages
Choose Indexing Options to create an index of the messages that match the active filters and search
criteria. This index is used to find messages in the message monitor with a user-defined search. Start
and end date of the period for which messages should be indexed are specified here. After the
indexing starts, you can check whether the indexing job has been completed using the Indexing
Status button.
4.5
Test Search Criteria
To test if a search criteria can locate a particular message as intended.
5.
Configuration steps in Integration Engine
To configure UDMS for messages processed on Integration Engine, Logon to Integration Engine client
of PI and go to Transaction „SXMS_LMS_CONF„.
Figure 3: Open Tn. SXMS_LMS_CONF
5.1 Define Filters
Choose Add in the Filter section and specify the required selection criteria like Interface, Sender
Component and Receiver Component.
May 2012
3
How To Configure and Execute User Defined Message Search
Figure 4: Create filter
Choose continue then the new filter appears in the filter list.
Note: Filter can be activated only if the search criteria are defined for this filter.
5.2 Define Search Criteria
Search criteria have to be created for each filter.
To create Search Criteria, proceed as follows:
1. In the filter list, double-click the filter for which Search criteria have to be defined.
Figure 5: Define Search Criteria
May 2012
4
How To Configure and Execute User Defined Message Search
2. Specify the XPath expression for the field to be used for searching messages.
3. Message indexing happens based on the following methods selected here.

Extract During Message Processing
Select this method if the attributes to be extracted from the selected messages when the
messages are processed.

Extract with External Job
Select this method to extract attributes from messages that were already processed, or if
there is any change in attributes of search criteria of extracted message. For this method,
Execute report „SXMS_EXTRACT_MESSAGES‟.
4. Choose Continue. Then new search criteria will appear in the list of search criterias for the selected
filter.
Note: The Search Criteria is only active if at least one of the two available methods is selected.
5.3 Defining Namespace Prefixes
Choose add and specify the Prefix for the namespace.
Figure 6: Define Namespace Prefix
Choose Continue. Then the new namespace prefix will appear in the list of namespace prefixes for the
selected filter
5.4 Test Search Criteria
Click on Test Search Criteria and Enter Message id of already processed message for this filter.
Figure 7: Test Search Criteria
Choose Continue to test if search criteria extracts attributes from a particular message as intended.
May 2012
5
How To Configure and Execute User Defined Message Search
Then Extractor Log will be displayed with the values found for the attributes of filter.
Figure 8: Display Extraction Log
6.
Execution in Integration Engine
The message monitoring for messages processed on Integration Engine can be accessed in
transaction SXI_MONITOR.
Figure 9: Open Tn. SXI_MONITOR
6.1 Search for one attribute
Open the tab User-Defined Selection Criteria and using input help enter one relevant UDMS selection
criteria.
May 2012
6
How To Configure and Execute User Defined Message Search
Figure 10: Maintain User Defined selection Criteria for one attribute
Click on Execute. List of messages satisfies the selection criteria are listed.
Figure 11: Choose Attribues for a message
Select the message and click on „Attributes‟ to see the User-defined Attributes.
Figure 12: Display Attributes
May 2012
7
How To Configure and Execute User Defined Message Search
6.2 Search for multiple attribute
Using input help enter one or more relevant UDMS selection criteria in „User-Defined Selection
Criteria‟ tab.
Figure 13: Maintain User Defined selection Criteria for one or more attribute
Click on Execute. List of messages satisfies the selection criteria are listed.
Figure 14: Display User defined Attributes
Select the message and click on „Attributes‟ to see the User-defined Attributes.
May 2012
8
How To Configure and Execute User Defined Message Search
6.3 Search messages with wildcard
Using input help choose attribute name and enter value with wildcard „*‟ if part of the value is known.
Then click on Execute. List of messages satisfies the selection criteria will be listed.
Figure 15: Maintain User Defined selection Criteria for attribute with widcard
Select the message and click on „Attributes‟ to see the User-defined Attributes.
Figure 16: Display User Defined Attributes
May 2012
9
How To Configure and Execute User Defined Message Search
7.
Configuration steps in Adapter Engine
User defined message search configuration page for Adapter Engine can be accessed by either of the
following:
Open a browser and go to http://[host]:[port]/nwa to access SAP NetWeaver Administrator. Then
choose SOA Monitoring -> PI Adapter -> User-Defined Message Search.
(Or)
Open a browser and go to http://[host]:[port]/dir to access the Process Integration tools.
Figure 17: Process Integration Tools Page
Then choose -> Configuration and Administration -> Adapter Engine -> User-Defined Search
Configuration.
Figure 18: Open User Defined Search configuration Page
May 2012
10
How To Configure and Execute User Defined Message Search
7.1 Create Filters
1. Click on new button to create a new filter
2. Specify the sender, receiver details. It is mandatory to enter the interface and namespace.
When needed, more than one filter can be created for the same interface.
3. Set the status of the filter to Active.
Figure 19: Create Filter
4. Choose Add and then Save.
7.2 Define Search Criteria
1. Select the filter for which search criteria has to be defined and choose the Search Criteria tab.
2. Choose New to create new search criteria.
3. Enter a name and optionally a description.
4. Enter XPath Expression to search for particular attribute in the message payload.
May 2012
11
How To Configure and Execute User Defined Message Search
Figure 20: Define Search Criteria
5. Choose Add and then Save.
7.3
Define Namespace Prefixes
1. In the filter list, select the filter for which namespace prefix has to be defined.
2. Choose the Prefixes tab and then choose New.
3. Enter the namespace and the prefix.
Figure 21: Define Namespace Prefix
4. Choose Add and then Save.
May 2012
12
How To Configure and Execute User Defined Message Search
7.4
Activate Filter
Click on Activate to activate the filter.
Figure 22: Activate Filter
7.5
Index Messages
1. Choose Indexing Options to create an index of the messages that match the active filters and
search criteria.
2. Specify the start and end date of the period for which messages should be indexed.
3. Then click on start indexing.
Figure 23: Index Messages
After starting index, Indexing status can be used to check the status of indexing job whether it is
completed or running.
May 2012
13
How To Configure and Execute User Defined Message Search
7.6
Test Search Criteria
Choose Test Search Criteria, enter the ID of the message, specify the direction of the message, and
run the test.
8.
Execution in Adapter Engine
The message monitoring for messages processed on Adapter Engine can be accessed either via the
NetWeaver Administrator (NWA) or via the Monitoring Home page.
Option 1: Open the NWA Message Monitoring via http://<host>:<port>/nwa -> SOA tab -> Monitoring > Message Monitoring.
(Or)
Option 2: On the Monitoring Home page, switch to tab Adapter Engine below tab Monitoring, and
select link Message Monitoring.
Figure 24: Open Message Monitor page
In the NWA Message Monitoring go to the tab “Database” and click on “Advanced” search section.
May 2012
14
How To Configure and Execute User Defined Message Search
Figure 25: Choose Advanced in message monitor page
Choose User defined Search criteria. To add search criteria, choose Add Pre-defined or Add Custom.
The first option allows to choose an interface and one of its search criteria. The second option allows
to simply enter the name of a search criteria.
8.1 Search for one attribute
Choose Add Predefined and enter the values for the attributes defined.
Figure 26: Add a predefined Search Criteria with Value
May 2012
15
How To Configure and Execute User Defined Message Search
Then click on go to search messages.
Figure 27: List of messages displayed
Select the message and open User Defined Attributes tab to check Attributes and its values.
Figure 28: Display User defined attributes
May 2012
16
How To Configure and Execute User Defined Message Search
8.2 Search for more attribute
Add one or more attributes with values and choose search for all values in menu.
Figure 29: Maintain one or more attributes with values
Figure 30: Display list of messages satisfies the search criteria
The system searches for all messages that have all of the corresponding message parts with the
specified values.
Check tab User-Defined Attributes for the attributes and its values.
Figure 31: Display User Defined Attributes
May 2012
17
How To Configure and Execute User Defined Message Search
9.
Appendix
9.1 Help Documentation
Configuring the User-Defined Message Search in Integration engine.
http://help.sap.com/saphelp_nw73/helpdata/en/48/c85598f63335bfe10000000a42189d/frameset.htm
Configuring the User-Defined Message Search in Adapter engine.
http://help.sap.com/saphelp_nw73/helpdata/en/48/b2e0186b156ff4e10000000a42189b/content.htm
May 2012
18
www.sdn.sap.com/irj/sdn/howtoguides