SAP ABAP SYNTAX FOR CHECK WITH IN LOOPS

Basic form

CHECK logexp.

Effect

CHECK evaluates the subsequent logical expression . If it is true, the processing continues with the next statement.

In loop structures like

 
DO... ENDDO
WHILE ... ENDWHILE
LOOP ... ENDLOOP
SELECT ... ENDSELECT


CHECK with a negative outcome terminates the current loop pass and goes back to the beginning of the loop to start the next pass, if there is one.

In structures like

 
FORM ... ENDFORM

FUNCTION... ENDFUNCTION
MODULE ... ENDMODULE
AT


CHECK with a negative outcome terminates the routine or modularization unit.

If CHECK is not in a loop or a routine or a modularization unit, a negative logical expression terminates the current event. In contrast, the statement REJECT terminates the current event, even from loops or subroutines.

If a CHECK produces a negative result in a GET event , the GET events in subordinate tables of the logical database are not processed either.

(22.5)

RELATED POST

SAP ABAP SYNTAX FOR CASE

0 comments:

Post a Comment

Search for SAP ABAP,CRM,ERP topics here