You are on page 1of 18

Possibilities in POWL (Personal

Object Worklist)

Applies to:
SAP Netweaver 7.0 Enhancement Package 1 and Higher – Web Dynpro ABAP. For more information, visit
the Web Dynpro ABAP homepage.

Summary
This article illustrates different possibilities in Personal Object Worklists (POWL) and also covers different
requirements that come in projects.

Author: V A Karthick Kolisetty


Company: Deloitte Consulting
Created on: 22 September 2010

Author Bio
Karthick works as a Consultant in Deloitte, he has work experience in SAP ABAP, POWL,
Web Dynpro ABAP and SRM.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 1
Possibilities in POWL (Personal Object Worklist)

Table of Contents
Applies to: ........................................................................................................................................................... 1
Summary............................................................................................................................................................. 1
Author Bio ........................................................................................................................................................... 1
Contents.............................................................................................................................................................. 2
Objective ............................................................................................................................................................. 3
Basic Building blocks of POWL .......................................................................................................................... 3
Possibilities ......................................................................................................................................................... 3
At Message Area: ............................................................................................................................................... 3
At the Query Area ............................................................................................................................................... 3
At the Quick Criteria Maintenance ...................................................................................................................... 7
At the Field catalog ............................................................................................................................................. 8
At the Actions ...................................................................................................................................................... 9
Triggering New Applications ............................................................................................................................. 10
Setting Default Query ....................................................................................................................................... 13
Header for POWL ............................................................................................................................................. 14
Hiding Export to Excel and PDF printing .......................................................................................................... 14
Triggering POWL Application on click of a button or link on a page ................................................................ 15
Setting Row Count and Column count ............................................................................................................. 16
Related content ................................................................................................................................................. 17
Disclaimer and Liability Notice .......................................................................................................................... 18

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 2
Possibilities in POWL (Personal Object Worklist)

Objective
This document illustrates different possibilities in Personal Object Worklists (POWL).

Basic Building blocks of POWL


 Message Area

 Query Area

 List Area

Possibilities

At Message Area:
On the message area three different Message Types can be displayed
 Information

 Warning

 Error

To achieve this follow below steps:


While displaying the data in the method GET_OBJECTS pass the below specified values.
ls_messages-msgtype = 'I'.
ls_messages-message = 'Data is displayed successfully-Information/Success'.
APPEND ls_messages TO e_messages.
ls_messages-msgtype = 'W'.
ls_messages-message = 'Data is displayed successfully-Warning'.
APPEND ls_messages TO e_messages.
ls_messages-msgtype = 'E'.
ls_messages-message = 'Data is displayed successfully-Error'.
APPEND ls_messages TO e_messages.
CLEAR ls_messages.

At the Query Area


Queries can be displayed in two ways:
 Tabstrip

 Link Matrix

This option comes under personalization which allows switching from the tab strip view to a link matrix view.
The link matrix is the view that shows the categorizations possibly made by the user, while the tab strip
rather represents a flat sequence of queries.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 3
Possibilities in POWL (Personal Object Worklist)

Tabstrip View:

Link Matrix View:

To achieve this follow below steps:


There are two ways to achieve this, one is through personalization and other is through configuration.
1. Click on Personalize link.

Based on the radio button we select here, the corresponding layout appears.
The other way is through Application Configuration
Step1: Create a Component Configuration with the below details

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 4
Possibilities in POWL (Personal Object Worklist)

Select Tabstrips value for Layout field. Click on Save.


Step2: Create Application Configuration

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 5
Possibilities in POWL (Personal Object Worklist)

Provide the Component Configuration name and click on save


Step3: Provide the configuration name while running the application

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 6
Possibilities in POWL (Personal Object Worklist)

At the Quick Criteria Maintenance


On the Quick Criteria Maintenance we can display Parameters & Select Options. Parameter type can be
Checkbox, Text or Dropdown. Select option can be with interval and multi-selection or without multiselect.

Values can be defaulted for the fields as well. We can achieve this requirement by passing the values as
specified below in the method GET_SEL_CRITERIA.
Quick Criteria Maintenance field To Achieve..?

Field ->Select-option with interval and SELNAME, KIND as ‘S’, SELOPT_TYPE as ‘A’,
multi-selection ALLOW_ADMIN_CHANGE,DATATYPE,
QUICKSEARCH_CRIT, CRITTEXT
Values can be defaulted by passing data to the
parameter C_DEFAULT_VALUES

Field->Parameter as Dropdown list SELNAME, KIND as ‘P’, PARAM_TYPE as ‘D’,


ALLOW_ADMIN_CHANGE,DATATYPE,
QUICKSEARCH_CRIT, CRITTEXT
Dropdown values has to be passed to the field
VALID_VALUES

Field ->Select-option without multiselect SELNAME, KIND as ‘S’, SELOPT_TYPE as ‘I’,


