WAIT UNTIL

Short Reference

Syntax

WAIT UNTIL log_exp [UP TO sec SECONDS].

Addition:

... UP TO sec SECONDS

Effect

This variant of the statement WAIT is designed

only for use by an asynchronous RFC with callback routines. It interrupts program execution for as long as the result of the logical expression log_exp is incorrect. For log_exp, an arbitrary logical expression can be specified.

If the result of log_exp is incorrect, the program waits until a callback routine of a previous function that was called asynchronously was executed and then checks the logical expression again. If the result of the logical expression is true or the callback routines of all functions called asynchronously beforehand have been executed, program execution is continued with the following statement in WAIT:

Addition

... UP TO sec SECONDS

Effect

With the specification UP TO, program interruption is limited maximum to the seconds specified in sec. For sec, a data object of type f is expected that must contain the positive number. At the end of the specified time, by the latest, program execution is continued with the following statement in WAIT:

System Fields

sy-subrc Meaning
0 The logical condition log_exp was fulfilled.
4 No asynchronous function calls exist.
8 With specification of the addition UP TO, the maximum time was exceeded.

Notes

Exceptions

Non-Catchable Exceptions