Issue with two level ESS leave request workflow

Ibrahim ikhansap at gmail.com
Thu Feb 11 06:19:51 EST 2010


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/20100211/3dd376f7/attachment.htm


More information about the SAP-WUG mailing list