<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: difference between check , continue &amp; exit ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383617#M529419</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;CHECK ; checks for the condition like if statement&lt;/P&gt;&lt;P&gt;CONTINUE: skips that loop pass for which the condition was met&lt;/P&gt;&lt;P&gt;EXIT: skips that loop pass and come out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for useful Answers&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jun 2007 11:23:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-13T11:23:06Z</dc:date>
    <item>
      <title>difference between check , continue &amp; exit ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383616#M529418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Can anyone can tell me the difference about check , Continue &amp;amp; exit .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vighnesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 11:20:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383616#M529418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T11:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: difference between check , continue &amp; exit ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383617#M529419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;CHECK ; checks for the condition like if statement&lt;/P&gt;&lt;P&gt;CONTINUE: skips that loop pass for which the condition was met&lt;/P&gt;&lt;P&gt;EXIT: skips that loop pass and come out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for useful Answers&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 11:23:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383617#M529419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T11:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: difference between check , continue &amp; exit ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383618#M529420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK  will skip all the code below this statement if the condition is FALSE in a loop and continues with the next loop pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTINUE will skip the current loop pass and continues with the next loop pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXIT if in a loop endloop will come out of the loop, if in a procedure comesout of procedure, if in the program outside any loop exits the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 11:23:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383618#M529420</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-06-13T11:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: difference between check , continue &amp; exit ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383619#M529421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;EXIT.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Within a loop structure:&lt;/P&gt;&lt;P&gt;Terminates looop processing (DO, WHILE, LOOP, SELECT).&lt;/P&gt;&lt;P&gt;- Within subroutines and other modularization units (but not&lt;/P&gt;&lt;P&gt;in a loop structure):&lt;/P&gt;&lt;P&gt;Leaves the subroutine or modularization unit (FORM, MODULE,&lt;/P&gt;&lt;P&gt;FUNCTION, TOP-OF-PAGE, END-OF-PAGE).&lt;/P&gt;&lt;P&gt;- Outside loop structures and modularization units (report&lt;/P&gt;&lt;P&gt;processing):&lt;/P&gt;&lt;P&gt;Terminates report processing and triggers list display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: SAP_COUNT TYPE I,&lt;/P&gt;&lt;P&gt;WA_T100 TYPE T100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM T100 INTO WA_T100 WHERE SPRSL = SY-LANGU AND&lt;/P&gt;&lt;P&gt;ARBGB = 'DS'.&lt;/P&gt;&lt;P&gt;WRITE / WA_T100-TEXT.&lt;/P&gt;&lt;P&gt;IF WA_T100-TEXT CS 'SAP'.&lt;/P&gt;&lt;P&gt;ADD 1 TO SAP_COUNT.&lt;/P&gt;&lt;P&gt;IF SAP_COUNT = 3.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;CHECK&amp;lt;/b&amp;gt; logexp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK evaluates the subsequent logical expression. If it is&lt;/P&gt;&lt;P&gt;true, the processing continues with the next statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In loop structures like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO ... ENDDO&lt;/P&gt;&lt;P&gt;WHILE ... ENDWHILE&lt;/P&gt;&lt;P&gt;LOOP ... ENDLOOP&lt;/P&gt;&lt;P&gt;SELECT ... ENDSELECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK with a negative outcome terminates the current loop pass&lt;/P&gt;&lt;P&gt;and goes back to the beginning of the loop to start the next&lt;/P&gt;&lt;P&gt;pass, if there is one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In structures like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM ... ENDFORM&lt;/P&gt;&lt;P&gt;FUNCTION ... ENDFUNCTION&lt;/P&gt;&lt;P&gt;MODULE ... ENDMODULE&lt;/P&gt;&lt;P&gt;AT events&lt;/P&gt;&lt;P&gt;GET events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK with a negative outcome terminates the routine or&lt;/P&gt;&lt;P&gt;modularization unit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If CHECK is neither in a loop nor a routine nor a&lt;/P&gt;&lt;P&gt;modularization unit, a negative logical expression terminates&lt;/P&gt;&lt;P&gt;the current event. In contrast, the statement REJECT terminates&lt;/P&gt;&lt;P&gt;the current event, even from loops or subroutines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;CONTINUE.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within loop structures like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- DO ... ENDDO&lt;/P&gt;&lt;P&gt;- WHILE ... ENDWHILE&lt;/P&gt;&lt;P&gt;- LOOP ... ENDLOOP&lt;/P&gt;&lt;P&gt;- SELECT ... ENDSELECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTINUE terminates the current loop pass, returns the&lt;/P&gt;&lt;P&gt;processing to the beginning of the loop and starts the nex&lt;/P&gt;&lt;P&gt;loop pass, if there is one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO loop: Omit an area (10 ... 20)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 100 TIMES.&lt;/P&gt;&lt;P&gt;IF SY-INDEX &amp;gt;= 10 AND SY-INDEX &amp;lt;= 20.&lt;/P&gt;&lt;P&gt;CONTINUE.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 11:24:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383619#M529421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T11:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: difference between check , continue &amp; exit ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383620#M529422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hI,&lt;/P&gt;&lt;P&gt;       COLLECT:COLLECT is used to create unique or compressed datsets. The key fields are the default key fields of the internal table itab . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If, besides its default key fields, the internal table contains number fields,the contents of these number fields are added together if the internal table already contains an entry with the same key fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the default key of an internal table processed with COLLECT is blank, all the values are added up in the first table line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you specify wa INTO , the entry to be processed is taken from the explicitly specified work area wa . If not, it comes from the header line of the internal table itab . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After COLLECT , the system field SY-TABIX contains the index of the - existing or new - table entry with default key fields which match those of the entry to be processed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT can create unique or compressed datasets and should be used precisely for this purpose. If uniqueness or compression are unimportant, or two values with identical default key field values could not possibly occur in your particular task, you should use APPEND instead. However, for a unique or compressed dataset which is also efficient, COLLECT is the statement to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you process a table with COLLECT , you should also use COLLECT to fill it. Only by doing this can you guarantee that the internal table will actually be unique or compressed, as described above and COLLECT will run very efficiently. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use COLLECT with an explicitly specified work area, it must be compatible with the line type of the internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTINUE will skip that Loop pass.&lt;/P&gt;&lt;P&gt;STOP will go to the end of selection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STOP &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The statement STOP is only to be used in executable programs and in the following event blocks: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN (without additions) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You leave these event blocks via STOP, and the runtime environment triggers the event END-OF-SELECTION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Ending the event blocks GET sbook after max postings have been issued, and branching to END-OF-SELECTION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTINUE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;A loop pass is exited using CONTINUE if the loop index sy-index is an odd number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA remainder TYPE i. &lt;/P&gt;&lt;P&gt;DO 20 TIMES. &lt;/P&gt;&lt;P&gt;  remainder = sy-index MOD 2. &lt;/P&gt;&lt;P&gt;  IF remainder &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;    CONTINUE. &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;  WRITE / sy-index. &lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGARDS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 11:26:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383620#M529422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T11:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: difference between check , continue &amp; exit ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383621#M529423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Continue-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The continue statement is coded within a loop. It acts like a goto, passing control immediately to the terminating statement of the loop and beginning a new loop pass. In effect, it causes the statements below it within the loop to be ignored and a new loop pass to begin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conditional termination of a loop pass or a processing block.&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;CHECK &amp;lt;logexp&amp;gt;.&lt;/P&gt;&lt;P&gt;If the logical expression &amp;lt;logexp&amp;gt; is true, the program continues at the next statement. If,&lt;/P&gt;&lt;P&gt;however, &amp;lt;logexp&amp;gt; is false, the current loop pass terminates and the next begins. If the program&lt;/P&gt;&lt;P&gt;is not currently processing a loop, the current processing block terminates. There are special&lt;/P&gt;&lt;P&gt;forms of the CHECK statement for use with selection tables and in GET event blocks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exit-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exit statement means coming out of a loop when ever certain conditon sastisfies&lt;/P&gt;&lt;P&gt; do.&lt;/P&gt;&lt;P&gt;   count = count + 1.  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; if count = '5'.&lt;/P&gt;&lt;P&gt;   EXIT.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt; enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***do rewards if usefull&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 11:26:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383621#M529423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T11:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: difference between check , continue &amp; exit ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383622#M529424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vighnesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK checks a condition and leaves the current processing block (a LOOP or a FUNCTION) if the condition is not true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXIT works similar to CHECK except that it doesn't check a given condition. Usually you would place it in some IF ENDIF clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTINUE works a bit different by that it only work in loops. When CONTINUE got hit in a loop the loop starts the next iteration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA remainder TYPE i. 
