You are on page 1of 20

How to create custom Workcenter Queries in

POWL
With Solution Manager 7.1 SP07

Introduction: This guide describes how you can create own role-based queries in the workcenter
Technical Operations. Queries in the workcenters help you to create predefined views on your data
and to access the data you are interested in quicker and more efficient.
There are several ways to create new queries. The easiest way is to create them directly from the
workcenter. But these queries are only visible for the user that created them. This is not always
what the customer wants. So the queries described in this guide are created in the POWL
framework directly and can be assigned to roles. This way they are visible to all users that have a
specific role.
TABLE OF CONTENTS
Overview over Workcenter Queries .......................................................................................................... 2
Step 1: Find POWL Application and Query Type...................................................................................... 4
Find POWL Application and Query Type by example ................................................................................... 5
Optional: Define Query Category .............................................................................................................. 7
Step 2: Define Query .................................................................................................................................. 9
Create a new Query ..................................................................................................................................... 9
Maintain Query Parameters ......................................................................................................................... 9
Maintain Query Settings ..............................................................................................................................10
Calculated Dates ........................................................................................................................................12
Maintain Layout Variants.............................................................................................................................13
Step 3: Assign Query to an POWL Application .......................................................................................16
Result ........................................................................................................................................................17
Change the Parameters of a Custom Query ............................................................................................19

OVERVIEW OVER WORKCENTER QUERIES


SAP Solution Manager workcenters are based on the POWL (Personal Object Work List) framework. POWL
enables the user to create queries cut out to display exactly the data the user is interested in. A lot of queries
are delivered by default with the SAP Solution Manager workcenters, but it is also possible for users to
create own queries. Usually an end-user would create these queries in the workcenter itself. The
disadvantage of these queries is that they are only visible to the user that initially created them. In the POWL
framework it is also possible to create queries which can be assigned to a specific role. These queries will
then be visible to every user that has this specific role.
To understand how to create a role-based query it is important to understand the different elements a
workcenter consists of. Each workcenter consists of one or more views. A view can contain one or more
POWL applications. Which application is displayed is determined by the type selected in the Type Selection
area. A POWL application is a set of POWL queries based on one or more POWL types.

One POWL application can be used in several workcenters. E.g. the POWL application in the workcenter
Technical Monitoring
System Monitoring
Systems is the same POWL application as the one used in
the workcenter Root Cause Analysis
End-to-End Analysis
Systems. This means, if you create a new
query in this POWL application, it will be visible in all workcenters where this POWL application is used.
The POWL type is based on a feeder class which defines the columns that can be displayed in a query, the
actions (buttons) that a query provides and which selection criteria you have to select data for a query.
Additionally it contains a method that describes how the data for the query is retrieved.

Copyright/Trademark

To create your own query in a specific workcenter view you need to know the POWL application it should be
placed in and also the POWL type for the query. How you can get this information is described in the next
chapters. In this example we will create a new custom query in the workcenter Technical Monitoring
System Monitoring
Systems.

Copyright/Trademark

STEP 1: FIND POWL APPLICATION AND QUERY TYPE


The first step is to decide in which workcenter view you want to add your custom query. Once this is done,
you can now determine the POWL application your query will have to be assigned to.
You can find the POWL application via the URL API Application Manager. The URL API Application Manager
can be accessed via the link:
http://<solman-host>:<solman-port>/sap/bc/webdynpro/sap/urlapi_app_manager
In the URL API Application Manager switch to the tab Groups. Here you find a tree view that contains all
Workcenters which are currently supported for this kind of queries. The tree view has the same structure as
the workcenter would have. Under the workcenter name you find the different views and under the views the
different types of POWL applications you can display in the views. Select the type you want to place your
query in. In our example we select the type Systems. The POWL application can be found in the property
key POWL_APP_ID (marked in orange in the screenshot below).

Now you have to find the POWL query type that can be displayed on this POWL application. This information
can be found in the transaction POWL_TYPER. Search for the POWL application you found out before. You
can use the Position button below the table to jump to it directly.

One application can have assignments to more than one POWL type. As mentioned before, the POWL type
determines the different selection criteria, the columns and the actions for a POWL query. In case an
application has more than one assignment, you might want to check the different query types to check which
one suits your needs best.

Copyright/Trademark

Find POWL Application and Query Type by example


In some cases it is not possible to find a POWL_APP_ID in the URL API Application Manager. In this case
you can also try to find the information by using an example query.
In this example you want to know which application type we have to use for a query in alert inbox.
The easiest way is to get the information from another query which is delivered with alert inbox:

Its best to use a query that doesnt appear in other workcenter applications.
Call transaction POWL_QUERY and search for the query:

Double-click the query. In the field type you find the query type:

Copyright/Trademark

Use this to define your own query as described in the following in this guide. Remember also the query ID, to
find out the correct POWL application for your query. Call transaction POWL_QUERYR and find the query in
the column Query ID:

The Application ID is in the same row in the column Application.

Copyright/Trademark

OPTIONAL: DEFINE QUERY CATEGORY


In this optional step you can create a category for your query. Per default in most of the workcenters the
queries are displayed as tab strips. In this view categories are usually not useful.

This layout can be changed using the Personalize link in the upper right corner of the tab strip. Select the
Layout tab and switch the layout to Link Matrix.

In this view the queries are shown as a matrix of links with and sorted by the categories (if a category is
assigned). This layout can be useful if you have a bigger amount of queries and want to be able to access
them all without scrolling thru the tabs.

To define a category for your query, call transaction POWL_CAT and press the New Entries button.

Enter a technical name and a description for your category and save your changes.

Copyright/Trademark

You will be prompted for a customizing request on saving.

Copyright/Trademark

STEP 2: DEFINE QUERY


Create a new Query
New queries are created using the transaction POWL_QUERY. In this transaction you define the query itself
and also predefined values for selection criteria and query settings.
At first click New Entries to create a new query.

Enter a name and a description for the query. The description will show up as the name of the tab in the tab
strip view in the workcenter. Make sure you select the query type you found out before. You can also select
the refresh type for the query. This defines when the data in the table will be refreshed.

It is recommended to use Manual Only as refresh type. The other refresh types can cause recurring wait
times and should only be used if you use a very quick query or you have a status in your query that needs to
be updated.
Save your query. You will be prompted for a customizing request on saving. The further customizing options
will not be visible until after you saved the query.
Maintain Query Parameters
The next step is to maintain query parameters. The query parameters can be used to define values for the
query to preselect the data. Click the Query Parameters button. When you click the Query Parameters

Copyright/Trademark

button for the first time you will receive a pop-up asking you to enter a BP version. Click NEVER DISPLAY
AGAIN to suppress this pop-up in future.

Now you can add parameters to your query. Which parameters are available depends on the POWL query
type.

Maintain Query Settings


Via the query settings you can determine if your query parameters are changeable later on in the workcenter
and if you want to display a quick maintenance area for the query. Select the button Query Settings to
maintain the query settings.

Copyright/Trademark

If you want to make sure that no-one changes your query at runtime, you should set all parameters to Read
only and Hidden.

To enable users to change the query at runtime using the quick maintenance criteria, you can turn on this
feature by setting the selected parameters as Quick search.

Selecting this option will cause an additional button to appear at runtime, where the user can quickly change
the query parameters.

Copyright/Trademark

Calculated Dates
If your query type includes date selection criteria, you can use the settings for Calculated Dates. This way
you can restrict the time range of the result data dynamically. Our example query doesnt contain any date
selection criteria, so we use another query as an example to explain this particular concept.
The example below shows a query created for Incident Management. This query type contains data fields to
restrict the age of the messages found. In a default query that is assigned to a role you wouldnt want to
make this field static, but keep it generic and show e.g. the messages from the last 10 days.

By clicking on the Calculated Dates button you open a dialog in which all date selection criteria fields are
displayed. Now you can select a reference date.

If your reference date contains a calculation, e.g. Today Minus N Day(s) a second dialog will open, in which
you can enter the amount of days you want to go back.

Copyright/Trademark

After entering the values the date calculated for the query for today is displayed. It will adjust automatically
during runtime.

Save your query.


Maintain Layout Variants
With the layout variants you can create views inside your query. Views are used to save a specific layout
containing e.g. only a subset of the available columns or a filter or sorting.
To be able to maintain layout variant the ICF service powl_master_query has to be activated in transaction
SICF.
In the Maintain Layout application you first see the [Standard View]. This view is provided by the POWL
type. The standard view shows what your query would look like if you call it in the workcenter right now.

Now you can apply a filter on this view by clicking on the Filter link.

Copyright/Trademark

To save this filter as a new view for the query, click on the Settings link. Under settings you can change the
columns that are displayed, you can add a sorting for different columns, add calculations on columns that
contain numbers and change the number of displayed rows etc. After adjusting the view to your needs you
can save it by clicking on Save as

Enter a meaningful name for your new view. You can also make the view the initial view. Then this view will
be the view the user sees when he enters the query.

Click on OK after saving your new view, to close the settings dialog.

Copyright/Trademark

You can close the explorer window with the Maintain Layout application after you finished. Do not forget to
also save your query in the transaction POWL_QUERY to make sure the layout is correctly assigned and
stored to the query.

Copyright/Trademark

STEP 3: ASSIGN QUERY TO AN POWL APPLICATION


Now you have created a new query, but to make this query visible to the users you have to assign it to the
correct application. It is the application you found out in step 1. This assignment is done in the transaction
POWL_QUERYR. Also the assignment of the query to a role is done in this transaction.
Click the New Entries button to create an entry for your query.

Enter the correct application and select your query in the Query ID field. You can optional add a Category for
your query. The sequence number determines where your query will show up in the tab strip or the link
matrix. Make sure that you check the Activate checkbox to activate your query.
If you want to make sure, that your query is only visible if a user has a specific role, add the exact role name
into the Role field.

Save your entries.

Copyright/Trademark

RESULT
The new query you created will now show up in the workcenter you created in for.

It already contains the view we created in the section Maintain Layout Variants.

Additionally you find the Show Quick Criteria Maintenance button that allows the user to change the
selection criteria of the query during runtime.

Copyright/Trademark

When you change to the Link Matrix layout you will also see the category you assigned to your query.

Copyright/Trademark

CHANGE THE PARAMETERS OF A CUSTOM QUERY


Occasionally you might want to change the search parameters for your custom query or you want to change
the search fields. However after you made the change you will not see your changes in the workcenter,
when you try to test your changes with a user that already used the custom query.
First you have to delete the query cache for the user to be able to see the changes to the query in the
workcenter.
For example you have changed the parameters in the customer query Only Alerts for SI7

When a user calls the workcenter for the first time an entry for this query is created in the query cache. To be
able to see changes to the pre-defined query delete the cache with report POWL_D01.
Call transaction SA38 and run report POWL_D01:

Run it for the user in question in DISPLAY mode:

Copyright/Trademark

You get a list with all cached queries for the user. Sort by query ID to find the Z-queries:

Select the query you changed and use the Delete query button to delete the query.

With the next start of the workcenter the new parameters will be used and a new cache entry will be created.

Copyright/Trademark

You might also like