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, clauses
Other versions:
7.31 | 7.40 | 7.54
Syntax
... [WHERE cond_expr]
[GROUP BY field1, field2, ...]
[HAVING cond_expr]
[UNION [ALL] SELECT ...] ...
Effect
The optional clauses of the SELECT statement of a CDS view 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.