Issue with two level ESS leave request workflow

Ibrahim ikhansap at gmail.com
Wed Feb 17 08:45:08 EST 2010


Dear Friends,
I simulated the two level ESS leave request scenario and found that the
issue is: even after the first level approver approves the leave request,
the leave request is still appearing in his Work list(not as a workitem in
UWL, but when he clicks other leave request work item, the old leave which
he approved before still appears in the table(worklist)) and he is able to
approve it again, In this case what is happening is the leave request status
is again changed from SENT(which was previously changed by WF_BATCH) to
APPROVED. Please advice how to resolve it.

On Thu, Feb 11, 2010 at 3:19 PM, Ibrahim <ikhansap at gmail.com> wrote:

> Dear Friends,
> We have copied the standard leave request workflow WS12300111 and enhanced
> it with two levels of approval.
> As per the Workflow design of the leave Approval, the Status of the leave
> request will be in SENT Status when the employee sends the leave request for
> approval. When the Manager approves the leave request the status of the
> leave request will be changed to APPROVED. The *workflow system will then
> change this again to SENT for second level approval(this is not available in
> standard)* and when the second level approver approves the leave request
> the status is again changed to APPROVED(part of standard). The background
> job which posts the leave requests RPTARQPOST will pick the all leave
> request which has a status APPROVED and create a leave request in R/3 and
> finally change the status as POSTED. For changing the leave request status
> from APPROVED to SENT(intermediate step) we have created a method inside the
> class CL_PT_REQ_WF_ATTRIBS and call that method inside a task in workflow
> and we are using the following code to change the status. The issue we are
> facing is the leave request are getting posted without the second level
> approval, means the worklfow is in ready status(for second level approval)
> but the leave request is having the status as "Posted", and because of this
> when the second level approver opens his work item from UWL, he cannot see
> those leave request. Please advice what could be the issue and how to
> trouble shoot this problem. I tried to simulate the same issue in Quality
> system and its working fine.
>
> DATA: request TYPE REF TO if_pt_req_request,
>               event   TYPE tim_req_xfer_event VALUE cl_pt_req_const=>c_reqtrans_send.
>
>     CALL METHOD cl_pt_req_badi=>get_request
>
>     EXPORTING
>       im_req_id  = me->req_id
>     IMPORTING
>       ex_request = request.
>
>   CALL METHOD cl_pt_req_badi=>initiate_state_transition
>     EXPORTING
>       im_request    = request
>       im_event      = event
>
> *    IM_RET_VALUE  = 0
>     IMPORTING
>       ex_new_status = me->status.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20100217/5c40be98/attachment.htm


More information about the SAP-WUG mailing list