Attendence/Absences – Auto Approval when Leave Request on Behalf of Employee is used.
Our customer uses certain Attendance types that can only be applied by the Manager and should be auto approved. This requires changes to the WF template as well as the ESS leave application.
1. Add a condition to your template to check if initiator equals next agent.
2. Set the Approval Step by defining a custom task and associating an ABAP class/method to approve it in background.
3. To hide the leave from employees, multiple options could be used
- For error message alone, BADI PT_ABS_REQ can be used.
- Enhancing HR_GET_ESS_SUBTYPES_WEB OR
- Class CL_HRESS_PTARQ_LEAVREQ_GUIBBF, Method SET_VALUE_HELP can be enhanced to hide the absence types required.
The required absence types are invisible for employees and auto approved when using “Leave Request on Behalf” by Manager.
Special Thanks to Harish Sreedher, Hitesh Batra and Sonu Krishna