Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Processing External Data →  ABAP - Database Accesses →  Open SQL 

Exceptions in Open SQL

Other versions: 7.31 | 7.40 | 7.54


Catchable Exceptions

CX_SY_OPEN_SQL_DB

  • Cause: A database error occurred.
    Runtime error: DBIF_RSQL_SQL_ERROR
  • Cause: Error in module RSQL of the database interface.
    Runtime error: DBIF_RSQL_INVALID_RSQL
  • Cause: No data found for the specified key.
    Runtime error: DBIF_RSQL_KEY_NOT_FOUND
  • Cause: Unexpected end to the data when accessing a table.
    Runtime error: DBIF_RSQL_END_OF_DATA
  • Cause: The key for a table was not completely specified.
    Runtime error: DBIF_RSQL_KEY_NOT_SPECIFIED
  • Cause: An invalid database cursor was used.
    Runtime Error: DBIF_RSQL_INVALID_CURSOR
  • Cause: You have tried to access a closed database cursor.
    Runtime Error: SAPSQL_SQLS_INVALID_CURSOR

CX_SY_DYNAMIC_OSQL_SEMANTICS

  • Cause: The database column, whose values are to be aggregated, has no numeric type.
    Runtime Error: SAPSQL_HAVING_AVG_TYPE
  • Cause: The database column, whose values are to be aggregated, has no numeric type.
    Runtime Error: SAPSQL_HAVING_SUM_TYPE
  • Cause: Search pattern not specified in a character literal.
    Runtime Error: SAPSQL_LIKE_VAL_TYPE
  • Cause: A token cannot be interpreted as a literal or in the current context of valid variable names.
    Runtime Error: SAPSQL_WHERE_ILLEGAL_VALUE and SAPSQL_SET_ILLEGAL_VALUE
  • Cause: A table name is too long.
    Runtime Error: SAPSQL_TABNAME_TOO_LONG
  • Cause: A field name is too long.
    Runtime Error: SAPSQL_FIELDNAME_TOO_LONG
  • Cause: No table exists with the specified name.
    Runtime Error: SAPSQL_INVALID_TABLENAME
  • Cause: A field name is ambiguous.
    Runtime Error: SAPSQL_AMBIGUOUS_FIELDNAME
  • Cause: No column exists with the specified name.
    Runtime Error: SAPSQL_INVALID_FIELDNAME
  • Cause: The specified table is not declared as a table or view in the ABAP Dictionary.
    Runtime Error: SAPSQL_NO_DBTAB_OR_VIEW
  • Cause: You tried to select the sum of a non-numeric field.
    Runtime Error: SAPSQL_FIELDLIST_SUM_TYPE
  • Cause: You tried to select the average of a non-numeric field.
    Runtime Error: SAPSQL_FIELDLIST_AVG_TYPE
  • Cause: You tried to create an aggregate function using a LOB column.
    Runtime Error: SAPSQL_AGGREGATE_LOB
  • Cause: You tried to sort by the values of a LOB column.
    Runtime Error: SAPSQL_ORDER_BY_LOB
  • Cause: You want to use the DISTINCT addition on a LOB column.
    Runtime Error: SAPSQL_DISTINCT_AND_LOB
  • Cause: An alias is too long.
    Runtime Error: SAPSQL_ALIASNAME_TOO_LONG
  • Cause: You want to group by the values of a LOB column.
    Runtime Error: SAPSQL_GROUP_BY_LOB
  • Cause: You tried to use a LOB column in a logical condition.
    Runtime Error: SAPSQL_BOUND_LONG_STRING
  • Cause: A pattern specified with LIKE is too long.
    Runtime Error: SAPSQL_LIKE_PATTERN_TOO_LONG and SAPSQL_LIKE_PATTERN_TOO_LONG
  • Cause: You want to select from a non-transparent table using the DISTINCT addition.
    Runtime Error: SAPSQL_ILLEGAL_DISTINCT
  • Cause: A field, whose value is to be changed with + or -, has a non-numeric type
    Runtime Error: SAPSQL_SET_PLUS_MINUS_TYPE
  • Cause: LIKE is used with the ESCAPE addition on a pooled table.
    Runtime Error: SAPSQL_ESCAPE_WITH_POOLTABLE
  • Cause: You want to access a pooled or cluster table using a secondary database connection.
    Runtime Error: SAPSQL_CONNECTION_ILL_TABTYPE

