<?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: Raising exception issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468165#M1252446</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;RAISE . &lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;MESSAGE..... RAISING . &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 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;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;&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;An ABAP/4 module lets the system know that an error has occurred by issuing information,error or warning messages. you can also use success messages when a particular action is performed successfully. When the user presses ENTER, the current process is interrupted. The system returns the user to the SAP main menu using Abend message.&lt;/P&gt;&lt;P&gt;Message is displayed using MESSAGE Xnnn, where X is the type of the message and nnn is the number of the message.&lt;/P&gt;&lt;P&gt;You have to declare the Id of the message class in the program using&lt;/P&gt;&lt;P&gt;MESSAGE-ID cc,where cc is the message class.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Apr 2009 05:34:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-17T05:34:59Z</dc:date>
    <item>
      <title>Raising exception issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468159#M1252440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;              I would like to know the difference between following statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RAISE NO_BODY_FOUND &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 e300 RAISING NO_BODY_FOUND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that the first statement produce dump error while the other log an error message ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Senthil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 03:20:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468159#M1252440</guid>
      <dc:creator>senthil_kumar29</dc:creator>
      <dc:date>2009-04-17T03:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Raising exception issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468160#M1252441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RAISE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only occurs in function modules and methods. Terminates processing and raises an exception defined in the interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[RAISE EXCEPTION ref.  In this case, the exception object must already exist and the REF reference variable must point to it.|http://help.sap.com/saphelp_nw04/helpdata/EN/83/636d2012fc11d5991e00508b5d5211/content.htm]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 03:31:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468160#M1252441</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-04-17T03:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Raising exception issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468161#M1252442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Raise. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will be used in FM's to cature the error situations. Based on the exception raised, it'll assign teh sy-subrc value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other one is a normal error message raising in the programs (direct).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 03:44:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468161#M1252442</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T03:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Raising exception issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468162#M1252443</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;RAISE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is used in Function modules any unexpected results occurred  and in methods also used for same purpose . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message as u no it will be used in condition to display the status .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 04:19:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468162#M1252443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T04:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Raising exception issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468163#M1252444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     Thanks for the answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am calling a FM, and don't handle the exception it will through a dump right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the sample code which is throwing a dump error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_HR_SUPERIOR_ROLE'&lt;/P&gt;&lt;P&gt;              EXPORTING&lt;/P&gt;&lt;P&gt;                otype      = 'P'&lt;/P&gt;&lt;P&gt;                sobid      = v_sobid&lt;/P&gt;&lt;P&gt;              IMPORTING&lt;/P&gt;&lt;P&gt;                supervisor = v_supervisor.&lt;/P&gt;&lt;P&gt;            IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;              PERFORM: get_email_addr USING v_supervisor v_sup_addr.&lt;/P&gt;&lt;P&gt;              IF v_sup_addr &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;                CLEAR i_receivers.                          "WIl03Y&lt;/P&gt;&lt;P&gt;                i_receivers-rec_type = 'U'.&lt;/P&gt;&lt;P&gt;                i_receivers-receiver = v_sup_addr.&lt;/P&gt;&lt;P&gt;                APPEND i_receivers.&lt;/P&gt;&lt;P&gt;              ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact this FM module have the following exceptions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;     NOBODY_FOUND&lt;/P&gt;&lt;P&gt;      UNKNOWN_DELEGTYPE&lt;/P&gt;&lt;P&gt;     NO_ACTIVE_PLVAR&lt;/P&gt;&lt;P&gt;     ERROR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When this FM returns exception its dumping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Senthil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 04:49:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468163#M1252444</guid>
      <dc:creator>senthil_kumar29</dc:creator>
      <dc:date>2009-04-17T04:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Raising exception issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468164#M1252445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you should add the exceptions part else it will dump in case of any exceptions raised by the FM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_HR_SUPERIOR_ROLE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;otype = 'P'&lt;/P&gt;&lt;P&gt;sobid = v_sobid&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;supervisor = v_supervisor&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EXCEPTIONS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOBODY_FOUND = 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UNKNOWN_DELEGTYPE = 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NO_ACTIVE_PLVAR = 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR = 4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OTHERS = 5.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if you do not handle the sy-subrc case for the exceptions, it does not matter. But the exceptions declarations need to be there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dev Parbutteea on Apr 17, 2009 7:12 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 05:11:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468164#M1252445</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2009-04-17T05:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Raising exception issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468165#M1252446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;RAISE . &lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;MESSAGE..... RAISING . &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 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;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;&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;An ABAP/4 module lets the system know that an error has occurred by issuing information,error or warning messages. you can also use success messages when a particular action is performed successfully. When the user presses ENTER, the current process is interrupted. The system returns the user to the SAP main menu using Abend message.&lt;/P&gt;&lt;P&gt;Message is displayed using MESSAGE Xnnn, where X is the type of the message and nnn is the number of the message.&lt;/P&gt;&lt;P&gt;You have to declare the Id of the message class in the program using&lt;/P&gt;&lt;P&gt;MESSAGE-ID cc,where cc is the message class.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 05:34:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468165#M1252446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T05:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Raising exception issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468166#M1252447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you will use the exception like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;i_receivers-receiver = v_sup_addr.
APPEND i_receivers.
if sy-subrc NE 0.
raise exception &amp;lt;exception name&amp;gt;.
endif.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 12:41:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468166#M1252447</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-04-17T12:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Raising exception issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468167#M1252448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Guys.. Solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 16:49:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/raising-exception-issue/m-p/5468167#M1252448</guid>
      <dc:creator>senthil_kumar29</dc:creator>
      <dc:date>2009-04-17T16:49:13Z</dc:date>
    </item>
  </channel>
</rss>