ALLOW_ADMIN_CHANGE,DATATYPE,
QUICKSEARCH_CRIT, CRITTEXT

Field ->Select-option without interval SELNAME, KIND as ‘S’, SELOPT_TYPE as ‘M’,


ALLOW_ADMIN_CHANGE,DATATYPE,
QUICKSEARCH_CRIT, CRITTEXT

Field->Parameter as Checkbox SELNAME, KIND as ‘P’, PARAM_TYPE as ‘C’,


ALLOW_ADMIN_CHANGE,DATATYPE,
QUICKSEARCH_CRIT, CRITTEXT

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 7
Possibilities in POWL (Personal Object Worklist)

At the Field catalog


On the list we can display data as textview, image, checkbox, dropdown by key, input field, link to url, link to
action, button and progress indicator.

We can achieve this by passing the values in the method GET_FIELD_CATALOG as specified below.
Field Catalog field To Achieve…?
Dropdown Pass values to DISPLAY_TYPE(DK), COL_VISIBLE, COLPOS,
COLID, ENABLED, WIDTH
Dropdown values to the field VALID_VALUES
Editable Pass values to COL_VISIBLE, COLPOS, COLID, ENABLED(X),
WIDTH, EDITABLE(X)
Link to URL Pass values to DISPLAY_TYPE(LU), TEXT(Name of the URL),
COL_VISIBLE, COLPOS, COLID, ENABLED

Button Pass values to COLID, COL_VISIBLE, ENABLED(‘X’),


DISPLAY_TYPE(‘BT’), Text(pass button text)
Color for the columns Values from ‘0’ to ‘7’ can be passed to the field COLOR
Progress Indicator Pass values to COLID, COL_VISIBLE, ENABLED,
DISPLAY_TYPE(‘PI’).
Add a field in the data structure for the Progress Indicator field
and pass values dynamically so that we can get different values
for the column
Image Pass values to COLID, COL_VISIBLE, ENABLED,
DISPLAY_TYPE(‘IM’), ICON_SRC_REF, ICON_FIRST(‘X’),
WIDTH and HEADER
Similar to Progress Indicator create a new field in data structure
for images and pass that field name to the field ICON_SRC_REF.
In GET_OBJECTS method pass different values for the field in
data structure so that we can see different images for each row
Checkbox Pass values to COLID, COL_VISIBLE, ENABLED,
DISPLAY_TYPE(‘CK’) and HEADER
Link to Action Pass values to COLID, COL_VISIBLE, ENABLED,
DISPLAY_TYPE(‘LA’) and HEADER.
The code that has to be written for triggering the page in on click
has to be written in the method HANDLE_ACTION. Create an
Iview for the application that has to be triggered and link that Iview
to the operation of the Business Object.
Textview Pass values to COLID, COL_VISIBLE, ENABLED,
DISPLAY_TYPE(‘TV’) and HEADER

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 8
Possibilities in POWL (Personal Object Worklist)

At the Actions
We can get the buttons placed on the Toolbar by passing the entries in the method GET_ACTIONS.

Button To achieve..?
Pass values to ACTIONID, CARDINALITY(‘I’), PLACEMENT(‘B’), ENABLED(‘X’),
TEXT(‘Selector’),
Imagesource(‘/SAP/BC/WebDynpro/SAP/C_SRT_SEARCH_BROWSE_UI/deployment_unit.gif’),
ADD_SEPARATOR(‘X’)
The entries Test Absolute, Test OBN has to be passed to the field ACT_CHOICES with values
for ACTIONID, ENABLED(‘X’), TEXT and IMAGESOURCE.
Pass values to ACTIONID, CARDINALITY(‘I’), PLACEMENT(‘B’), ENABLED(‘X’),
TEXT(‘Selector’),
Imagesource(‘/SAP/BC/WebDynpro/SAP/C_SRT_SEARCH_BROWSE_UI/deployment_unit.gif’),
ADD_SEPARATOR(‘X’)
Pass values to ACTIONID, CARDINALITY(‘I’), PLACEMENT(‘B’), ENABLED(‘X’),
TEXT(‘Selector’),
Imagesource(‘/SAP/BC/WebDynpro/SAP/C_SRT_SEARCH_BROWSE_UI/deployment_unit.gif’),
ADD_SEPARATOR(‘X’)
For Deleting a line, C_SELECTED table contains the selected records in HANDLE_ACTION
method. Delete this table, and then automatically the records get deleted. Also set
e_result_lines_changed & e_selected_changed = ‘X’
Pass values to ACTIONID, CARDINALITY(‘I’), PLACEMENT(‘B’), ENABLED(‘X’),
TEXT(‘Selector’),
Imagesource(‘/SAP/BC/WebDynpro/SAP/C_SRT_SEARCH_BROWSE_UI/deployment_unit.gif’),
ADD_SEPARATOR(‘X’)
For Inserting a new line add new line to the table C_RESULT_TAB in the method
HANDLE_ACTION, set e_result_lines_changed & e_selected_changed = ‘X’
Pass values to ACTIONID, CARDINALITY(‘I’), PLACEMENT(‘B’), ENABLED(‘X’),
TEXT(‘Selector’),
Imagesource(‘/SAP/BC/WebDynpro/SAP/C_SRT_SEARCH_BROWSE_UI/deployment_unit.gif’),
ADD_SEPARATOR(‘X’)
Changed data on the UI is available in the table C_RESULT_TAB in the method
HANDLE_ACTION. Based on the requirement these values can be used for further processing

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 9
Possibilities in POWL (Personal Object Worklist)