DO 20 TIMES. 
  remainder = sy-index MOD 2. 
  IF remainder &amp;lt;&amp;gt; 0. 
    CONTINUE. 
  ENDIF. 
  WRITE / sy-index. 
ENDDO. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;  ok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 11:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383622#M529424</guid>
      <dc:creator>oliver</dc:creator>
      <dc:date>2007-06-13T11:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: difference between check , continue &amp; exit ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383623#M529425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If the statement CHECK is executed in a loop and log_exp is incorrect, the statement CHECK immediately terminates the current loop pass and the program continues with the next loop pass. For log_exp, you can specify any logical expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outside a loop, the statement CHECK exits the current processing block (see CHECK Processing Block). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Termination of the loop pass using CHECK when the loop index sy-index is odd-numbered. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA remainder TYPE i. &lt;/P&gt;&lt;P&gt;DO 20 TIMES. &lt;/P&gt;&lt;P&gt;  remainder = sy-index MOD 2. &lt;/P&gt;&lt;P&gt;  CHECK remainder = 0. &lt;/P&gt;&lt;P&gt;  WRITE / sy-index. &lt;/P&gt;&lt;P&gt;ENDDO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the EXIT statement is listed within a loop, it leaves the loop by ending the current loop process. Program execution is continued after the closing statement in the loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Outside of a loop, the EXIT statement leaves the current processing block (see EXIT - Processing block). We recommend that you use EXIT within loops only. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Leaving a loop with EXIT if the loop index sy-index is greater than a number limit. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA limit TYPE i VALUE 10. &lt;/P&gt;&lt;P&gt;DO. &lt;/P&gt;&lt;P&gt;  IF sy-index &amp;gt; limit. &lt;/P&gt;&lt;P&gt;    EXIT. &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;  WRITE / sy-index. &lt;/P&gt;&lt;P&gt;ENDDO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTINUE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;A loop pass is exited using CONTINUE if the loop index sy-index is an odd number. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA remainder TYPE i. &lt;/P&gt;&lt;P&gt;DO 20 TIMES. &lt;/P&gt;&lt;P&gt;  remainder = sy-index MOD 2. &lt;/P&gt;&lt;P&gt;  IF remainder &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;    CONTINUE. &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;  WRITE / sy-index. &lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Imran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 11:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383623#M529425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T11:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: difference between check , continue &amp; exit ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383624#M529426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Please check before you provide answers, giving wrong answers will put the person who raised question in confusion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK will skip the code below that statement for the current loop pass if the check result is FALSE. Its different from IF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTINUE does not have any condition associated with it you have to check the condition using IFand then use CONTINUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXIT skips the loop not the loop pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 11:29:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383624#M529426</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-06-13T11:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: difference between check , continue &amp; exit ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383625#M529427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;CHECK&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;If you use the CHECK &amp;lt;expr&amp;gt; statement within an event block but not within a loop, and the condition &amp;lt;expr&amp;gt; is not fulfilled, the system exits the processing block immediately. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the CHECK statement occurs in a loop using DO, WHILE, or LOOP, it is the loop that terminates, not the processing block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;CONTINUE&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;To terminate a single loop pass immediately and unconditionally, use the CONTINUE statement in the statement block of the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the statement, the system ignores any remaining statements in the current statement block, and starts the next loop pass. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 4 TIMES.&lt;/P&gt;&lt;P&gt;  IF SY-INDEX = 2.&lt;/P&gt;&lt;P&gt;    CONTINUE.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  WRITE SY-INDEX.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;EXIT&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;A subroutine normally ends at the ENDFORM statement. However, you can terminate them earlier by using the EXIT.&lt;/P&gt;&lt;P&gt;the EXIT statement occurs in a loop using DO, WHILE, or LOOP, it is the loop that terminates, not the processing block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ashokreedy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 11:47:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-check-continue-exit/m-p/2383625#M529427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T11:47:26Z</dc:date>
    </item>
  </channel>
</rss>

