ABAP Keyword Documentation → ABAP - Reference → Processing External Data → ABAP Database Accesses → Open SQL → Open SQL - Overview
Open SQL - Null Values
A null value is an initial value of an empty column in the row of a database table. Null values do not correspond to any content of data objects in ABAP.
In Open SQL, null values can
handled using the condition
IS NULL and the function coalesce
.
Modifying Open SQL statements generally do not create null values, provided that a
view is not being edited that does not comprise all columns of a database table. However, depending on the
database system, empty
strings can also be displayed as null values. Null values can still arise in database tables if the new columns are appended to filled tables.
In reads using the Open SQL statement SELECT
, null values can be produced by
aggregate functions,
SQL expressions, and in outer
joins. When passed to data objects, these values are transformed to type-appropriate
initial values, but are
handled as standalone values in the additions GROUP
BY and ORDER BY
. Null values are also transformed to initial values in
SAP buffering.
Other versions:
7.31 | 7.40 | 7.54
Note
In Native SQL, null values passed to ABAP objects are also transformed to their type-compliant initial values.