‎2007 May 09 9:06 AM
‎2007 May 09 9:07 AM
Hi
CONTINUE will skip that Loop pass.
STOP will go to the end of selection.
Reward points if useful
Regards
Anji
‎2007 May 09 9:07 AM
Hi
CONTINUE will skip that Loop pass.
STOP will go to the end of selection.
Reward points if useful
Regards
Anji
‎2007 May 09 9:18 AM
<b>STOP</b>
Effect
The statement STOP is only to be used in executable programs and in the following event blocks:
AT SELECTION-SCREEN (without additions)
START-OF-SELECTION
GET
You leave these event blocks via STOP, and the runtime environment triggers the event END-OF-SELECTION.
Note
The statement STOP is forbidden in methods and, since Release 6.10, leads to an uncatchable exception during the processing of screens called with CALL SCREEN and in programs not called with SUBMIT.
Example
Ending the event blocks GET sbook after max postings have been issued, and branching to END-OF-SELECTION.
<b>CONTINUE</b>
Effect
The CONTINUE statement can only be used in loops. If it is used, the current loop pass is ended immediately and the program flow is continued with the next loop pass.
Example
A loop pass is exited using CONTINUE if the loop index sy-index is an odd number.
DATA remainder TYPE i.
DO 20 TIMES.
remainder = sy-index MOD 2.
IF remainder <> 0.
CONTINUE.
ENDIF.
WRITE / sy-index.
ENDDO.