<?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: Combine EXIT and CONTINUE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051814#M1701940</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sapperdapper,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease check the below code&lt;/P&gt;&lt;P&gt;WHILE Tabctr_curr2 &amp;lt;= Tabctr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; READ TABLE Tables_tab INTO wa_Tables INDEX Tabctr_curr2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Tab2 = wa_Tables-TABNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* In case the Tab2 we have selected just now is the same as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Tab1, we do not have to consider it further, but we can&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* just leave this iteration of the current loop and go on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* to the next.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF Tab2 = Tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ADD 1 TO Tabctr_curr2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; CONTINUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* If Tab2 is different from Tab1, we can now check whether&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* a) there are at least two tables in our Checktable and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* b) Tab2 is already there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;nbsp; If BOTH are true, we leave the current iteration of the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* First we check the line_ct (of the checktable) because&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* if it is 1, we don't even have to check it further, in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* that case there can't be any relations yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF line_ct &amp;gt;= 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* If this first condition is true, we loop through the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; LOOP AT Checktable INTO wa_Checktable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* If we find the current value of Tab2 already processed...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF wa_Checktable-TABNAME = Tab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* we exit this loop altogether.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Before the IF statement is closed, we set a variable that will&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* allow us to decide whether to leave the current iteration of the&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Tab2_loop and continue with the next (another Tab2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* In case the IF block is not executed, line_ct=1, so there can't be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* any relation processed yet, so the case where we want to leave the&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* current iteration of the Tab2_loop is not possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else. " if your line_ct &amp;lt; 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Tabfound = 'X'." Comment this &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADD 1 TO Tabctr_curr2. "Add this line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; CONTINUE.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " Add this line&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Now we check Tabfound and if it reads 'X'...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF Tabfound = 'X'.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " Comment this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* ... we leave the current iteration of the Tab2_loop and continue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* with the next. (This is a Workaround I currently use because I don't&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* know how, from the inner loop (LOOP AT Checktable) to directly leave&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* the current iteration of the outer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ADD 1 TO Tabctr_curr2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Comment this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; CONTINUE.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Comment this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Comment this &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Oct 2012 09:06:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-10-18T09:06:49Z</dc:date>
    <item>
      <title>Combine EXIT and CONTINUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051809#M1701935</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;I have a scenario where I have an outer loop (a WHILE loop)and within that, an inner loop at a checktable. If I find the currently used value (used by the outer loop) anywhere in the checktable, I want to directly exit the current iteration of the outer loop, increase it's counter and continue with the next. Can anybody tell me how I could do that?&lt;/P&gt;&lt;P&gt;Currently I am employing a workaround - in the IF clause that causes to EXIT the inner loop as soon as the value has been found, I set a flag_variable. After exiting (thus returning to the outer loop) I query that variable and when it has a certain value, I use the CONTINUE command to leave the current iteration of the outer WHILE_loop. &lt;/P&gt;&lt;P&gt;That is working - at least I guess so, I haven't tested the thing yet because the entire construction is immensely complex and not yet finished. However, I would like to do that more elegantly with a single command if that were possible?&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sapperdapper&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 08:40:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051809#M1701935</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-18T08:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Combine EXIT and CONTINUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051810#M1701936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sapperdapper &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1031/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you dont mind Can you please place your code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 08:45:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051810#M1701936</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-18T08:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Combine EXIT and CONTINUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051811#M1701937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes - I will just post the part of the whole which is of relevance here to avoid creating more confusion than all:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WHILE Tabctr_curr2 &amp;lt;= Tabctr.&lt;/P&gt;&lt;P&gt;&amp;nbsp; READ TABLE Tables_tab INTO wa_Tables INDEX Tabctr_curr2.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Tab2 = wa_Tables-TABNAME.&lt;/P&gt;&lt;P&gt;* In case the Tab2 we have selected just now is the same as&lt;/P&gt;&lt;P&gt;* Tab1, we do not have to consider it further, but we can&lt;/P&gt;&lt;P&gt;* just leave this iteration of the current loop and go on&lt;/P&gt;&lt;P&gt;* to the next.&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF Tab2 = Tab1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ADD 1 TO Tabctr_curr2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; CONTINUE.&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P&gt;* If Tab2 is different from Tab1, we can now check whether&lt;/P&gt;&lt;P&gt;* a) there are at least two tables in our Checktable and&lt;/P&gt;&lt;P&gt;* b) Tab2 is already there.&lt;/P&gt;&lt;P&gt;*&amp;nbsp; If BOTH are true, we leave the current iteration of the loop.&lt;/P&gt;&lt;P&gt;* First we check the line_ct (of the checktable) because&lt;/P&gt;&lt;P&gt;* if it is 1, we don't even have to check it further, in&lt;/P&gt;&lt;P&gt;* that case there can't be any relations yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF line_ct &amp;gt;= 2.&lt;/P&gt;&lt;P&gt;* If this first condition is true, we loop through the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; LOOP AT Checktable INTO wa_Checktable.&lt;/P&gt;&lt;P&gt;* If we find the current value of Tab2 already processed...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF wa_Checktable-TABNAME = Tab2.&lt;/P&gt;&lt;P&gt;* we exit this loop altogether.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ENDLOOP.&lt;/P&gt;&lt;P&gt;* Before the IF statement is closed, we set a variable that will&lt;/P&gt;&lt;P&gt;* allow us to decide whether to leave the current iteration of the&lt;/P&gt;&lt;P&gt;* Tab2_loop and continue with the next (another Tab2).&lt;/P&gt;&lt;P&gt;* In case the IF block is not executed, line_ct=1, so there can't be&lt;/P&gt;&lt;P&gt;* any relation processed yet, so the case where we want to leave the&lt;/P&gt;&lt;P&gt;* current iteration of the Tab2_loop is not possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Tabfound = 'X'.&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P&gt;* Now we check Tabfound and if it reads 'X'...&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF Tabfound = 'X'.&lt;/P&gt;&lt;P&gt;* ... we leave the current iteration of the Tab2_loop and continue&lt;/P&gt;&lt;P&gt;* with the next. (This is a Workaround I currently use because I don't&lt;/P&gt;&lt;P&gt;* know how, from the inner loop (LOOP AT Checktable) to directly leave&lt;/P&gt;&lt;P&gt;* the current iteration of the outer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ADD 1 TO Tabctr_curr2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; CONTINUE.&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sapperdapper&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 08:51:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051811#M1701937</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-18T08:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Combine EXIT and CONTINUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051812#M1701938</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;To my knowledge, there is no such command that would satisfy your requirement. By the way i think your workaround is good enough to handle this requirement. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1031/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Xavier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 09:02:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051812#M1701938</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-18T09:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Combine EXIT and CONTINUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051813#M1701939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friedrich, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have you considered about using "Gruppenstufenverarbeitung"&amp;nbsp; - I like this german buzz-word &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; - a.k.a Control Level Processing with AT..ENDAT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could write it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT firsttab ASSIGNIGN &amp;lt;s_tab1&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp; AT NEW keyfield1.&lt;/P&gt;&lt;P&gt;* READ CheckTable AND continue when new line has to be processed&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDAT.&lt;/P&gt;&lt;P&gt;* Go on with existing processing.&lt;/P&gt;&lt;P&gt;...&amp;nbsp; &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Hendrik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 09:03:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051813#M1701939</guid>
      <dc:creator>hendrik_brandes</dc:creator>
      <dc:date>2012-10-18T09:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Combine EXIT and CONTINUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051814#M1701940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sapperdapper,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease check the below code&lt;/P&gt;&lt;P&gt;WHILE Tabctr_curr2 &amp;lt;= Tabctr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; READ TABLE Tables_tab INTO wa_Tables INDEX Tabctr_curr2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Tab2 = wa_Tables-TABNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* In case the Tab2 we have selected just now is the same as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Tab1, we do not have to consider it further, but we can&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* just leave this iteration of the current loop and go on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* to the next.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF Tab2 = Tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ADD 1 TO Tabctr_curr2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; CONTINUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* If Tab2 is different from Tab1, we can now check whether&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* a) there are at least two tables in our Checktable and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* b) Tab2 is already there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;nbsp; If BOTH are true, we leave the current iteration of the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* First we check the line_ct (of the checktable) because&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* if it is 1, we don't even have to check it further, in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* that case there can't be any relations yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF line_ct &amp;gt;= 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* If this first condition is true, we loop through the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; LOOP AT Checktable INTO wa_Checktable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* If we find the current value of Tab2 already processed...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF wa_Checktable-TABNAME = Tab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* we exit this loop altogether.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Before the IF statement is closed, we set a variable that will&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* allow us to decide whether to leave the current iteration of the&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Tab2_loop and continue with the next (another Tab2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* In case the IF block is not executed, line_ct=1, so there can't be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* any relation processed yet, so the case where we want to leave the&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* current iteration of the Tab2_loop is not possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else. " if your line_ct &amp;lt; 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Tabfound = 'X'." Comment this &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADD 1 TO Tabctr_curr2. "Add this line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; CONTINUE.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " Add this line&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Now we check Tabfound and if it reads 'X'...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF Tabfound = 'X'.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " Comment this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* ... we leave the current iteration of the Tab2_loop and continue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* with the next. (This is a Workaround I currently use because I don't&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* know how, from the inner loop (LOOP AT Checktable) to directly leave&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* the current iteration of the outer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ADD 1 TO Tabctr_curr2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Comment this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; CONTINUE.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Comment this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Comment this &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 09:06:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051814#M1701940</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-18T09:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Combine EXIT and CONTINUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051815#M1701941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for all the help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@ Hendrik&lt;/P&gt;&lt;P&gt;I will have a look at that concept in due time. The first step is getting it to work at all, the second will be optimizing it as far as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sapperdapper&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 09:14:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051815#M1701941</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-18T09:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Combine EXIT and CONTINUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051816#M1701942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this help. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1031/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;data&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&lt;/SPAN&gt;iv &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;i&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;lv &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;matnr&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;data&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&lt;/SPAN&gt;it &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;sorted &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;table &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;of &lt;/SPAN&gt;mara &lt;SPAN class="L0S52"&gt;with &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;unique &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;key &lt;/SPAN&gt;matnr&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;data&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&lt;/SPAN&gt;wa &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;mara&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; lv &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'ABC'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; iv &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;10&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;select &lt;/SPAN&gt;* &lt;SPAN class="L0S52"&gt;from &lt;/SPAN&gt;mara &lt;SPAN class="L0S52"&gt;into &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;table &lt;/SPAN&gt;it &lt;SPAN class="L0S52"&gt;up &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;to &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;9 &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;rows&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;while &lt;/SPAN&gt;iv &amp;gt; &lt;SPAN class="L0S32"&gt;10&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;add &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1 &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;to &lt;/SPAN&gt;iv&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;loop &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;at &lt;/SPAN&gt;it &lt;SPAN class="L0S52"&gt;into &lt;/SPAN&gt;wa &lt;SPAN class="L0S52"&gt;where &lt;/SPAN&gt;matnr &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lv&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;endloop&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;check &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;subrc &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;0&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;endwhile&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 10:51:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051816#M1701942</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-10-18T10:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Combine EXIT and CONTINUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051817#M1701943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kesavadas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;honestly I don't know if it is helpful &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; The thing is so complex that I will have to think over it. Thanks in any case!&lt;/P&gt;&lt;P&gt;I've made it now, so for now the task is done - optimizing will be the next step, but no less important for that - the number of tables, currently four, will be much bigger in real life, so it will take much longer to run and every little thing I can tweak to make it smoother will help.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sapperdapper&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 12:53:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combine-exit-and-continue/m-p/9051817#M1701943</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-18T12:53:44Z</dc:date>
    </item>
  </channel>
</rss>

