<?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: Exceptions in Function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544168#M247683</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 any error occurs and is stored in the system messages, then they wud be stored in sy-msgid, sy-msgno, and msgv1, msgv2, msgv3,msgv4.&lt;/P&gt;&lt;P&gt;Use the FM: MESSAGE_TEXT_BUILD to display the error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Subbu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Aug 2006 09:42:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-10T09:42:19Z</dc:date>
    <item>
      <title>Exceptions in Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544165#M247680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a Function Module which does not have any Exception defined.Inside that Function Module there is a FORM which raises an exception. How can I catch that exception?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2006 09:34:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544165#M247680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-10T09:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Exceptions in Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544166#M247681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you should define that as EXCEPTION in EXCEPTIONS TAB of that function module.else it cant catch them.&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, 10 Aug 2006 09:38:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544166#M247681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-10T09:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Exceptions in Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544167#M247682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Anuritha,&lt;/P&gt;&lt;P&gt;  But Before that make sure that you define that exception in exception Tab...&lt;/P&gt;&lt;P&gt; Check this one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call function 'ITS_DOWNLOAD'
         EXPORTING
              bin_filesize            = bin_filesize
              filename                = tempfile
              filetype                = typ
              mode                    = mode
              wk1_t_format            = wk1_t_format
              wk1_n_format            = wk1_n_format
         IMPORTING
              filelength              = filelength
         TABLES
              data_tab                = data_tab
         EXCEPTIONS
              file_write_error        = 1
              gui_refuse_filetransfer = 2
              others                  = 3.

    if sy-subrc = 1.
      raise file_write_error.
    elseif sy-subrc = 2.
      raise unknown_error.
    elseif sy-subrc = 3.
      raise unknown_error.
    endif.
    exit.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2006 09:38:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544167#M247682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-10T09:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exceptions in Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544168#M247683</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 any error occurs and is stored in the system messages, then they wud be stored in sy-msgid, sy-msgno, and msgv1, msgv2, msgv3,msgv4.&lt;/P&gt;&lt;P&gt;Use the FM: MESSAGE_TEXT_BUILD to display the error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Subbu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2006 09:42:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544168#M247683</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-10T09:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Exceptions in Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544169#M247684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anuritha,&lt;/P&gt;&lt;P&gt;Use &amp;lt;b&amp;gt;TRY..CATCH..ENDTRY.&amp;lt;/b&amp;gt; to catch EXCEPTIONS .But before this you should know the name of the EXCEPTION.&lt;/P&gt;&lt;P&gt;Try this PSEUDO Code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TRY
CALL FUNCTION'TEST'.
CATCH &amp;lt;Exception Name&amp;gt; into variable.
write variable.
ENDTRY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And also Check this &amp;lt;a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/a9/b8eef8fe9411d4b2ee0050dadfb92b/content.htm"&amp;gt;Help&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2006 09:44:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544169#M247684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-10T09:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Exceptions in Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544170#M247685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a standard function mdule and EXCEPTIONS parameter is not defined...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2006 09:49:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544170#M247685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-10T09:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Exceptions in Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544171#M247686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What function module are you using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can a subroutine within a function raise an exception if the exception is not registered with the function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the subroutine raising an exception or does it issue an error/abend message?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2006 10:18:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exceptions-in-function-module/m-p/1544171#M247686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-10T10:18:57Z</dc:date>
    </item>
  </channel>
</rss>

