Skip to Content

Change approver on cancellation of a old leave request

Hi all,

so i'm having the following problem:

Employee requested leaves in the past. They are all approved. Then the manager got changed. Employee wants to cancel a old leave request. The cancellation is sent the the old manager.

The badi PT_GEN_REQ is already implemented and working fine and finds the correct and actual manager. But then when an employee sends a cancellation of old leave it gets redirected to the old manager.

Unfortunately as i found out, this is hardcoded in CL_PT_REQ_APPROVER_LIST->GET_REQ_APPROVERS. There is a SELECT statement in this method:

"get request approvers

SELECT * FROM ptreq_approver INTO TABLE lt_approver_backend

WHERE request_id = is_req_id AND version_no = lv_version_no.

Here the system reads the request and finds the old approver and then sets this one as the approver.

Is there a way to override this this behavior? I want the request to be redirected to the new manager.

Thanks in advance for your answers.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 09, 2015 at 06:52 PM

    is the approver field can be changed by the end user?

    what is the rule setting for determination of next agent, is it LINE MANAGER?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Yanko Stoychev

      Hi yanko,

      i have no doubt that all is working fine ;-), what I wanted to say:

      You can change the agent of the approval workitem via workflow administration.

      Thats no big problem.

      But if you do so, I think (i am not 100% sure) the new manager will not see this in his inbox and when he doesn´t see it, he can´t approve it.

      Maybe it would be easier to use report RPTARQAPP in this case.

      With this report you can approve leave requests, that woul be the easiest way, but then I think the user who executed the report will be the approver...

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.