<?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: Loop...Endloop does not serve the purpose in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276367#M1217985</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;Use EXIT in the loop. EXIT dose not take you to next loop pass but it takes you out of loop. CONTINUE takes you to next loop pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pranaya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Mar 2009 07:03:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-13T07:03:22Z</dc:date>
    <item>
      <title>Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276358#M1217976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I have one internal table with 10000 records . I want to read a specific record  with certain WHERE clause with logical operators.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Now my requirement is that  as soon as that condition is satisfied ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;control should go to NEXT STATEMENT AFTER  Endloop  BUT NOT to the next loop pass so that it will not read&lt;/P&gt;&lt;P&gt;&amp;gt;remaining entries.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Using EXIT takes us to Next Loop Pass which I want to avoid and come out of the LOOP ..ENDLOOP,&lt;/P&gt;&lt;P&gt; Using READ TABLE does not allow logical operators like NE, GT,LE...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can be done? Suggestions are most welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks...........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Mar 13, 2009 8:21 AM - fix formatting&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 05:55:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276358#M1217976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T05:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276359#M1217977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using &lt;STRONG&gt;STOP&lt;/STRONG&gt; inside the loop...endloop.Stop will come out of the loop.&lt;/P&gt;&lt;P&gt;Also try settings Flag at appropriate place if not working paste the codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 05:58:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276359#M1217977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T05:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276360#M1217978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use a flag and write exit and once that loop exits and comes to another loop..&lt;/P&gt;&lt;P&gt;now check the flag again and if the falg is on,then exit again...&lt;/P&gt;&lt;P&gt;this should serve the purpose..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop2&lt;/P&gt;&lt;P&gt;       flag = X &lt;/P&gt;&lt;P&gt;       EXIT&lt;/P&gt;&lt;P&gt;   endloop&lt;/P&gt;&lt;P&gt;if flag = 'x'&lt;/P&gt;&lt;P&gt;EXIT&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;Endloop&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sravan Kumar on Mar 13, 2009 7:00 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 05:59:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276360#M1217978</guid>
      <dc:creator>former_member242255</dc:creator>
      <dc:date>2009-03-13T05:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276361#M1217979</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;EXIT statement , if used inside a loop..will exit the loop and will goto the next statment after the endloop statement. Please check if u are using a  nested loop like loop endloop inside another loop endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works perfect for one of my programs.&lt;/P&gt;&lt;P&gt;see the code below..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab type table of spfli,&lt;/P&gt;&lt;P&gt;      wa type spfli,&lt;/P&gt;&lt;P&gt;      itab1 type table of sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from spfli into table itab&lt;/P&gt;&lt;P&gt;where carrid like 'A%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa where carrid = 'AA'.&lt;/P&gt;&lt;P&gt;write:/ wa-carrid.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ wa-connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keerthi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Keerthy K on Mar 13, 2009 7:02 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 06:00:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276361#M1217979</guid>
      <dc:creator>keerthy_k</dc:creator>
      <dc:date>2009-03-13T06:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276362#M1217980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi;&lt;/P&gt;&lt;P&gt;Put &lt;/P&gt;&lt;P&gt;LOOP  where &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP&lt;/P&gt;&lt;P&gt;Next Condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP would continue till the condition meets and would be in next condition,&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shashi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 06:01:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276362#M1217980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T06:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276363#M1217981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do it this way..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop itab into wa_tab.


if wa-tab-matnr = 'XYZ'.   " Write Where Logic in If condition instaed of where in loop.

exit.
endif.

endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 06:04:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276363#M1217981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T06:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276364#M1217982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use &lt;STRONG&gt;Check&lt;/STRONG&gt; like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt; check bbb &amp;lt;&amp;gt; ' '.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where bbb is a field of itab. when bbb  will be blank the loop terminates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sarbajit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 06:08:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276364#M1217982</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2009-03-13T06:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276365#M1217983</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;Here you can use exit. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually in a loop:&lt;/P&gt;&lt;P&gt;exit --&amp;gt; execution goes out of loop, to statement next to endloop&lt;/P&gt;&lt;P&gt;continue --&amp;gt; execution goes to next loop phase&lt;/P&gt;&lt;P&gt;stop --&amp;gt;  it acts a exit but in reports execution will go to next event.&lt;/P&gt;&lt;P&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>Fri, 13 Mar 2009 06:19:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276365#M1217983</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2009-03-13T06:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276366#M1217984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use EXIT statement here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab .  &lt;/P&gt;&lt;P&gt;If &amp;lt;Condition&amp;gt;. &lt;/P&gt;&lt;P&gt;Exit.&lt;/P&gt;&lt;P&gt;Endif. &lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&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;Joan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 06:33:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276366#M1217984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T06:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276367#M1217985</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;Use EXIT in the loop. EXIT dose not take you to next loop pass but it takes you out of loop. CONTINUE takes you to next loop pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pranaya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 07:03:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276367#M1217985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T07:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276368#M1217986</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;EXIT statement is the most recommended option fr your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When EXIT is encountered, control comes out of the loop to the next statement after ENDLOOP. On contrary, CONTINUE statement goes to the next pass of the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try EXIT. It will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vishal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 07:15:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276368#M1217986</guid>
      <dc:creator>vishal_sharda2</dc:creator>
      <dc:date>2009-03-13T07:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276369#M1217987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Use &lt;STRONG&gt;Check&lt;/STRONG&gt; like&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; loop at itab.&lt;/P&gt;&lt;P&gt;&amp;gt;  check bbb &amp;lt;&amp;gt; ' '.&lt;/P&gt;&lt;P&gt;&amp;gt; endloop.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; where bbb is a field of itab. when bbb  will be blank the loop terminates.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Hope it solve your problem.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Sarbajit&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;WRONG&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CHECK cond&lt;/STRONG&gt; works like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF cond.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  &lt;STRONG&gt;CONTINUE.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ENDIF.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 07:20:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276369#M1217987</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-03-13T07:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276370#M1217988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you need to cascade an exit from an inner loop, you should do it like this.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT itab1.
  LOOP AT itab2.
    LOOP AT itab3.
      IF cond.
        l_exit_flag = 'X'.
        EXIT.
      ENDIF.
    ENDLOOP.
    IF l_exit_flag IS NOT INITIAL.
      EXIT.
    ENDIF.
  ENDLOOP.
  IF l_exit_flag IS NOT INITIAL.
    EXIT.
  ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXIT does &lt;STRONG&gt;NOT&lt;/STRONG&gt; force a new loop iteration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 07:24:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276370#M1217988</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-03-13T07:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276371#M1217989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mean by the follwing code&lt;/P&gt;&lt;P&gt;   loop at itab.&lt;/P&gt;&lt;P&gt;     check itab-bbb = ' ' .&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The loop iterates as long as the check condition will be true. But terminates loop iteration if the check condition become false. Is it Wrong?&lt;/P&gt;&lt;P&gt;Please Reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you have written CHECK = IF Continue ENDIF that is true also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sarbajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 07:38:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276371#M1217989</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2009-03-13T07:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276372#M1217990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ubhaka&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The exit statement takes you out of the current loop.You can set some flag(in the first loop) when your condition is satisfied and can come out of any number of loops-simplest of all .Also using stop will take you to the end of selection event.It all depends on your reqirement.Word of caution-Check and stop will not set the sy-subrc.If you want to use it set numeric value to it before exiting.Hope this solve your query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 07:42:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276372#M1217990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T07:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Loop...Endloop does not serve the purpose</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276373#M1217991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;issue closed.  thanks......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2009 04:23:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-endloop-does-not-serve-the-purpose/m-p/5276373#M1217991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-17T04:23:27Z</dc:date>
    </item>
  </channel>
</rss>

