<?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: exit to in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404971#M817687</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;&lt;/P&gt;&lt;P&gt;Use   LEAVE PROGRAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward if useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Feb 2008 09:36:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-11T09:36:44Z</dc:date>
    <item>
      <title>exit to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404970#M817686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I use EXIT command in subroutine its comming out of subroutine, but according to my requit=rement it has to come out of the program,&lt;/P&gt;&lt;P&gt;how can this be done.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 09:31:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404970#M817686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T09:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: exit to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404971#M817687</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;&lt;/P&gt;&lt;P&gt;Use   LEAVE PROGRAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward if useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 09:36:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404971#M817687</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T09:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: exit to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404972#M817688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LEAVE PROGRAM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 09:40:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404972#M817688</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T09:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: exit to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404973#M817689</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 use any of the following statements :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

STOP

LEAVE PROGRAM

LEAVE TO selection-screen.

LEAVE TO SCREEN 0.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 09:43:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404973#M817689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T09:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: exit to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404974#M817690</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----if it is in the loop comes out of the loop. &lt;/P&gt;&lt;P&gt;      -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;if it is in the subroutine comes out of the routine. &lt;/P&gt;&lt;P&gt;      -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;if it is in the program comes out of the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use stop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 09:47:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404974#M817690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T09:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: exit to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404975#M817691</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;Properties of 'Exit' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1- If used inside loop, it will end loop processing and come out of loop.&lt;/P&gt;&lt;P&gt;2- If used outside the loop, it leaves current processing block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to come out of program, set a flag inside the subroutine and then exit from that subroutine. Just after that subroutine call. Check that flag using 'if' and then again call 'exit'. This time it will leave the processing completely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ytest_swet2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : gv_flag type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  PERFORM rms.&lt;/P&gt;&lt;P&gt;  break-point.&lt;/P&gt;&lt;P&gt;  IF gv_flag = 'x'.&lt;/P&gt;&lt;P&gt;*The control will leave the program&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  PERFORM sms.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  rms&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM rms .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Above write other code&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; When need to leave program update the flag and come out&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  gv_flag = 'x'.&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;ENDFORM.                    " rms&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  sms&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM sms .&lt;/P&gt;&lt;P&gt;  WRITE : 'sms'.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " sms&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all subroutine rms is called. The control comes out of the subroutine and the flag  gv_flag is set to x. Further again we are checking the flag and exiting the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also we can call 'Leave program' to directly come out of program in this case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 09:50:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404975#M817691</guid>
      <dc:creator>Swetabh</dc:creator>
      <dc:date>2008-02-11T09:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: exit to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404976#M817692</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;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest you to debug the report properly and place the exit statement at the right place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2008 10:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exit-to/m-p/3404976#M817692</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-11T10:07:38Z</dc:date>
    </item>
  </channel>
</rss>

