ABAP Keyword Documentation →  ABAP − Reference →  Data Interfaces and Communication Interfaces →  RFC - Remote Function Call →  CALL FUNCTION - RFC →  CALL FUNCTION - STARTING NEW TASK → 

WAIT UNTIL  Syntax Diagram

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 after an asynchronous RFC with callback routines. It interrupts the program execution for as long as the result of the logical expression log_exp is false. Any logical expression can be specified for log_exp.

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

Specifying UP TO restricts the program interruption to a maximum number of seconds, specified in sec. For sec, a data object of type f is expected that must contain a positive number. The unit of the number in sec is seconds and the time resolution is one millisecond. After the specified time period has passed at the very latest, the program execution continues with the statement following WAIT.

System Fields

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

Notes

Exceptions

Non-Catchable Exceptions