<?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: terminate a program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402562#M194505</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anyi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        Error messages does not allow you to continue the process. If you need to continue your process just specify the message type as I (INFORMATION). This will let you to continue process and this also pop-ups as ERROR MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MESSAGE I000(ZZ) WITH 'ANYI IS TOO FAT'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jun 2006 19:10:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-29T19:10:33Z</dc:date>
    <item>
      <title>terminate a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402556#M194499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;Just wondering how can we terminate a program or return to the orginal screen from an if loop. I know there is this thing called EXIT, but it seems only quite the inner most loop, what should I do for quitting multiple loops?&lt;/P&gt;&lt;P&gt;Also, how to make an error message appear in like the pop-up instead of showing on the status bar at the bottom? thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anyi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 17:54:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402556#M194499</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T17:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: terminate a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402557#M194500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use &amp;lt;b&amp;gt;STOP&amp;lt;/b&amp;gt; Statement. Stop statement will make you to come out of a program where as an EXIT statement will make you to just come out of a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 17:54:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402557#M194500</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T17:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: terminate a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402558#M194501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;stop. would bring you to the start of  end of selection event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exit. (inside an event, would terminate the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;may be you can trigger multiple exits till you come out of the outermost of loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alternatively,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;issue an error message&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message e000(zz0.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 17:55:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402558#M194501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T17:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: terminate a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402559#M194502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi anyi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; what should I do for quitting multiple loops?&lt;/P&gt;&lt;P&gt;use--EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to make an error message appear in like the pop-up instead of showing on the status bar at the bottom&lt;/P&gt;&lt;P&gt;message e001(zz).&lt;/P&gt;&lt;P&gt;zz- message class&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 17:59:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402559#M194502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T17:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: terminate a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402560#M194503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If error message and stopping the program are related&lt;/P&gt;&lt;P&gt;try issuing message type A to get popup screen and exit the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message A001(zz).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 18:09:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402560#M194503</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-06-29T18:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: terminate a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402561#M194504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Err...a question following this thread. What if the error message is not standard? Say for example, the error message is "Anyi is too fat" &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; and I want the process to continue? Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 19:06:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402561#M194504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T19:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: terminate a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402562#M194505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anyi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        Error messages does not allow you to continue the process. If you need to continue your process just specify the message type as I (INFORMATION). This will let you to continue process and this also pop-ups as ERROR MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MESSAGE I000(ZZ) WITH 'ANYI IS TOO FAT'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 19:10:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402562#M194505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T19:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: terminate a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402563#M194506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Anyi,&lt;/P&gt;&lt;P&gt;  Use Information Message in this regards as error message stops you from proceeding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MESSAGE I100(ZI) WITH 'ANYI IS TOO FAT'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 19:14:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402563#M194506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T19:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: terminate a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402564#M194507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;err...is there such a structure like raise exception kind of thing in ABAP, I know there was one in JAVA. Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 19:21:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402564#M194507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T19:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: terminate a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402565#M194508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anyi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        You had RAISE statement in ABAP. But it only make sense with conjuction of Function modules only.&lt;/P&gt;&lt;P&gt;You can handle exceptions based SY-SUBRC value returned for your Function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 19:23:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402565#M194508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T19:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: terminate a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402566#M194509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From  Help.  Only used in conjunction with function modules.&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;&amp;lt;i&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Raising Exceptions&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two ABAP statements for raising exceptions. They can only be used in function modules:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;RAISE &amp;lt;except&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE..... RAISING &amp;lt;except&amp;gt;.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The effect of these statements depends on whether the calling program handles the exception or not. If the name &amp;lt;except&amp;gt; of the exception or OTHERS occurs in the EXCEPTIONS addition of the CALL FUNCTION statement, the exception is handled by the calling program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the calling program does not handle the exception&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The RAISE statement terminates the program and switches to debugging mode. &lt;/P&gt;&lt;P&gt;The MESSAGE ..... RAISING statement display the specified message. How the processing continues depends on the message type. &lt;/P&gt;&lt;P&gt;If the calling program handles the exception, both statements return control to the program. No values are transferred. The MESSAGE ..... RAISING statement does not display a message. Instead, it fills the system fields SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 to SY-MSGV4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source Code of READ_SPFLI_INTO_TABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The entire source code of READ_SPFLI_INTO_TABLE looks like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION READ_SPFLI_INTO_TABLE.

*"------------------------------------------------------------
*"*"Local interface:
*"       IMPORTING
*"             VALUE(ID) LIKE  SPFLI-CARRID DEFAULT 'LH '
*"       EXPORTING
*"             VALUE(ITAB) TYPE  SPFLI_TAB
*"       EXCEPTIONS
*"              NOT_FOUND
*"------------------------------------------------------------

  SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID = ID.

  IF SY-SUBRC NE 0.
    MESSAGE E007(AT) RAISING NOT_FOUND.
  ENDIF.

ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module reads all of the data from the database table SPFLI where the key field CARRID is equal to the import parameter ID and places the entries that it finds into the internal table SPFLI_TAB. If it cannot find any entries, the exception NOT_FOUND is triggered using MESSAGE...RAISING. Otherwise, the table is passed to the caller as an exporting parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/i&amp;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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 19:30:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402566#M194509</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-29T19:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: terminate a program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402567#M194510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first clarify that are you using IF or LOOP.&lt;/P&gt;&lt;P&gt;IF is not a LOOP.its a conditional statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to skip the processing from the START-OF-SELECTION event, use STOP command, which will go directly to END OF SELECTION if you write STOP in START-OF-SELECTION event. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check POP_UP* function modules in SE37, which will help you to display text in popup window.&lt;/P&gt;&lt;P&gt;whenever any error, call that function module instead of MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;srikanth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2006 19:37:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/terminate-a-program/m-p/1402567#M194510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-29T19:37:42Z</dc:date>
    </item>
  </channel>
</rss>

