A classic view (or view for short) is a repository object in ABAP Dictionary defined for existing database tables and their fields in the form-based tool ABAP Dictionary in
ABAP Workbench. Alongside the classic views, ABAP Dictionary also manages the
CDS views defined in the CDS source code in CDS.
The definition of a classic view consists of the following:
A list of database tables accessed by the view. Multiple tables are joined using joins.
A list of table fields of the basis tables that defines the structure of the view. Except in the case of projection views, a different
data element can be assigned to a view field that
that used for the corresponding table field of the basis table. This can only happen if the type of the table field is defined using a data element with a
domain and if the new data element references the same domain. This makes it possible to adjust the semantic attributes of the view field to the view.
A key of the view that consists of key fields. The tool derives the key of a view from the key fields
of the basis tables and the join conditions. All the key fields must be together at the beginning of
the view. Fields that do not belong to the key, but are located between the key fields, are thus marked
as key fields. All rows determined by the view must be unique with respect to the key. If no key with
this property can be identified, all fields of the view are key fields, which can be bad for performance. In the case of Open SQL accesses to the view, its key behaves like the key of a database table.
Conditions for joining multiple basis tables using inner joins or outer joins. A join condition compares
two fields from basis tables of a view for equality. If no join conditions are specified for a pair
of basis tables, the view is used to select the cross product of the basis tables. Each row in a table
is combined with each row of the other table. Each join condition then selects the matching rows from the cross product.
Used to restrict the read rows to specific values of view fields or other fields.
The possible relational operators are =, <>,
>=, >, <=,
<, LIKE, and NOT LIKE.
Depending on the data type of the view field, constant texts and numbers are allowed as comparison values.
System fields can be specified
for maintenance views and help views using SYST-... or SY-....
Multiple comparisons can be joined using AND and multiple comparisons
for the same field can be joined using OR. Here, OR is stronger than AND.
The following types of classic views exist, of which only the database views are defined as SQL views on the database:
Like database tables, views have a short text description and (optional) documentation. A status known
as a maintenance status determines whether a view is read-only or whether data can be inserted or modified in the view.
Projections can be implemented using both database views and with special projection views.
Only database tables can be specified as the basis tables of classic views, and no other views.
CDS views defined using the DDL of the ABAP Core
Data Services in CDS source code offer all the functions of classic views and more. CDS views are, however, read-only, while some classic views can be modified.