<?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: which is not an exit command? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677396#M298720</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To terminate an entire loop immediately and unconditionally, use the EXIT statement in the statement block of the loop.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;After this statement, the loop is terminated, and processing resumes after the closing statement of the loop structure (ENDDO, ENDWHILE, ENDLOOP, ENDSELECT). In nested loops, only the current loop is terminated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 4 TIMES.&lt;/P&gt;&lt;P&gt;  IF sy-index = 3.&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;The list output is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         1          2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the third loop pass, the loop is terminated before the WRITE statement is processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STOP: The statement is only intended for use in the INITIALIZATION,&lt;/P&gt;&lt;P&gt; AT SELECTION-SCREEN, START-OF-SELECTION, and GET events. It&lt;/P&gt;&lt;P&gt; terminates the current processing block in an executable&lt;/P&gt;&lt;P&gt; program and triggers the END-OF-SELECTION event. In all other&lt;/P&gt;&lt;P&gt; processing blocks, or when you do not want to trigger the&lt;/P&gt;&lt;P&gt; END-OF-SELECTION event, you must use EXIT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Nov 2006 10:56:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-06T10:56:58Z</dc:date>
    <item>
      <title>which is not an exit command?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677387#M298711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;exit,stop,cancel and back&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 10:35:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677387#M298711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T10:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: which is not an exit command?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677388#M298712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;stop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 10:37:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677388#M298712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T10:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: which is not an exit command?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677389#M298713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BACK and STOP are not exit command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CANCLE is not command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 10:38:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677389#M298713</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2006-11-06T10:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: which is not an exit command?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677390#M298714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the diff btw stop and exit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 10:39:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677390#M298714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T10:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: which is not an exit command?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677391#M298715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i think exit  is the exir command as name suggest &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The behaviour of exit is diff in diff situations&lt;/P&gt;&lt;P&gt;if you use it in coditional loops like do..enddo, while..endwhile and loop and loop ....it will comeout of the conditional loop.&lt;/P&gt;&lt;P&gt;and it behaves diff in events...&lt;/P&gt;&lt;P&gt;if you use exit in your prog it won't leave the prog but it depends where you used exit.&lt;/P&gt;&lt;P&gt;for example if you use exit after start-of-selection then program goes to the list(report output) without processing further.&lt;/P&gt;&lt;P&gt;if you use in initialization then it will directly to the selection screen without processing further.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 10:40:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677391#M298715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T10:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: which is not an exit command?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677392#M298716</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; immediately leaves the current event and processing continues with the next event (or action, such as displaying the selection screen or output list). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;stop&amp;lt;/b&amp;gt; immediately leaves the current event and goes directly to the end-of-selection event. Executing stop within end-of-selection leaves the event. It doesn't cause an infinite loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In events that occur before start-of-selection &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;exit and check&amp;lt;/b&amp;gt; have the same behavior. They both leave the event immediately and processing continues with the next event . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In start-of-selection and events that occur after it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;exit&amp;lt;/b&amp;gt; terminates the report and shows the output list. A single exception exists; within top-of-page, exit behaves like check. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;check&amp;lt;/b&amp;gt; leaves the event and processing continues with the 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;P&gt;Anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;please mark points to all helpful answers&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 10:40:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677392#M298716</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-11-06T10:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: which is not an exit command?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677393#M298717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Cancel&amp;lt;/b&amp;gt; is not an exit command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leaving Event Blocks Using STOP&lt;/P&gt;&lt;P&gt;If you use the STOP statement within an event block, the system stops processing the block&lt;/P&gt;&lt;P&gt;immediately. The ABAP runtime environment triggers the next event&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leaving Event Blocks Using EXIT&lt;/P&gt;&lt;P&gt;If you use the STOP statement within an event block but not in a loop, the system stops&lt;/P&gt;&lt;P&gt;processing the block immediately. The ABAP runtime environment triggers the next event. Before and during selection screen processing, the next event in the prescribed sequence is always called. From the START-OF-SELECTION event onwards, the system starts the list processor directly when the EXIT statement occurs, and displays the list. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If 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;Leaving Event Blocks Using CHECK&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&lt;/P&gt;&lt;P&gt;condition &amp;lt;expr&amp;gt; is not fulfilled, the system exits the processing block immediately.&lt;/P&gt;&lt;P&gt;&amp;lt;expr&amp;gt; can be any logical expression or the name of a selection table. If you specify a selection&lt;/P&gt;&lt;P&gt;table and the contents of the corresponding table work are do not fulfill the condition in the&lt;/P&gt;&lt;P&gt;selection table, it is the same as a false logical expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;You can exit out of an event at any time using the following statements:&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;exit &lt;/P&gt;&lt;P&gt;check &lt;/P&gt;&lt;P&gt;stop &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In all events &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check immediately leaves the current event and processing continues with the next event (or action, such as displaying the selection screen or output list). &lt;/P&gt;&lt;P&gt;stop immediately leaves the current event and goes directly to the end-of-selection event. Executing stop within end-of-selection leaves the event. It doesn't cause an infinite loop. &lt;/P&gt;&lt;P&gt;In events that occur before start-of-selection &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exit and check have the same behavior. They both leave the event immediately and processing continues with the next event (or action, such as display of the selection screen). &lt;/P&gt;&lt;P&gt;In start-of-selection and events that occur after it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exit terminates the report and shows the output list. A single exception exists; within top-of-page, exit behaves like check. &lt;/P&gt;&lt;P&gt;check leaves the event and processing continues with the next event (or action, such as display of the output list). &lt;/P&gt;&lt;P&gt;check, exit, and stop do not set the value of sy-subrc. If you want to set it, you can assign a numeric value to it before leaving. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vibha &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 10:40:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677393#M298717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T10:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: which is not an exit command?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677394#M298718</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;you can define exit-commands with function type 'E' (for module exit AT EXIT-COMMAND)&lt;/P&gt;&lt;P&gt;in menu painter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 10:41:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677394#M298718</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-11-06T10:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: which is not an exit command?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677395#M298719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if u are talking abt module pool progamming &lt;/P&gt;&lt;P&gt;back, exit and cancel are exit commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if its report programming&lt;/P&gt;&lt;P&gt;back and cancel are not commands&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 10:41:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677395#M298719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T10:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: which is not an exit command?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677396#M298720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To terminate an entire loop immediately and unconditionally, use the EXIT statement in the statement block of the loop.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;After this statement, the loop is terminated, and processing resumes after the closing statement of the loop structure (ENDDO, ENDWHILE, ENDLOOP, ENDSELECT). In nested loops, only the current loop is terminated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 4 TIMES.&lt;/P&gt;&lt;P&gt;  IF sy-index = 3.&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;The list output is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         1          2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the third loop pass, the loop is terminated before the WRITE statement is processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STOP: The statement is only intended for use in the INITIALIZATION,&lt;/P&gt;&lt;P&gt; AT SELECTION-SCREEN, START-OF-SELECTION, and GET events. It&lt;/P&gt;&lt;P&gt; terminates the current processing block in an executable&lt;/P&gt;&lt;P&gt; program and triggers the END-OF-SELECTION event. In all other&lt;/P&gt;&lt;P&gt; processing blocks, or when you do not want to trigger the&lt;/P&gt;&lt;P&gt; END-OF-SELECTION event, you must use EXIT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 10:56:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677396#M298720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T10:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: which is not an exit command?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677397#M298721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     exit-&amp;gt; terminates current loop pass and control&lt;/P&gt;&lt;P&gt;     stop -&amp;gt; terminates current program    &lt;/P&gt;&lt;P&gt;     cancel-&amp;gt; &lt;/P&gt;&lt;P&gt;     back -&amp;gt; used in interactive report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    stop cancel back are not exit command &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2006 11:00:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-is-not-an-exit-command/m-p/1677397#M298721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-06T11:00:28Z</dc:date>
    </item>
  </channel>
</rss>

