This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
Related Content .......................................................................................................................................... 12
Disclaimer and Liability Notice ..................................................................................................................... 13
Integrating POWL with WebDynpro ABAP
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
The Personnel Worklist is a framework which shows list of business objects and also allows specific activities based on the objects made. Specific Activities can be performed for each business object via buttons shown in the objects and thus handling the action of buttons.
Personnel Object Worklist Framework is based on WebDynpro ABAP.
All the properties of POWL are specified by a standardized class which is known as Feeder Class.
The Feeder Class: This class communicates with the database, selects the data as requested by the user,
forwards the same to internal cache of POWL and also refreshes the POWL.
This class also handlers the action initiated by the user via pressing buttons.
Creating a WebDynpro ABAP Application with the POWL usage
1. The first step is to create your own Feeder Class. Feeder class used must use the interface IF_POWL_FEEDER. ZPOWL_Class is our feeder class, built in SE24.
2. Save the class ZPOWL_CLASS as a local object. Here in the fig below ,we can see ZPOWL_CLASS is made and is using the interface IF_POWL_FEEDER.
3. Implemented Feeder class has various methods as shown in fig.
Integrating POWL with WebDynpro ABAP
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
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
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.
Integrating POWL with WebDynpro ABAP
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
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
Integrating POWL with WebDynpro ABAP
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
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