‎2006 Nov 17 12:23 PM
Hi!
I would like to know how can I handle an exception, which is not catchable?
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
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.
In most common the program works with this sequence:
EXEC SQL.
OPEN CURSOR C FOR... (SELECT command)
ENDEXEC.
EXEC SQL.
FETCH ...
ENDEXEC.
EXEC SQL.
CLOSE CURSOR C.
ENDEXEC.
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.
Is there a way to query the state of the cursor C?
Thank you in advance
Tamá
‎2006 Nov 17 12:41 PM
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.
MJ
‎2006 Nov 17 12:41 PM
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.
MJ