<?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: Exception in RFC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335969#M1032960</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;Try to set some flag in rfc and after function call checkthe flag value and raise app error message&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Aug 2008 08:52:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-14T08:52:32Z</dc:date>
    <item>
      <title>Exception in RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335968#M1032959</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;could anybody tell me how to raise exception in RFC.If anybody can tell me with some example.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Lalit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 08:50:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335968#M1032959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T08:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Exception in RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335969#M1032960</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;Try to set some flag in rfc and after function call checkthe flag value and raise app error message&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 08:52:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335969#M1032960</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T08:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exception in RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335970#M1032961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use the RAISE statement to raise an exception in a function module. the exception should be first defined in the exceptions tab in the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after the fm is called, if the exception is raised, the value will be available in sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define an exception DATA_NOT_FOUND in the exceptions tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write a select query in the function module, if it returns sy-subrc as non-zero, then raise this exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select............&amp;lt;your select query&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise data_not_found.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the calling program...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function &amp;lt;function name&amp;gt;&lt;/P&gt;&lt;P&gt;exporting.....&lt;/P&gt;&lt;P&gt;importing....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;DATA_NOT_FOUND = 1 (this number will depend on the order in which you have defined exceptions in exceptions tab...1 means it is defined first, 2 will stand &lt;/P&gt;&lt;P&gt;                                      for the second exception)&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;in case the exception is raised, the value of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Priyank Jain on Aug 14, 2008 4:56 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 08:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335970#M1032961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T08:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Exception in RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335971#M1032962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have written th exception in the exception tab..but when i run the function module its giving me dump.do I need to do something extra  means write some code.&lt;/P&gt;&lt;P&gt;I have written the raise exception in the source code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Lalit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 08:58:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335971#M1032962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T08:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exception in RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335972#M1032963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need to catch the exception also when calling your fm...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is done through the EXCEPTIONS addition in the call function statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....and i hope your raise exception statement is in the source code of FM and not in the calling program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Priyank Jain on Aug 14, 2008 4:59 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 08:59:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335972#M1032963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T08:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Exception in RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335973#M1032964</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;Go to the exceptions tab and maintain some exception with short text.Suppose exception is exception1&lt;/P&gt;&lt;P&gt;Now in the source code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-uname &amp;lt;&amp;gt; ' ABCD'.&lt;/P&gt;&lt;P&gt;    raise exception1.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Papiya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 08:59:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exception-in-rfc/m-p/4335973#M1032964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T08:59:49Z</dc:date>
    </item>
  </channel>
</rss>

