<?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: Catch Runtime Error Call Function - RFC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-runtime-error-call-function-rfc/m-p/13923334#M2037709</link>
    <description>&lt;P&gt;It seems reasonable to check this before the FM call. Cheers!&lt;/P&gt;</description>
    <pubDate>Wed, 30 Oct 2024 06:52:59 GMT</pubDate>
    <dc:creator>tunakaner</dc:creator>
    <dc:date>2024-10-30T06:52:59Z</dc:date>
    <item>
      <title>Catch Runtime Error Call Function - RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-runtime-error-call-function-rfc/m-p/5396242#M1240065</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;When I call a function in RFC mode, I would like to catch the exceptions to don't display a horrible dump but rather a error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The exceptions that I would like to catch are :&lt;/P&gt;&lt;P&gt;- CALL_FUNCTION_NO_DEST &lt;/P&gt;&lt;P&gt;- CALL_FUNCTION_NOT_REMOTE&lt;/P&gt;&lt;P&gt;- CALL_FUNCTION_REMOTE_ERROR &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use the syntax : &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CATCH SYSTEM-EXCEPTIONS CALL_FUNCTION_NOT_REMOTE = 1.
ENDCATCH.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have a syntax error : "system-exception" expected, not "CALL_FUNCTION_NOT_REMOTE".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see in ABAP Keyword Documentation that for the CALL FUNCTION syntax, the Runtime errors aren't catchable....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Xavier.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2009 14:57:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch-runtime-error-call-function-rfc/m-p/5396242#M1240065</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-26T14:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Catch Runtime Error Call Function - RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-runtime-error-call-function-rfc/m-p/5396243#M1240066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of capture exceptions you can do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'RFC_VERIFY_DESTINATION'
  EXPORTING
    DESTINATION = V_DESTINATION
        TIMEOUT = 5
  EXCEPTIONS
    INTERNAL_FAILURE           = 1
    TIMEOUT                    = 2
    DEST_COMMUNICATION_FAILURE = 3
    DEST_SYSTEM_FAILURE        = 4
    UPDATE_FAILURE             = 5
    NO_UPDATE_AUTHORITY        = 6
    OTHERS                     = 7.
 
  IF SY-SUBRC EQ 0.
    " Call Your RFC here 
  ELSE.
    " Make a Error message 
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2009 15:06:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch-runtime-error-call-function-rfc/m-p/5396243#M1240066</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-03-26T15:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Catch Runtime Error Call Function - RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-runtime-error-call-function-rfc/m-p/5396244#M1240067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The function 'RFC_VERIFY_DESTINATION' allow to return the error RFC connection as I want but, in the integration system, everybody SAP users haven't the object authorization 'S_RFC_ADM'. So, the function isn't useable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another process allow to control RFC connection without particulary authorization object?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Xavier Couloumies on Mar 30, 2009 3:39 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2009 13:39:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch-runtime-error-call-function-rfc/m-p/5396244#M1240067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-30T13:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Catch Runtime Error Call Function - RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-runtime-error-call-function-rfc/m-p/5396245#M1240068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xavier,&lt;/P&gt;&lt;P&gt;I was coming across the same problem, Googled it and came across your thread. Although a little late on replying and am sure you've got around your problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for others, who are coming across the same problem... and i quote from SAP online help..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;" Function module calls with the addition DESTINATION can handle two special system exceptions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SYSTEM_FAILURE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This is triggered if a system crash occurs on the receiving side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;COMMUNICATION_FAILURE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This is triggered if there is a connection or communication problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both cases, you can use the optional addition&lt;/P&gt;&lt;P&gt;... MESSAGE mess&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to receive a description of the error."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you simply add the following code at the end of RFC FM&lt;/P&gt;&lt;P&gt;       &lt;EM&gt;Call Function&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DESTINATION lv_rfc_dest&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;       &lt;EM&gt;....&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;      &lt;EM&gt;EXCEPTIONS&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;          &lt;EM&gt;system_failure        = 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;          &lt;EM&gt;communication_failure = 2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;          &lt;EM&gt;OTHERS                = 99.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Message text example&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Data: lv_error_text(100) TYPE c&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;       &lt;EM&gt;Call Function&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DESTINATION lv_rfc_dest&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;       &lt;EM&gt;....&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;      &lt;EM&gt;EXCEPTIONS&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;       &lt;EM&gt;system_failure        = 1  MESSAGE lv_error_text&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;        &lt;EM&gt;communication_failure = 2  MESSAGE lv_error_text&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;          &lt;EM&gt;OTHERS                = 99.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;here is the complete reference  &lt;A href="http://tinyurl.com/ykvf99x" target="test_blank"&gt;http://tinyurl.com/ykvf99x&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Asim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 17:20:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch-runtime-error-call-function-rfc/m-p/5396245#M1240068</guid>
      <dc:creator>former_member186695</dc:creator>
      <dc:date>2010-02-19T17:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Catch Runtime Error Call Function - RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/catch-runtime-error-call-function-rfc/m-p/13923334#M2037709</link>
      <description>&lt;P&gt;It seems reasonable to check this before the FM call. Cheers!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 06:52:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/catch-runtime-error-call-function-rfc/m-p/13923334#M2037709</guid>
      <dc:creator>tunakaner</dc:creator>
      <dc:date>2024-10-30T06:52:59Z</dc:date>
    </item>
  </channel>
</rss>

