Need help - Program Exits
I got the requirement which is with substitutions. My client has an option to get substitution for below level. So there is a chance to approve his/ her own travel request. when substitution is activated. work-items distributed to the person in the below level, work items exist in both managers and the person below his/her hierarchy. So i have written the a logic in the program exits at user decision step (approve/reject/send for correction). every thing is working fine.. When ever system displays ERROR message at the inbox level when person tries to open his own approval request the trip status / work item status goes to RESERVED and work-item gets deleted from the Manager's Inbox. It Should not be deleted from the Manager's Inbox. What can i done for this .. Please help me ..
Sandy Singh replied
I think you have a simple requirement and programming exits are making it bit complex.
As per the SAP workflow best practices, a workflow requester cannot be an approver. You will have to add the WF initiator as excluded agent in the User decision step. see below
Also, workitem is reserved when one agent tries to execute/open the workitem and it disappears from other agent inbox . This is SAP standard behaviour.
In your case, you can either not allow the requester as approver
Allow the approval from requester and once approved check in a background step if the requester and approver are same and substitution is active and then route the approval to required agent and continue the process flow.