ABAP Keyword Documentation → ABAP Dictionary → ABAP CDS in ABAP Dictionary → ABAP CDS - Views → ABAP CDS - DDL Statements → ABAP CDS - DEFINE VIEW → ABAP CDS - SELECT → ABAP CDS - SELECT, Predefined Functions
ABAP CDS - coalesce
Other versions:
7.31 | 7.40 | 7.54
Syntax
... COALESCE( arg1, arg2 ) ...
Effect
Coalesce function in a SELECT statement of a CDS view of the ABAP CDS. The coalesce function returns the value of the argument arg1 (if this is not the null value); otherwise it returns the value of the argument arg2. The arguments can be literals, fields of a data source, predefined functions, or expressions of data types CHAR, SSTR, CLNT, LANG, NUMC, CUKY, UNIT, DATS, TIMS, FLTP, DEC, CURR, QUAN, INT1, INT2, or INT4.
The data types of both arguments must either match of the data type of one argument must represent the full value of the other data type. The result has the dictionary type of the argument with the greater value range.