Skip to Content

WAIT UNTIL statement

Hi All,

We got one requirement where we have one report program which will send out emails in bulk ( 400 K ). The entire logic sending out email is located inside a loop condition. Our business wants to send 10k mails at a time and there should be a gap of 3 hours and then send again 10k mails. Like this job has to run.

Is it ok to put WAIT statement for 3 hours at the end of the loop to control the duration. I really search for side effects wait statement but could not get any answer. Please give your valuable input.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Posted on Dec 04, 2013 at 02:41 AM


    Hi Praveen,

    why don't you schedule the report as a background job with time interval = 3 hours?

    Best regards,

    Jerry

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2013 at 02:59 AM

    Hi Praveen,

    You could actually schedule the program within itself to start again in three hours time. See FM JOB_OPEN and check out its documentation, which explains it's use.

    Sending out 400K emails is quite a lot. Double check if this is absolutely necessary and hopefully it is not something that needs to be periodically repeated, as I can see that this solution will only smooth over any performance issues you are facing without really tackling the problem.

    Regards,

    Katan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2013 at 04:09 AM

    Hi Praveen,

    I got a suggestion.

    Making a program wait for hours does not make sense.

    Add a condition for sending only 10K emails at a time and schedule the report for every 3 hrs and in the next batch send the next 10K emails.

    Here you might have an issue for selecting the records for the 2nd batch execution. To solve this for already processed records, you can update a STATUS field in table. If this is a standard table, then store the fetched records to a temp table and set the status, so that you can cross check the already processed records and daily u can refresh this temp table based on creation date.

    Regards,

    Josh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2013 at 05:08 AM

    Hi Praveen

    You can schedule a job which will start after 3 hours to send the next set of emails. It will be sort of recursive till all email are send.

    First time program run it send 10K emails and schedule a job for the program to start after 3 hours to send next 10K. Same goes on till all are sent. You have to keep track of what all have been sent and what is pending

    Nabheet

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2013 at 06:05 AM

    Hi Praveen,

    Wait Until doesn't seems to be working for 3 hours. Schedule a job to run in 3 hours with different variants. I mean in the first variant give first 10000 mail recipient addresses, second one next 10000 addresses and so on..

    Thanks,

    Faisal

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2013 at 06:45 AM

    hi,

    Try with different selection parameters with report RSCONN01 (Schedule this report in BG as per your required intervals).



    Regards,

    Madhumahesh.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2013 at 07:57 AM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 30, 2013 at 10:30 AM

    Don't call RSCONN01 within your report, but change value of "maximal Maximum No. of Send Requests" in a copy of variant SAP&CONNECTINT or similar standard variant, then schedule it with a period of 3 hours.

    Regards,

    Raymond

    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.