Professional Documents
Culture Documents
Applies to:
WebDynpro ABAP Developer. For more information, visit the Web Dynpro ABAP homepage.
Summary
This document explains how to make personnel object worklist, Feeder class and how to integrate POWL with WD ABAP. Author: Saurav Mago. Company: Infosys Technologies Ltd. Created on: 26 October 2009 Author Bio Saurav Mago is a WebDynpro ABAP Consultant in Infosys Technologies Ltd.
Table of Contents
Introduction to Personnel Object Worklist ...................................................................................................... 3 Creating a WebDynpro ABAP Application with the POWL usage ................................................................... 3 Output :....................................................................................................................................................... 11 Related Content .......................................................................................................................................... 12 Disclaimer and Liability Notice ..................................................................................................................... 13
Not all methods provided by the POWER List interface need to be used from the start; there are mandatory methods and optional ones. GET_OBJECTS and GET_OBJECT_DEFINITION are two mandatory methods, rest are optional. One can code these methods and check for output. GET_OBJECTS : This method is used to Retrieve data from the backend system. Data retrieval can be done via simple select query or by using a function module. Selected data is passed to E_RESULTS which is exporting parameter of this method.
METHOD if_powl_feeder~get_objects. DATA : itab TYPE TABLE OF sflight, wa TYPE sflight. FIELD-SYMBOLS : <ls> LIKE LINE OF itab. SELECT * FROM sflight INTO TABLE itab. LOOP AT itab ASSIGNING <ls>. MOVE-CORRESPONDING <ls> TO wa. INSERT wa INTO TABLE me->mt_result. ENDLOOP. e_results = me->mt_result. ENDMETHOD.
GET_OBJECT_DEFINITION: This method is used to define the container (e.g. specify field types ) where the selected data gets stored. o METHOD IF_POWL_FEEDER~GET_OBJECT_DEFINITION. * return the table type description for the private object attribute MT_RESULT e_object_def ?= cl_abap_tabledescr=>describe_by_data( mt_result ). ENDMETHOD. GET_SEL_CRITERIA: In these method selection criteria is defined for this particular feeder. GET_FIELD_CATALOG: This method describes the field catalog to be used for query results table and the UI properties of the particular fields. o Various properties can be set here: Column position, column header, column visible, column color etc. The structure used for this is POWL_FIELDCAT_STY. GET_ACTIONS: In this method, we can define the buttons with properties defined in structure POWL_ACTDESCR_STY like text, tooltip, index etc. HANDLE_ACTION: In this, all the actions for the buttons are defined and also we can control enable/disable property of buttons here. Control can be transferred from class to portal via firing a event using : o E_portal_actions-fire_wdevent = abap_true. GET_ACTION_CONF: In this method, one can fire a confirmation window say on the click of button, it will ask user whether to delete the entries or not. 4. After a feeder is developed, it needs to be made visible to the roles. Basically, this means we need to register the feeder under a specific APPLID, define a POWER List type and introduce it to the roles 5. Create an Application ID (APPLID which will be used in the role to specify the target (your feeder) which will then be shown as POWER List homepage in the SAP Net Weaver Business Client. Transaction used to create APPLID: FPB_MAINTAIN_HIER. Click on new entry button and give a name to APPLID as shown in fig.
6. Press save, it will ask for transport request. Give transport request and save it. Now u can see ur entry (ZPOWL_APPLID) in the list.
7. Now create Powl type for the Feeder class which we have created earlier. Transaction used to create powl type: POWL_TYPE. Here ZPOWL_TYPE is our Powl type created for feeder ZPOWL_CLASS. 8. Role assignment for the POWER List Type: Here we connect the APPLID with the Powl type and make it visible to the role. Transaction used: POWL_TYPER. Role is Optional field and can be specified only if a role dependent mapping is required
9. Query for Power List: Here we define default queries for power list. A query id is made which is connected to Powl type. Transaction used: powl_query.
10. The APPLID and the QUERYID get mapped to each other via transaction POWL_QUERYR. Tick the checkbox Activate. If several queries are defined then sequence of tabs can be controlled via this transaction.
12. Define Component usage. POWL_UI_COMP is the main Powl UI component used in this component.
13. In the properties tab of Windows, define the usage of powl_ui_comp component.
14. In the Outbound plugs Tab of windows, define an outbound plug with parameters as shown in fig. :
APPLID type string QNAME type powl_query_ty FORALLQ type powl_xflag_ty QSELPARA type string REFRESHQ type powl_xflag_ty REFRESHA type powl_xflag_ty SRVGROUP type powl_xflag_ty
15. Define a view Container inside the Powl_view which is embedded into the windows POWL_WIN.
Inside the view container, embed the view Powl_Master of Powl_UI_Comp component as shown in fig.
16. Define the mapping of Outbound plug of windows with Default plug of view Powl_Master as shown:
17. In the methods Tab of Windows , write the code in Handle Default Event handler to fire the outbound plug to Powl_Master View :
DATA: LV_INBOX_QUERY TYPE STRING, LT_QUERY_PARAMS TYPE RSPARAMS_TT, LWA_PARAM TYPE RSPARAMS. DATA LV_QNAME TYPE POWL_QUERY_TY. LV_QNAME = 'ZPOWL_QUERY' . CALL FUNCTION 'POWL_ENCODE_SELPARA' EXPORTING I_SELPARA = LT_QUERY_PARAMS I_ESCAPE = '_line IMPORTING E_SELPARA_STRING = LV_INBOX_QUERY. WD_THIS->FIRE_OUT_PLG( APPLID = 'ZPOWL_APPLID' QNAME = LV_QNAME FORALLQ = 'X' QSELPARA = LV_INBOX_QUERY REFRESHQ = 'X' REFRESHA = 'X' SRVGROUP = 'X' ).
Output :
Related Content
http://wiki.sdn.sap.com/wiki/display/WDABAP/Main For more information, visit the Web Dynpro ABAP homepage.