Skip to Content

WAIT statement

Hello all

<b>Thomas Jung</b> wrote in an earlier posting about WAIT:

The big advantage it has is that it release the dialog work process while the program is waiting.

Are there any disadvantages ?

Best regards

Thomas Madsen Nielsen

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 02, 2004 at 09:36 AM

    Yes, it makes the program run longer! 😊

    Seriously, none to my knowledge. We use it to allow an external job monitor to monitor the progress of an ABAP that schedules other jobs dynamically.

    The external monitor knows about job A, but not jobs B and C that A spawns. So instead, job A uses the WAIT statement to periodically wait for the completion of jobs B and C. Seems to work very well.

    Scott

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 02, 2004 at 08:56 PM

    The only disadvantage I can think of is that it was really designed to be used with Asynchronous RFC calls. I guess if you use it outside of this context and you have problems, you might not be able to get help from SAP. However I have never had any problems with it.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Thomas Jung

      Yes, I saw that documentation too, however it is a note for the variant WAIT UNTIL <logical expression> only.

      It makes perfect sense there, because only a parallel thread invoked by asynchronous remote function call could update the flag typically used in such a logical expression.

      There are no such restrictions regarding WAIT UP TO n SECONDS.

      Scott