SAP NetWeaver AS ABAP Release 752, ©Copyright 2017 SAP AG. All rights reserved.
ABAP - Keyword Documentation → ABAP - Dictionary → ABAP CDS in ABAP Dictionary → ABAP CDS - Data Definitions → ABAP CDS - DDL for Data Definitions → ABAP CDS - DEFINE VIEW → ABAP CDS - SELECT → ABAP CDS - SELECT, Built-In Functions → ABAP CDS - sql_functions →ABAP CDS - coalesce
Syntax
... COALESCE( arg1, arg2 ) ...
Effect
Coalesce function in a SELECT statement of a CDS view. 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, input parameters, predefined functions, or expressions of data types CHAR, SSTR, CLNT, LANG, NUMC, CUKY, UNIT, DATS, TIMS, FLTP, DEC, CURR, QUAN, INT1, INT2, or INT4 or INT8.
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.