CX_SY_DYNAMIC_OSQL_SYNTAX

  • Cause: The keyword AND is missing after the bottom comparison value of operator BETWEEN.
    Runtime Error: SAPSQL_BETWEEN_MISSING_AND
  • Cause: The logical condition has incorrect bracketing.
    Runtime Error: SAPSQL_HAVING_PARENTHESES
  • Cause: An unknown aggregate function was found.
    Runtime Error: SAPSQL_ILLEGAL_AGGREGATE
  • Cause: The operator IS NULL is not followed by the keyword NULL.
    Runtime Error: SAPSQL_ILLEGAL_IS_NULL
  • Cause: The operator IN has incorrect bracketing.
    Runtime Error: SAPSQL_IN_ILLEGAL_LIST
  • Cause: The logical condition contains a text field literal, for which there is no closing quotation mark.
    Runtime Error: SAPSQL_LIKE_QUOTES
  • Cause: The logical condition ends unexpectedly.
    Runtime Error: SAPSQL_MISSING_LOG_CONDITION
  • Cause: The specification of the Escape character is missing after the ESCAPE.
    Runtime Error: SAPSQL_WHERE_MISSING_ESCAPE
  • Cause: An operator is missing in the logical condition.
    Runtime Error: SAPSQL_WHERE_MISSING_OPERATOR
  • Cause: A literal or name of an ABAP variable is missing in the logical condition.
    Runtime Error: SAPSQL_WHERE_MISSING_VALUE
  • Cause: The logical condition has incorrect bracketing.
    Runtime Error: SAPSQL_WHERE_PARENTHESES
  • Cause: The logical condition contains a text field literal that does not have a closing quotation mark.
    Runtime Error: SAPSQL_WHERE_QUOTES
  • Cause: An unknown operator is used in the logical condition.
    Runtime Error: SAPSQL_WHERE_UNKNOWN_OPERATOR
  • Cause: An alias is missing.
    Runtime Error: SAPSQL_MISSING_ALIAS
  • Cause: A column from the right side of a LEFT OUTER JOIN is used in a WHERE condition.
    Runtime Error: SAPSQL_ACCESS_TO_RHS_TABLE
  • Cause: Syntax errors for dynamic CREATING addition.
    Runtime Error: SAPSQL_NO_LOB_COLUMN
    Runtime Error: SAPSQL_FOR_ALL_COLUMNS
    Runtime Error: SAPSQL_TWICE_DEFINITION
    Runtime Error: SAPSQL_UNION_POSSIBLE
    Runtime Error: SAPSQL_MISSING_FOR_COLUMNS
    Runtime Error: SAPSQL_OTHER_ONLY_AT_THE_END

UPDATE

  • Cause: You tried to change a database field using an operator other than + or -.
    Runtime Error: SAPSQL_SET_NOT_PLUS_MINUS
  • Cause: An unknown operator was used in the SET statement.
    Runtime Error: SAPSQL_SET_UNKNOWN_OPERATOR
  • Cause: A literal or name of an ABAP variable is missing in the SET statement.
    Runtime Error: SAPSQL_SET_MISSING_VALUE
  • Cause: The SET statement contains a text field literal, for which there is no closing quotation mark..
    Runtime Error: SAPSQL_SET_QUOTES

Non-Catchable Exceptions

  • Cause: Prohibited call of the database interface.
    Runtime error: DBIF_RSQL_INVALID_REQUEST
  • Cause: Insufficient memory is available for the statement.
    Runtime error DBIF_RSQL_NO_MEMORY
  • Cause: Transferred data area is too short for access to the table.
    Runtime error: DBIF_RSQL_BUFFER_TOO_SHORT
  • Cause: The structure of a table is inconsistent with the Dictionary.
    Runtime error: DBIF_RSQL_DDIC_INCONSISTENT
  • Cause: The sort sequence specified for a table cannot be realized.
    Runtime error: DBIF_RSQL_SORT_ORDER
  • Cause: Error when accessing the buffer of a table.
    Runtime error: DBIF_RSQL_BUFFER_ERROR
  • Cause: A table is not known or does not exist.
    Runtime error: DBIF_RSQL_TABLE_UNKNOWN
  • Cause: Internal error when accessing a table.
    Runtime error: DBIF_RSQL_INTERNAL_ERROR
  • Cause: Unexpected return code when accessing a table.
    Runtime error: DBIF_RSQL_UNEXPECTED_CODE