SAP CX SQL EXCEPTION



Get Example source ABAP code based on a different SAP table
  


• CX_SQL_EXCEPTION ABAP_CLASS

ABAP_ADBC - CX_SQL_EXCEPTION
Any errors that occur when using dynamic SQL statements with ADBC raise exceptions of the class CX_SQL_EXCEPTION . Alongside its exception texts, this class has the following instance attributes, whose content indicates the cause of the error: AttributeMeaning DB_ERROR X , if an SQL statement was not executed by <(>DBMS <)>. SQL_CODE and SQL_MESSAGE contain further information in this case. DBOBJECT_EXISTS X , if a database object that already exists is created. DB_ERROR is also X in this case. DBOBJECT_NOT_EXISTS X , if a database object that does not exist is accessed. DB_ERROR is also X in this case. DUPLICATE_KEY X , if a DML statement would violate a unique table key. DB_ERROR is also X in this case. INTERNAL_ERRORInternal error code in the <(>DBMS<)>. Further troubleshooting is possible by reading the log files and trace files. INVALID_CURSOR X , if an invalid or closed database cursor is used. SQL_CODEDatabase-specific error code, if DB_ERROR is X . SQL_MESSAGEDatabase-specific error message, if DB_ERROR is X .