cancel
Showing results for 
Search instead for 
Did you mean: 

Leave Request workflow need to change the status

Former Member
0 Kudos

Hi Experts,

I developed one work flow for leave request. Everything is fine for one approver.

Like the request is initiated by the user and send it to the approver. The approver, approves the request and the status is changed to Approved and the background program posts the request. So its fine for a single approver.

Now I have one more scenario, in this case there is no approver is required. The leave request should directly post with out any approval. Here Im getting issue's. The document status is send. If it is approved only, the background program will post this request.

So I need to change the status from 'Send' to 'Approved'. I checked the FM PT_ARQ_REQUEST_EXECUTE . In this FM parameter IM_COMMAND, If i give input as 'EXECUTE_SEND' then it will change the status from 'Approved' to 'Send'. But I need the reverse of this.

What should i pass to this parameter to change the status of the document from 'Send' to 'Approve'.

Please any one help me on this.

Helps will be highly Appreciated.

Thanks,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I hope that you have checked all the configuration options for your requirement. You don't necessarily need to start the whole workflow. But I guess that this was a absence type specific option, so it might not work (unless you could do something with the BADI).

Changing the status of leave request has been discussed quite a few times in this forum. You should get the basic idea for example from this thread (I have successfully used the cl_pt_req_badi=>initiate_state_transition few times without problems).

Regards,

Karri

Former Member
0 Kudos

Hi Kaari,

Thanks a lot for your reply.

I checked your code on that thread. I'll try it and let you know.

Thanks Again.

Former Member
0 Kudos

Hi Nandini,

we're also dealing with a similar problem (we have leave requests which go through approval only if they meet some requirements, otherwise they should be accepted w/o approval). I've also read the thread that Karri sent but it does not solve our problem.

If we use the cl_pt_req_badi=>initiate_state_transition we cannot avoid the approval step, since the method sees it is a leave request with approval and should be assigned to somebody.

Did you find a solution there? Does anybody knows another possibility to skip the approval step once you're inside the workflow?

Thanks in advance,

      Amalio

former_member185167
Active Contributor
0 Kudos

Please open a new thread with the details of your problem.

Former Member
0 Kudos

EXperts,

Any input's on this issue.

Thanks.