ABAP Keyword Documentation → ABAP - Reference → Program Flow → Control Structures → Program Interruption
WAIT UP TO
Other versions: 7.31 | 7.40 | 7.54
Syntax
WAIT UP TO sec SECONDS.
Effect
This statement interrupts the execution of the program by the number of seconds specified in sec
. sec
is a
numerical expression
position of operand type i
to which positive numbers (and 0) can be passed.
The unit of the number in sec
is seconds and the time resolution is one second.
After the specified time has passed, the program continues with the statement following WAIT
.
Return Codes
This statement always sets sy-subrc
to 0.
Notes
-
Each time the statement
WAIT
is used, a database commit is performed. For this reason,WAIT
must not be used between Open SQL statements that open or close a database cursor. -
This statement also has the variant
WAIT UNTIL
designed only to be used with callback routines and aRFC, and which uses a greater time resolution. The variant shown here does not wait for callback routines.
Exceptions
Non-Catchable Exceptions
-
Cause: Negative time specified for
sec
.
Runtime Error:WAIT_ILLEGAL_TIME_LIMIT