cancel
Showing results for 
Search instead for 
Did you mean: 

Status of the Conatiner is not changing in Leave Request

Former Member
0 Kudos

Hi,

In the Leave Request Workflow triggered from the ESS system (customized from WS12300111), the container value REQ.STATUS(document status under the standard class CL_PT_REQ_WF_ATTRIBS for leave request ) is always set to 'SENT' every item irrespective of the manager reject or approval.

For that reason the Workflow status is showing in SWI1 t-code : 'Completed ' as it traversing the Reject path always.

Can anyone please tell me why the value is not changing in the REQ.STATUS container even though the manager is approving or rejecting?

Suvajit..

Accepted Solutions (0)

Answers (1)

Answers (1)

bpawanchand
Active Contributor
0 Kudos

Hi,

Can you please check the aplication and the parametrs that you have set in the SWFVISU transaction... Because the application responsible to handle the actions from portal is TS12300097 LeaveRequestApprover this application calls the respective RFC Function modules to set the status of the request.

Can you please provide use the configuration that you have done in SWFVISU.

Regards

Pavan

Former Member
0 Kudos

Hi Pavan,

The application is ABAP WEBDYNPRO and the visualisation parameters are:

APPLICATION ZWDR_HCM_MSS

DYNPARAM wi_id=${item.externalId}

NAMESPACE SAP

SYSTEM_ALIAS SAP_WebDynrpo_XSS

and it has copied from the standard task TS12300097.The status what it is coming averytime is 'SENT' irrespective of Approve or Reject by the manager...

Suvajit

bpawanchand
Active Contributor
0 Kudos

Hi,

Then you have to make sure that you are making use of the standard function modules properly, Can you please let me know how actually you are trying to set the status of the request.

There is a Standard function module PT_ARQ_REQUEST_EXECUTE which can help you to make the request status to either APPROVED or REJECTED.

Regards

Pavan

Edited by: Pavan Bhamidipati on May 20, 2011 3:25 PM

Former Member
0 Kudos

Hi,

In the approver step there is ABAP class has been maintained (CL_PT_REQ_WF_ATTRIBS) and the methods used is DUMMY.

Inside the class there is another method (APPROVE)..The code of the method which is standard is like that:


  DATA: request TYPE REF TO if_pt_req_request,
        event   TYPE tim_req_xfer_event VALUE cl_pt_req_const=>c_reqtrans_approve.

  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.

.

I think the status is coming from the code.There is another method like SET_WF_ATTRIBS where the code for status retrieval is :

status = im_attribs-version-status.

Suvajit..

bpawanchand
Active Contributor
0 Kudos

Hi,

The code what ever you are using , I hope it just simply changes the status.. I think you have to try making use of the function module what I suggested earlier, Its an RFC and Easy to call to the COMMAND parameter you need to pass EXECUTE_APPROVE to change the status of the leave request as APPROVED, EXECUTE_REJECT to change the status of the leave request to rejected. Iam not sure why your peice of code is not working.. Did you try to write COMMIT WORK once after the call to method Intiate_state_transition.. If not just try to do this and later you try calling the function module.

Because the function performs all kinds of validations and generating the versions in the database. So please I seriously suggest you to make use of the function module.

Regards

Pavan

Edited by: Pavan Bhamidipati on May 20, 2011 5:11 PM