Enhancement for Leave Request Application in SAP HCM
We have Standard SAP Fiori Application for Leave request. When employee create a leave request in leave request application and the request sent to Employee’s Supervisor. But if the supervisor is in Absence and there is no substitution then the request is still wait for Supervisor action for Approve or reject.
So, employee must wait for his leave confirmation until supervisor is back. To avoid this problem, we can enhance the Leave Request Application to send the leave request to next level supervisor while sending the Leave request.
Now I will explain it how this requirement have achieved and explained the steps for above requirement.
- Below one is the screen shot of Standard Fiori Leave Request Application when employee login to Leave Request Application to create leave request.
- As shown in the above screen, click on the create Request icon to create request. Then we will get the below screen.
Provide the required details and click on Save icon as shown in the following screen.
Note: Here one level Supervisor (Approver) is displayed automatically when employee logins.
So, we have enhanced the BADI ‘PT_GEN_REQ’ to ‘Z_PT_GEN_REQ’ and copy the code to methods manually.
Also, added the below code in method CHECK_SELECTED_NEXT_PROCESSOR’ to change the Approver. Here, we will get the one level supervisor number in parameter ‘IM_PERSDATA_TAB’. We can check Approver is absence using info type PA2001 and Approver has any substitution using info type PA2003 on leave requested dates.
Then get the next level supervisor and replaced employee number in same parameter ‘IM_PERSDATA_TAB’ as approver.
Request will move to next level manager once the request is sent as per the enhancement as shown in the below screen shot.
Hope this blog help you and the detail information on the Leave Request Enhancement is explained.