To get the popup pass the required message to the parameter e_conf_message in the method
GET_ACTION_CONF based on the value of the Action ID. If user selects Yes for deletion, then in the
method HANDLE_ACTION the value for the parameter I_ACTION_CONF comes as ‘Y’, based on this the
corresponding code can be written.

Triggering New Applications


For displaying the Detail Component of the selected records there are two ways, one is placing the details
below the table or displaying the details on a new window.
Below the table

Follow below steps for creating Detail Component

1. Create a WebDynpro ABAP component

2. Implement the WebDynpro ABAP component Interface 'POWL_DETAIL_COMP_IF'

3. This Interface contains the following methods and events:

Methods:
'UPDATE_DETAIL_DATA' implement this method in order to receive the DATA reference of the POWL
lead selection Parameter - 'I_POWL_LINE_DATA' type ref to DATA

Events:
'DO_REFRESH' fire this event from your detail component when you need the POWL query refreshed

'POWL_FOLLOW_UP' use this event to pass 'something' to the 'POWL_UI_COMP' event


'POWL_FOLLOW_UP'. This makes only sense when the POWL is embedded into another WD ABAP
component. Parameters: 'ADD_EVENT_DATA' type ref to DATA 'EVENT_PARAMETERS' type
POWL_NAMEVALUE_TTY

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 10
Possibilities in POWL (Personal Object Worklist)

4. Create your 'custom' detail Views (WD ABAP)


5. Insert your views into the interface window 'POWL_DETAIL'
6. Pass the name of the above created WD component through your feeder class method
'GET_DETAIL_COMP' using the parameter 'E_DETAIL_COMP'

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 11
Possibilities in POWL (Personal Object Worklist)

On a new Page/Same Page


If the requirement is to display details on a new page or on the same page not below the list, then
OBN concept is used. Follow the below steps
1. Create a WebDynpro Application.

2. Create iView for this application in portal.

3. Create a Business Object and Operation.

4. Link the Operation to the iView created.

5. Pass the Business object and Operation details on click on one of the buttons in HANDLE_ACTION
method.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 12
Possibilities in POWL (Personal Object Worklist)

Setting Default Query


Pass the query name to the field Query ID in Component Configuration. Then of all the queries that present
this query will be selected by default.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 13
Possibilities in POWL (Personal Object Worklist)

Header for POWL


Set the field displayPageHeader to ‘X’ in the Component Configuration, then we can see page header. The
text it displays is the description we provide while creating Application ID.

Hiding Export to Excel and PDF printing


Unset the fields enablePdfPrinting and enableExcelExport in Component Configuration

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 14
Possibilities in POWL (Personal Object Worklist)

Triggering POWL Application on click of a button or link on a page


For triggering the application we have to make use of the interface IF_WD_PORTAL_INTEGRATION. Call
the method navigate_to_object of this interface to trigger the application. For this requirement to be fulfilled
the below details are needed
 System alias name for OBN

 Business Object ID

 Operation ID

*-- The below code will navigate to the POWL list Iview
lr_port_manager is referenced to if_wd_portal_integration
CALL METHOD lr_port_manager->navigate_to_object
EXPORTING
system = lv_system
object_type = lv_object_type
operation = lv_operation
business_parameters = lt_bus_parameter_list.
For setting the default query and any other configuration we can make use of the parameter
BUSINESS_PARAMETERS.
ls_bus_parameter_list-key = ’QNAME’
ls_bus_parameter_list-value = Query name.
APPEND ls_bus_parameter_list TO lt_bus_parameter_list.

ls_bus_parameter_list-key = 'WDCONFIGURATIONID'.
ls_bus_parameter_list-value = 'ZTEST_APP_CONF_POWL'.
APPEND ls_bus_parameter_list TO lt_bus_parameter_list.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 15
Possibilities in POWL (Personal Object Worklist)

Setting Row Count and Column count


Row count and Column count can be set in two ways. One is in the method GET_FIELD_CATALOG and
other is at the Component Configuration level.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 16
Possibilities in POWL (Personal Object Worklist)

Related content
For more information, visit the Web Dynpro ABAP homepage.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 17
Possibilities in POWL (Personal Object Worklist)

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 18

You might also like