<?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: catching an error message from function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-error-message-from-function-module/m-p/2520776#M570522</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you want to show an error message and also want to catch it raise an exception along with the message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex MESSAGE e001(zisa) raising &amp;lt;EXCEPTION&amp;gt;. Declare this exception in the exception tab of the Function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use ERROR-MESSAGE if you just want to catch the message with out raisning the exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jul 2007 06:27:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-11T06:27:25Z</dc:date>
    <item>
      <title>catching an error message from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-error-message-from-function-module/m-p/2520772#M570518</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;     iam calling a function module into a pogram.the functionmodule generating a error message and it is coming out.&lt;/P&gt;&lt;P&gt;how to catch that error message into our program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt; return = &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above is the importing parameters from the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please provide the necessary solution for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is very urgent.............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 06:02:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-error-message-from-function-module/m-p/2520772#M570518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T06:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: catching an error message from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-error-message-from-function-module/m-p/2520773#M570519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check for the EXCEPTIONS and handle them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 06:19:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-error-message-from-function-module/m-p/2520773#M570519</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-07-11T06:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: catching an error message from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-error-message-from-function-module/m-p/2520774#M570520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if u want to raise exceptuion u have to declare in Exceptions tab of the function module..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if u want to get the error messages as oputput from the function module use Importing or Tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 06:22:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-error-message-from-function-module/m-p/2520774#M570520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T06:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: catching an error message from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-error-message-from-function-module/m-p/2520775#M570521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out this sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'ZAC_CALCULATE'
EXPORTING
IM_NUM1 = P_NUM1
IM_NUM2 = P_NUM2
IM_OPER = P_OPER
IMPORTING
EX_RESULT = W_RESULT
EXCEPTIONS
INVALID_OPERATOR1 = 1
ZERO_DIVIDE1 = 2
OTHERS = 3
.
IF SY-SUBRC EQ 0.

WRITE:/ 'RESULT IS', W_RESULT.

ELSEIF SY-SUBRC EQ 1.
WRITE:/ 'INVALID OPERATION'.

ELSEIF SY-SUBRC EQ 2.
WRITE:/ 'CANNOT DIVIDE BY ZERO'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 06:22:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-error-message-from-function-module/m-p/2520775#M570521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T06:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: catching an error message from function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-error-message-from-function-module/m-p/2520776#M570522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you want to show an error message and also want to catch it raise an exception along with the message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex MESSAGE e001(zisa) raising &amp;lt;EXCEPTION&amp;gt;. Declare this exception in the exception tab of the Function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use ERROR-MESSAGE if you just want to catch the message with out raisning the exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 06:27:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catching-an-error-message-from-function-module/m-p/2520776#M570522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T06:27:25Z</dc:date>
    </item>
  </channel>
</rss>

