on 06-13-2016 1:12 PM
Hi, A
Am new is SAP workflow, got my certification last month, we have implemented a custom workflow for overtime approval which is working well, However, during the payroll period, approval happen but the overtime record in PA2002 is not unlocked, this leads to many employees not being paid and we are forced to unlock them manually, kindly assist on how i cant restrict workitem approval when payroll area is locked. i have found the interface i need to implement , IF_SWF_IFS_WORKITEM_EXIT, but stuck on how to implement it. kindly help me out.
Thanks
Kelvin Munyasia
Hi,
You can use the FM 'HR_EMPLOYEE_DEQUEUE'
*---> lock the employee
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
number = im_pernr
IMPORTING
return = wa_return.
I have done the same for Overtime workflow. You can call this FM using your BO method.
Regards,
Shamsu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Sham,
I have used your logic to implement the IF_SWF_IFS_WORKITEM_EXIT interface in a class and used the program exit in the decision step.
The after execution method checks if the payroll area of the employee is locked. if that is true, it thows an error "payroll area locked" and stops execution of the same.
Thanks a lot.
"Am new is SAP workflow, got my certification last month"
You were able to pass the official SAP Workflow certification exam while being new to Workflow?
Congratulations, but it's time to raise that passing grade!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must catch errors raised form your approval method, and transfer that error for someone to handle, a decision task in a loop giving the user a "retry" option and calling the approval step again should work.
If this is a reoccurring error to which you know the solution, you can add this solution to the method performing the approval. but always catch the errors you never know when a new type of error can happen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.