Introduction

SAP leave request application enables employees to perform all the tasks they need to manage their leave requests and other absences.

Employees use this Web application to request leave or other absences and, in the case of absences that do not require approval, to inform their manager that they will be absent for a certain period (due to illness, for example). If necessary, employees can change or delete submitted leave requests or absences that have already been stored in the database.

SAP provides team viewer application which enables Manager’s to initiate HR processes on behalf the employee. The Team Viewer iView is based on the Object and Data Provider. In other words, all settings that affect the display of the iView have to be made in the Object and Data Provider. OADP search function can be customized to select employees under manager using evaluation paths or custom code in the functional module. And is the preferred option to provide ability to manager to initiate leave request on behalf of employee.


In certain scenarios, this option may not be as straight forward as above. Some of the situations which we encountered at recent implementations are follows,


1) HR Admin and Leave Admin ( both are different person and not “Manager” of the employee )

2) Determination of HR Admin and Leave Admin was not based on organization structure but rather was based on PA0001/T526 for HR admin and custom distribution list of user ID for Leave Admin

3) It was required that the HR Admin is provided the ability to create/edit/delete leave request on behalf of employee. At later stage depending on user feedback, leave admin should also be allowed to raise leave request on behalf of employee.

4) The leave request initiated by HR Admin on behalf of employee should follow normal approval path ( similar to the one configured for the employee initiated leave approval ).



Decision making and proposed solution

1) Although Team Viewer application is preferred way to achieve this as we always try to reuse SAP application when possible, the fact that HR Admin was not required to initiate all the HR processes supported by Team Viewer. Hence there was a requirement to customize Team Viewer application (  portal/WDA ) to restrict the number of processes.

2) The above customization should have been such that Team Viewer iView assigned to manager via MSS is not impacted by the changes.

The option of enhancing team viewer/OADP was weighted with custom development possibility.

Attempt to customize the team viewer to achieve require functionality had below implications,

1) Portal/WDA as well as ABAP code enhancements were required.

2) Increased time of analyzing standard code to find out an enhancement point ( or to create a custom FM with additional code )  and logic to differentiate that employee is search is attempted by Manager from MSS or HR admin from HR Admin role etc.

3) Testing efforts were more as this would have required retro/integration testing to ensure that standard iView is not impacted when used by manager.

Considering the facts above, it was decided to find out feasibility of simple custom solution. The efforts towards coding and testing were minimal as a much simpler custom solution emerged.

Technical Design

On further investigation, the custom solution proved much simpler for the scenario. Parameters of the SAP standard leave request application HRESS_A_PTARQ_LEAVREQ_APPL. This application support different views ( Approval/Leave Overview/Edit Leaves etc.).

As shown below, the application provides, parameters to control behavior at run time. Of particular interest are the parameters LRF_ARQ_MODE , PERNR_MEM_ID and LRF_SKIP_OVERVIEW_PAGE.

Leave1.JPG

URL parameter SAP-WD-CONFIGID is useful in case usage of a specific WDA customization is required.

A custom WDA component was created to fetch all employees under HR Administrator’s purview and provide employee details in an ALV format. Hotspot was enabled for Employee Number field to enable navigation to standard SAP application.

In action handler method, CONSTRUCT_WD_URL method of the class CL_WD_UTILITIES was called to generate UWL for the SAP leave request application with parameters below for the application

Parameter

Parameter Value

sap-wd-configid

Name of custom configuration of  the application

lrf_skip_overview_page

pernr_mem_id

See below

This instructed the application to show leave overview page to user. Parameter PERNR_MEM_ID is used to by the application to read employee number, whose leave details are to be displayed for editing by HR Admin.

To set current employee number from step a) to memory, method SET_PERNR_TO_MEMORY of the class CL_HRESS_EMPLOYEE_SERVICES was used. This method accepts Employee ID as input and returns memory ID where the employee number is stored.

SAP standard application then uses GET_PERNR_FROM_MEMORY method of the same service class to read employee number from memory.

Hence with minimal design and coding, the functionality was achieved without enhancing or detailed debugging SAP standard.

Look of the custom application

List of employees:

Leave2.jpg

Leave Overview with options to edit, delete or check details of the leave:

Leave3.jpg

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply