cancel
Showing results for 
Search instead for 
Did you mean: 

Leave Request - Multiple approvals

Former Member
0 Kudos

Hello.

I am part of a project, trying to implement ESS/MSS at a large international NPO Customer, and have encountered a problem.

I plan to use the WS12300111 Workflow for the approval process of Leave Requests, but since the customer in some situations require more than one approval, I have to enhance the workflow. At first glance it seems simple just to repeat the approval process, but since the request will be marked as approved at the first approval step, that will not work.

We are required to keep the implementation as close to SAP Standard as possible, so the portal guys tell me, that it is not really an option to make changes to the approval functions.

I have considered making the first approval a simple workflow task, that doesn't update the request itself, but since a rejection should update the request and trigger the Process Leave Request by Employee task, I really don't see that working either.

Any thoughts on the subject, or maybe even a solution, will be greatly appreciated.

Best regards

Poul Steen Hansen

Denmark

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi dude,

Check the procedure.

Create a new BOR and create a new method - CHANGESTATUS.

Add one and only IMPORT parameter REQUEST of type PTREQ_HEADER-REQUEST_ID.

In the coding part, firstly lock your request using the FM - ENQUEUE_EPTREQ.

Then create an instance using the static method ca_pt_req_header=>agent->get_request which takes the REQUEST number as input and gives us the instance as OUTPUT.

Having the instance in hand, we can use the method initiate_state_transition to change the status of this method. Pass the SEND status as INPUT and get the new updated status as OUTPUT.

Unlock the leave request using the FM - DEQUEUE_EPTREQ.

Implement and release this method in your BOR.

And please make sure that your method is INSTANCE INDEPENDENT METHOD.

In your template create a Standard background task after your first approval step which calls this method.

This should solve your current problem. Thanks for the points.

Regards

<i><b>Raja Sekhar</b></i>

Former Member
0 Kudos

Thanks a lot mate - that will do the trick

Best regards

Poul Steen Hansen

Denmark

gerardoperez
Explorer
0 Kudos

I encapsulated this u201Ctricku201D in a method; and works fine, but sometimes it takes a long time to run. Occasionally, it fails by time-out error.

Answers (0)