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, clauses
7.31 | 7.40 | 7.54
... [WHERE cond_expr]
[GROUP BY field1, field2, ...]
[UNION [ALL] SELECT ...] ...
The optional clauses of the SELECT statement of CDS view in ABAP CDS have the following semantics:
- The WHERE clause restricts the rows in the results set when the CDS view is accessed.
- The GROUP BY clause groups rows in the results set when the CDS view is accessed. It is applied after rows are selected using the WHERE clause.
- The HAVING clause restricts the results set further after a GROUP BY clause. Here, aggregate expressions can be specified in the condition.
- UNION can be used to create the union of the results sets from two SELECT statements.