Professional Documents
Culture Documents
Powl Possibiities
Powl Possibiities
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
Author Bio
Karthick works as a Consultant in Deloitte, he has work experience in SAP ABAP, POWL, Web Dynpro ABAP and SRM.
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
Objective
This document illustrates different possibilities in Personal Object Worklists (POWL).
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.
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.
Tabstrip 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
Select Tabstrips value for Layout field. Click on Save. Step2: Create Application Configuration
Provide the Component Configuration name and click on save Step3: Provide the configuration name while running the application
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 Field ->Select-option with interval and multi-selection To Achieve..? SELNAME, KIND as S, SELOPT_TYPE as A, 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 SELNAME, KIND as S, SELOPT_TYPE as M, ALLOW_ADMIN_CHANGE,DATATYPE, QUICKSEARCH_CRIT, CRITTEXT SELNAME, KIND as P, PARAM_TYPE as C, ALLOW_ADMIN_CHANGE,DATATYPE, QUICKSEARCH_CRIT, CRITTEXT
Field->Parameter as Checkbox
We can achieve this by passing the values in the method GET_FIELD_CATALOG as specified below. Field Catalog field Dropdown To Achieve? Pass values to DISPLAY_TYPE(DK), COL_VISIBLE, COLPOS, COLID, ENABLED, WIDTH Dropdown values to the field VALID_VALUES Editable Link to URL Pass values to COL_VISIBLE, COLPOS, COLID, ENABLED(X), WIDTH, EDITABLE(X) Pass values to DISPLAY_TYPE(LU), TEXT(Name of the URL), COL_VISIBLE, COLPOS, COLID, ENABLED Pass values to COLID, COL_VISIBLE, ENABLED(X), DISPLAY_TYPE(BT), Text(pass button text) Values from 0 to 7 can be passed to the field COLOR 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 Link to Action Pass values to COLID, COL_VISIBLE, ENABLED, DISPLAY_TYPE(CK) and HEADER 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
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
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.
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
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'
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.
*-- 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.
Related content
For more information, visit the Web Dynpro ABAP homepage.