Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Calling and leaving program units →  Exiting Program Units →  Exiting Processing Blocks 

CHECK - processing_block

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


CHECK log_exp. 

Effect

If the CHECK statement is located outside a loop and log_exp is false, the statement terminates the current processing block. You can specify any logical expression for log_exp.

After the processing block is exited, the runtime environment proceeds in the same way as when the processing block is exited in the normal 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.

  • You cannot exit the LOAD-OF-PROGRAM event block using CHECK.
  • After the reporting event block GET is exited using CHECK, subordinate nodes in the hierarchical 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.

Programming Guideline

Only use RETURN to exit procedures


Notes

  • In a procedure (method, function module, subroutine), CHECK log_exp functions outside a loop in the same way as:
IF NOT log_exp.
  RETURN.
ENDIF.