SAP CHECK PROCESSING BLOCKS ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID CHECK
• CHECK - processing block ABAP Statement

CHECK, processing_block
Short Reference

ABAP_SYNTAX
CHECK log_exp.

What does it do?
If the statement CHECK is listed outside a loop and log_exp is false, it terminates the current processing block. Any logical expression can be specified for log_exp.
After the processing block is exited, the runtime framework behaves in the same way as when the processing block is exited in the regular way
BEGIN_SECTION VERSION 5 OUT , with the exception of the event block LOAD-OF-PROGRAM and the reporting event block GET
END_SECTION VERSION 5 OUT . In particular, the output parameters of procedures are passed on to the bound actual parameters.
BEGIN_SECTION VERSION 5 OUT
The event block LOAD-OF-PROGRAM cannot be exited using CHECK .
After the reporting event block GET is terminated using CHECK , any subordinate nodes in the hierarchy structure of the linked 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.
END_SECTION VERSION 5 OUT

ABAP_PGL
Only use RETURN to exit procedures
ABAP_PGL_END



Latest notes:

In a procedure (a method, function module, or subroutine), CHECK log_exp works outside a loop in the same way as: IF NOT log_exp.
RETURN.
ENDIF.
NON_V5_HINTS
A further variant of the statement CHECK for exiting processing blocks is CHECK SELECT-OPTIONS, which can only be used in GET event blocks for logical databases.
ABAP_HINT_END

ABAP_EXAMPLE_VX5
This example shows a case where CHECK can be used outside a loop. 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 must not be executed in the background.
ABEXA 00094
ABAP_EXAMPLE_END

Return to menu