Get Example source ABAP code based on a different SAP table
ID WAIT-FOR • UNTIL WAIT FOR PUSH CHANNELS • WAIT FOR PUSH CHANNELS ABAP Statement
WAIT FOR PUSH CHANNELS> Short Reference >
ABAP_SYNTAX WAIT FOR PUSH CHANNELS $[MESSAGING CHANNELS>$] $[ASYNCHRONOUS TASKS>$] UNTIL log_exp> $[UP TO sec SECONDS$].>
ABAP Addition 1 ... MESSAGING CHANNELS> 2 ... ASYNCHRONOUS TASKS> 3 ... UP TO sec SECONDS>
What does it do? This variant of the statement WAIT> is only intended for use in client programs of ABAP Push Channels>. Any logical expression> can be specified for log_exp>> after UNTIL>.
If the result of log_exp> is false and a receiver is registered for APC messages, the program waits until an ON_MESSAGE> method is executed for a message sent by a sender program and then checks the logical expression again:
If the new check on the result of the logical expression is true, sy-subrc> is set to 0 and the execution of the program is continued with the statement that follows WAIT>.
If the new check on the result of the logical expression is false and the ON_MESSAGE> methods of all previously sent messages have not yet been executed, one of the remaining ON_MESSAGE> methods must be executed before the program continues.
If the new check on the result of the logical expression is false and the ON_MESSAGE> methods of all previously sent messages were executed, sy-subrc> is set to 4 and the execution of the program is continued with the statement that follows WAIT>.
If the result of log_exp> is false and no receiver is registered for APC messages, the execution of the program is not interrupted, regardless of the result of log_exp>, and sy-subrc> is set to the value 4.
If the logical expression is true, the execution of the program is not interrupted, regardless of whether a receiver is registered for APC messages, and sy-subrc> is set to the value 0. If the statement WAIT> interrupts the program, the work process> is changed, and a database commit> is executed, except in updates>. For this reason, WAIT> must not be used between AB-SQL statements that open or close a database cursor>. System Fields> sy-subrc>>Meaning> 0The logical expression log_exp> is true. 4The logical expression log_exp> is false. Also, no receiver is registered for APC messages in the current ABAP_ISESS > and no registrations for AMC messages or asynchronous function calls> exist when the additions MESSAGING CHANNELS> or ASYNCHRONOUS TASKS > are used. 8The logical expression log_exp> is false and when the addition UP TO> was specified, the maximum time was exceeded.
Latest notes: If the logical expression is false, the running program is stopped in its current state. After an ON_MESSAGE> method, all data objects that were not changed in the ON_MESSAGE> method have the same value as when the logical expression was last evaluated. Any methods called by functions within the logical expression are executed again during the next check. ABAP_HINT_END
ABAP Addition
ABAP Addition
What does it do? If these additions are specified, this variant of the statement WAIT > is combined with the variants WAIT FOR MESSAGING CHANNELS>> or WAIT FOR ASYNCHRONOUS TASKS>>. The program flow described in the variants is added to the program flow described above. The WAIT> statement then also waits for APC messages or for asynchronously called functions to be called and does not just wait for AMC messages. • UP TO SECONDS WAIT FOR PUSH CHANNELS
ABAP Addition
What does it do? If UP TO> is specified, a maximum time sec> can be specified in seconds during which the statement waits for APC messages.