cancel
Showing results for 
Search instead for 
Did you mean: 

ESS leave workflow approver change error

Former Member
0 Kudos

Hi,

My requirement is that leave workflow for a particluar leave type, should go to a different approver other than his line manager.

I have made a copy of the standard leave workflow and made changes in the workflow so that the workitem now goes to a different approver (other than his old line manager, which is taken from the OM config). Basically i have added a rule in the approval process step which calculates the new approver. Now the workitem goes to the new approver (instaed of the old line manager) and the new approver is able to see the workitem in his inbox. But when he clicks on this , it shows an empty table.

This is becoz, when i see the workflow container log from the sender's outbox, the table REQ->N_PROCESSOR still shows the old line manager details(instead of the new approver details). so the workietm details are stored in the PTREQ_HEADER table with the actor id of the old line manager details. That is why even though the new approver is getting the wporkitem, on clicking that workitem its shows empty screen (as it tries to search the PTREQ_HEADER table with the actor id of the new approver(calculated from rule)).

Has anyone done such a requirement where they have changed the approver in the leave workflow. Or can anyone provide some inputs on this

Kindly advise

Thanks and Regards

Reshma.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Reshma,

We have the same problem.

Please, we want to know if you solve the problem and how.

Thanks

Former Member
0 Kudos

Hi Ashutosh,

I had chekec the two BADI's. The BADI 'PT_GEN_REQ' has methods FIND_RESP_AND_DEFAULT_NEXT_PRC, SEARCH_FOR_NEXT_PROCESSOR etc. But these methods dont have leave types as the import parameter. My requirement is that only for a particular leave type, the approver is different. For all other leave types, the approver remains the same. The method FIND_RESP_AND_DEFAULT_NEXT_PRC defaults the approver irrespective of the leave types.

Kindly advise.

Thanks and Regards

Reshma

Former Member
0 Kudos

badi PT_GEN_REQ

you need to use create_actor method

CALL METHOD actor_agent->create_actor

EXPORTING

im_actor_type = 'P'

im_otype = 'P'

im_objid = '00000008'

IMPORTING

ex_actor = ex_responsible_actor

EXCEPTIONS

missing_parameter = 1

pernr_not_existing = 2

application_error = 3

OTHERS = 4.

Former Member
0 Kudos

Hi Vivek,

We have two different leave, only for a particular leave type, the approver is different

We have implemented the BADI 'PT_GEN_REQ' but the method FIND_RESP_AND_DEFAULT_NEXT_PRC doesn't have leave types as the import parameter.

Thanks and Regards

Former Member
0 Kudos

Hi Reshma Hussain & Eva VIdal,

I also got the same sort of requirement. Can you please tell me how u have resolved the issue?

Thank You.

Srija

Former Member
0 Kudos

Hi Ashutosh,

Thanks for replying.You are right. The approver is getting determined in the function module PT_ARQ_REQUEST_CHECK ...method FIND_AND_SET_NEXTPROCESSOR.

I was thinking of changing in this function module using implicit enhancement techniques.

Kindly advise if anyone has tried their hand on this.

Thanks and Regards

Reshma

Former Member
0 Kudos

Hi Reshma,

There are two BAdIs PT_ABS_REQ and PT_GEN_REQ available. I dont have a system right now, but u can use one these Badis and change the next approver.

Cheers!!

AShutosh

Former Member
0 Kudos

Hi Reshma,

I am afraid if u can add a rule to the WF and change the approver.

Its not possible in case of 12300111 .

In this WF, the approver is not determined by WF rule.

You can change approver but for that u need to implement a BADI.

If you look at transaction PTARQ, you will be able to find out what I am saying.

Run PTARQ for default approver and for the new approver u r determining in WF.

Cheers!!

AShutosh