Ansicht
Dokumentation

ABENDDIC_TABLE_VIEWS - DDIC TABLE VIEWS

ABENDDIC_TABLE_VIEWS - DDIC TABLE VIEWS

General Material Data   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

- Table Views

A DDIC table view is a repository object in ABAP Dictionary defined for existing DDIC database tables and their fields in the form-based ABAP Dictionary tool in ABAP Workbench.

The definition of a DDIC table view consists of the following:

  • Basis tables
A list of DDIC database tables in ABAP Dictionary accessed by the view. Multiple tables are associated using joins.
  • View fields
A list of table fields of the basis tables that defines the structure of the view. Except in the case of DDIC projection views, a different data element can be assigned to a view field than 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.
  • Key
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 located contiguously at the start 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 accesses to the view, its key behaves like the key of a DDIC database table.
  • Join conditions
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.
  • Selection conditions
Used to restrict the read rows to specific values of view fields or other fields.
  • The possible comparison 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 DDIC maintenance views and DDIC 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 DDIC table views exist, of which only the DDIC database views are defined as SQL views on the database:

Like DDIC 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.

Notes

  • Projections can be implemented using both DDIC database views and with special projection views.
  • Only DDIC database tables can be specified as the basis tables of table views, and no other views.
  • In , only views whose key fields are located together at the beginning of the view can be accessed.
  • Views whose fields are all key fields should not be written to using UPDATE FROM or MODIFY FROM. For DDIC database views, this produces a syntax check warning and for projection views a syntax error or runtime error.
  • As in DDIC database tables, the client dependency of a table view that can be accessed using (a DDIC database view or projection view) is determined by a first column with the built-in dictionary type CLNT. The client dependency of the basis tables is ignored here.
  • CDS views defined using the CDS DDL of the ABAP Core Data Services in DDL source code offer all the functions of table views and more. CDS views are, however, read-only, while some DDIC views can be modified.





ABAP Short Reference   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 7394 Date: 20240423 Time: 144914     sap01-206 ( 100 ms )