WAIT UP TO
Short Reference
Syntax
WAIT UP TO sec SECONDS.
Effect
This statement interrupts program execution by as many seconds as are specified in
sec. For sec, a data object of the type
f is expected that must contain a positive number. After the specified time has passed, program execution is continued with the statement following WAIT.
Return values
This statement always sets sy-subrc to 0.
Notes
-
The statement WAIT causes a change in the work process.
This is connected with rolling in and rolling out all the loaded programs. For this reason, the time
in sec should not be set less than a second in order not to overload the system with too frequent changing of work processes.
-
Each time the statement WAIT is used, a
database commit is issued. For this reason, WAIT must not be used between
Open SQL statements that open or close a database cursor.
Non-Catchable Exceptions
-
Cause: Undefined status of the WAIT statement.
Runtime Error: WAIT_ILLEGAL_CONTROL_BLOCK
-
Cause: Negative time specification for sec.
Runtime Error: WAIT_ILLEGAL_TIME_LIMIT