cancel
Showing results for 
Search instead for 
Did you mean: 

Leave Request Workflow

Former Member
0 Kudos
125

Hi,

We have two level approval process for leave request.

We have copied standard leave request workflow 12300111 and added one more approval level to the copy.

Custom workflow is working fine except for scenario where leave request is approved by approver 1 and employee edits leave request. In this case modified request should again go to approver 1, but in our case it remains with approver 2.

How can I modify the workflow that if employee modifies the request, which is already approved by approver 1, it should go back again to first level approver?

Thanks,

Apurva

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

There is a BADI for leave requests. Probably you can add some customized logic inside the badi. I think that there was a method called continue_workflow or something like that. At least check that (put a break point there and see what happens inside).

Regards,

Karri

Answers (3)

Answers (3)

nabheetscn
Active Contributor
0 Kudos

Hi

What you can also give a try is like this. Whenever any leave request is edited or changed after one approver you can raise an event for the current workflow instance to get complete in an enhancement and altogether trigger a new workflow instance.

It will be more like a wait step waiting for the change to happen and retriggering a new one.

Nabheet

former_member185167
Active Contributor
0 Kudos

Hello,

Look at the design of the workflow (eg in PFTC_DIS). It should be fairly obvious what happens in that case and how it can be changed.

regards

Rick Bakker

hanabi technology

Former Member
0 Kudos

Hi Rick,

I checked design of workflow in PFTC_DIS but still do not understand how to change the workflow to match requirement.

Regards,

Apurva

Former Member
0 Kudos

Hi Apurva,

As part of standard workflow 12300111, there is no status for Editing the leave request.

Possible statuses are

NEW

DRAFT

DELETED

SENT

WITHDRAWN

APPROVED

REJECTED

ERROR

POSTED

STOPPED

Once he submits the request, he can withdraw the request and create a new one.

In your workflow, what is happening? I mean &REQ.STATUS& value in workflow after he edits it?

I hope he cannot edit it after submission.

Cheers,

Raja.D

Former Member
0 Kudos

Hi,

One question.

What is happening to the manager work item, when an employee modifies the request which is lying with first manager for approval?

Is it get logically deleted and new workflow instance triggering?

Cheers,

Raja.D

Former Member
0 Kudos

Hi Raja,

Workitem in manager's inbox is updated with FM SAP_WAPI_PUT_BACK_WORKITEM.

Workflow is not logically deleted. It continues.

Logically two cases can happen after request is approved by first approver.

1. Employee edits request - workflow should go back to first step

2. Second approver approves the request - workflow should complete

I think I need to add a step between first and second level approval, which has two branches. Depending on case it should decide which branch should be triggered.

But how to do this?

Regards,

Apurva