CHECK - processing_block
After the processing block is exited, the runtime environment proceeds in the same way as when the
processing block is exited in the regular way
(with the exception of the event block
LOAD-OF-PROGRAM and the
reporting event block
GET) . In particular, the output parameters of procedures are passed on to the bound actual parameters.
The event block
LOAD-OF-PROGRAMcannot be exited using
After the reporting event block
GETis exited using
CHECK, any subordinate nodes in the hierarchy structure of the associated logical database are no longer processed. The logical database reads the next line of the current node or next higher node, if it has reached the end of the hierarchy level.
In a procedure (a method, function module, or subroutine),
CHECK log_expworks outside a loop in the same way as the following:
IF NOT log_exp.
This example shows a case where
CHECK can be used outside a loop. Right at
the start of a procedure, a prerequisite for executing the procedure is checked (and the procedure exited if the check is not successful). In this case, the procedure cannot be executed in the background.
CLASS demo DEFINITION. PUBLIC SECTION. CLASS-METHODS main. ENDCLASS. CLASS demo IMPLEMENTATION. METHOD main. CHECK sy-batch IS INITIAL. ... ENDMETHOD. ENDCLASS. START-OF-SELECTION. demo=>main( ).