Skip to Content
author's profile photo Former Member
Former Member

E-Mail Notification for 2nd Level Leave Request Approval

I enhanced a copy of standard leave request approval workflow WS12300111 with a second level of approval.

The case is that, first the teamlead has to approve a request, and after that the line manger hast to approve it.

Now I have the problem, that via Report RPTARQEMAIL the line manager get's both e-mails. The one for the first level of approval and the one for the second level of approval.

What I did so far:

I copied the approval task ts12300097 and added a rule for the agent assignmen to it, so that the team lead get's the work item in his uwl inbox.

After he had approved the request, the request status is reset from "APPROVED" to "SENT".

After that the workflow reaches the secon standard task ts12300097 with the line manager as assigned agent.

He approves the request. The requestor gets a e-mail notification that his request has been approved and the absence gets written into infotyp 2001.

My problem:

The report RPTARQEMAIL runs hourly as a job. But instead of first notificate the team lead, the line manager gets the mail two times. frist time before the team lead has approved and the second time bevor he has approved the leave request. The team lead doesn't get any notification mail.

Hope you can help me.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on May 09, 2012 at 08:32 AM


    it is not inevitably necessary to use RPTARQEMAIL for sending Emails. Since you are using a customer Workflow anyway, you could define a step which implements a custom method which sends emails directly. This way you wouldn't have this hourly-job problem.

    It's pure theory though ;-)

    Cheers, Lukas

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      I figured out, that the manager is getting both e-mails because the teamlead is not set to be next approver in the 'request table' (PTREQ_HEADER/ PTREQ_ACTOR) from which report RPTARQEMAIL is getting the next processor for the first task.

      I added a rule to the first approval task in my workflow, which 'calculates" the teamlead via an evaluation path. The teamlead is getting his workitem in his uwl, but he doesn't occur in the mentioned 'request table'.

      I think I have to implement BAdi PT_GEN_REQ, but I have no idea on how to do this.

      I hope you can help me fixing my workflow, so that not only the managers id is getting transfered to the 'request table' but also the teamlead who has to approve the request first.

  • author's profile photo Former Member
    Former Member
    Posted on May 09, 2012 at 10:45 AM

    Hi Me eeee,

    I know i really shouldn't be asking you a question in response to your question, but please indulge me. Could you tell me how you changed request status from "APPROVED" to "SENT", I have a need to do same and have been cracking my head on how to do this.


    Add a comment
    10|10000 characters needed characters exceeded

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.