WAIT UNTIL log_exp [UP TO sec SECONDS].
This variant of the statement
WAIT is designed only for use after 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 statement following
... UP TO sec SECONDS
With the specification
UP TO, program interruption is limited to the seconds
sec as a maximum. For
sec, a data
object of type
f is expected that must contain a positive number. The unit
of the number entered in
sec is seconds and the time resolution is one millisecond.
After the specified time has passed at the latest, program execution is continued with the statement following
|0||The logical condition
|4||No asynchronous function calls exist.|
|8||With specification of the addition
If the logical expression is incorrect, the running program is stopped in its current state. After a
callback routine, all data objects that were not changed in the callback routine have the same value
as for the previous execution of the logical expression. Any methods called by functions within the logical expression are executed again during the next check.
The statement WAIT causes a change in the
work process, which is linked to rolling out and rolling in all loaded programs. For this reason, the time in sec should not be less than a second in order not to load the system with too frequent changing of the work process.
It is recommended that you program the time for executing the callback routine of an
asynchronous RFC always with
WAIT UNTILto avoid relying on the next implicit change in the work process.
Every time the statement
WAITis used, a database commit is issued. For this reason,
WAITmust not be used between Open SQL statements that open or close a database cursor.
There is also a variant of the statement
WAITthat can be used independently of the asynchronous RFC.
Cause: Negative time specification for