Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Processing External Data →  ABAP Database Access →  ABAP SQL →  ABAP SQL - Overview →  ABAP SQL - Table Buffering 

Table Buffering - SQL Expressions

SQL expressions are usually evaluated on the database and and any built-in functions used as operands of these expressions are usually executed on the database too. If used, SQL expressions then bypass table buffering. The following expressions and functions, however, have an implementation in the table buffer and table buffering is not bypassed when they are used in reads (including nested reads).

The expressions and functions can be used in both SELECT lists and in WHERE clauses.

If a catchable exception is raised when an SQL expression is evaluated in the table buffer, it is wrapped by the class CX_SY_OPEN_SQL_DB and can be handled using this class. The attribute PREVIOUS of the associated exception object is then given the name of the original exception class.

Other versions: 7.31 | 7.40 | 7.54


Notes

  • When an SQL expression is evaluated in the table buffer, the same results are produced as on the database and not as in the corresponding ABAP evaluation. The following are some examples:

  • Evaluations of the functions DIV and MOD that are not the same as calculations with the identically named ABAP operators.

  • Operands of the type SSTRING that do not have trailing blanks on the database, unlike in ABAP.

  • If an SQL expression can be evaluated in the table buffer, any internal tables used as data sources of a query can also be evaluated on AS ABAP rather than their content having to be transported to the database. .