SAP CX SQL EXCEPTION

Get Example source ABAP code based on a different SAP table
  


ARTICLE
• CX_SQL_EXCEPTION ABAP_CLASS

CX_SQL_EXCEPTION - Exception Class
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 contents indicate 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 you want to create a database object that already exists. DB_ERROR is also 'X' in this case. DBOBJECT_NOT_EXISTS'X', if you want to access a database object that does not exist. 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 from DBMS. For further troubleshooting, see the log and trace files. INVALID_CURSOR'X', if you want to use an invalid or closed database cursor. SQL_CODEDatabase-specific error code, if DB_ERROR is 'X'. SQL_MESSAGEDatabase-specific error code, if DB_ERROR is 'X'.