Custom task approval from POWL
SAP Technical consultants
Knowledge of SAP Workflow
SAP NWBC Inbox and POWL overview
SAP webdynpro development skills
ABAP Programming skills
This document is created to help consultants incorporate custom workflows to standard sap POWL and trigger approval webdynpro as popup from NWBC. There will be custom applications which can be triggered from POWL inbox .This will pop up new webdynpro for the approval for the custom task work item. While we click on the workitem links these applications will be launched from where we can execute the approval process.
SAP NetWeaver Business Client (NWBC) is a new SAP user interface (UI), presenting end users with a seamless integration of classic SAP GUI-based transactions and newly developed applications based on Web Dynpro ABAP. In the desktop variant, a high-fidelity UI is offered to improve the user experience. NWBC provides the user with a typical, modern, desktop-based user experience.
POWL (Personal Object Worklist) is an alternative for UWL
POWL (Personal Object Worklist) based Inbox is provided in Business Suite Foundation layer for processing work items, alerts and notifications. The inbox is used in Manager Self-Service add-on 1.0 (Work overview section) for processing MSS specific work items and notifications by manager users. Additional POWL queries are available in this inbox for MSS like – leave approvals. If MSS is deployed on SAP Enterprise Portal then also itis possible to use the POWL inbox as an alternative to UWL. An iview can be created in portal to display WebDynpro ABAP application of POWL inbox.
POWL is WebDynpro ABAP based
Connect different backend system to inbox and retrieve workitems from that system
Standard actions(Forward, resubmit) available for tasks
Additional actions can be configured for tasks
Additional POWL queries can be added
This document is aiming to integrate workflow to POWL inbox and approval calling custom webdynpro. As a whole the approval process will have following sap objects.
- Webdynpro Application to trigger workflow
- Workflow template for overtime process.
- Webdynpro application to approve work item.
Creation of applications and workflow template is out of scope for this document and we would be focusing on integration of workflow task to POWL and calling the approval webdynpro as pop up from POWL.
As we can see below while we click on the work item for over time it has to launch the webdynpro application ZHR_OVERTIME_APPROVAL from backend. This will enable us to either approve or reject the work item fro POWL inbox .This document is written with sample overtime quota approval workflow.
On click of below marked workitem link the webdynpro application for approval has to open.
Steps to follow
Step 1: Workflow creation
Now we need to to create the approval workflow for overtime approval and task for approval being assigned to respective managers.
Step 2: Overtime approval webdynpro creation
Create webdynpro for custom approval process approval . In our case webdynpro application ZHR_OVERTIME_APPROVAL has been created specific to the application process overtime quota approval.
Step 3: Configure task TS99900038 in POWL so that custom task is visible in standard POWL inbox MANAGER_MSS_INBOX
Step 4: Define action for task TS99900038 in POWL inbox to Pop up webdynpro as default action like below.
Create an action of type FUNCTIONMODULEACTIONHANDLER We can pass workitem id as parameter to this function module.
Step 5: Now create new launch pad to pop up webdynpro from POWL in transaction LPD_CUST
Step 6: Now create function module ZHR_FM_APPROVEOT_POWL with the code logic below. This code will be called from POWL inbox when employee clicks on the workitem.
DATA : lv_url TYPE string,
lv_value TYPE string,
lv_index TYPE rstabix,
lv_instance TYPE apb_lpd_instance,
lv_indx(2) TYPE c,
lv_role TYPE apb_lpd_role.
DATA: lt_appl_params TYPE apb_lpd_t_params,
ls_appl_params LIKE LINE OF lt_appl_params,
lt_business_params TYPE apb_lpd_t_params.
DATA ls_parameter TYPE LINE OF apb_lpd_t_params.
IF NOT wi_id IS INITIAL.
ls_appl_params–key = ‘WI_ID’.
ls_appl_params–value = wi_id.
APPEND ls_appl_params TO lt_appl_params.
lv_role = ‘MSS’.
lv_instance = ‘OVERTIME’.
CALL METHOD cl_hr_navigation_services=>navigate
iv_role = lv_role
iv_instance = lv_instance
iv_application_alias = ‘zhr_overtime_approval’
it_application_parameters = lt_business_params
it_business_parameters = lt_appl_params.
Step 7: Now the workitem pending for approval in POWL inbox will launch the webdynpro ZHR_OVERTIME_APPROVAL when the workitem is clicked.
This application has provisions to execute work item approval and rejection as designed in the view layout of the approval webdynpro.