<?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 Handling non-catchable exceptions in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-non-catchable-exceptions/m-p/1703323#M308192</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;I would like to know how can I handle an exception, which is not catchable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I'm developing an ABAP, which contains Native SQL commands with the "EXEC SQL" command. In the help of this command there are several non-catchable exceptions, for example: EXSQL_DSQL_DUPLICATE_CURSOR &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This exception occurs for me very often, and because it is not catchable by the TRY...CATCH...ENDTRY command, I would like to handle it with an other solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In most common the program works with this sequence: &lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;OPEN CURSOR C FOR... (SELECT command)&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;FETCH ...&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;CLOSE CURSOR C.&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some cases, after the CLOSE CURSOR C, the cursor remains still open, and I get a short dump on the next run with the EXSQL_DSQL_DUPLICATE_CURSOR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to query the state of the cursor C? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Nov 2006 12:23:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-17T12:23:40Z</dc:date>
    <item>
      <title>Handling non-catchable exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-non-catchable-exceptions/m-p/1703323#M308192</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;I would like to know how can I handle an exception, which is not catchable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I'm developing an ABAP, which contains Native SQL commands with the "EXEC SQL" command. In the help of this command there are several non-catchable exceptions, for example: EXSQL_DSQL_DUPLICATE_CURSOR &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This exception occurs for me very often, and because it is not catchable by the TRY...CATCH...ENDTRY command, I would like to handle it with an other solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In most common the program works with this sequence: &lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;OPEN CURSOR C FOR... (SELECT command)&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;FETCH ...&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;CLOSE CURSOR C.&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some cases, after the CLOSE CURSOR C, the cursor remains still open, and I get a short dump on the next run with the EXSQL_DSQL_DUPLICATE_CURSOR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to query the state of the cursor C? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 12:23:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-non-catchable-exceptions/m-p/1703323#M308192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T12:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Handling non-catchable exceptions</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/handling-non-catchable-exceptions/m-p/1703324#M308193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This isn't answering your question directly, but perhaps investigate the CL_SQL* classes instead of using raw Native SQL. They wrap Native SQL in a nice set of classes and I'm pretty sure they raise class based exceptions that you can catch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 12:41:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/handling-non-catchable-exceptions/m-p/1703324#M308193</guid>
      <dc:creator>michael-john_turner</dc:creator>
      <dc:date>2006-11-17T12:41:24Z</dc:date>
    </item>
  </channel>
</rss>

