You are on page 1of 3

What are views in DDIC?

o Views are the data dictionary repository objects in ABAP, which are used
to view the data of several tables in one place.
o A view is similar to the database table, but it does not contain any physical
data; instead it derives data from different tables and acts like a virtual table
(table without any existence). Since it does not physically store any data, and
the database only contains the view definition, hence it takes very little space
in the database.
o A view can be created by combining the data of single or multiple tables,
which are called base tables.
o Before creating a view, we need to specify the structure for the tables and
fields that need to be stored in the view. If we make any change in the base
tables, then the changes also reflect in the views automatically.
o The views in DDIC help to save time and increase efficiency, as it is a time-
consuming process to extract data from each table; for such cases, we can use
view in SAP ABAP Dictionary.
o A view can be used to represent a subset of data stored within a table or to
join multiple tables into a single virtual table.
o Whenever a view is executed, it displays the data extracted from the multiple
tables.
o In order to create a view in DDIC, we need to join the table, and for joining the
table, each table must have at least one common key field.
o The below diagram explains the structure of view:
In the above diagram, there are three tables with some fields, using the view, we are
joining the tables.

Joins to create the view


Join is a way to connect or link two or more database tables or displaying the data.
In ABAP, there are two types of joins:

o Inner Join
o In an inner join, only those records or data will be selected that have
some matching key fields.
o The unmatched data will not be selected for the view.
o Outer Join
o In outer join, all the data of the first table will be displayed, and from
the other tables, only the matching record will be displayed.
o If there is no matching record in other tables, then the view will show
the record with blank values.
Key steps to define a view:
o First, we need to select the base tables to define the view.
o These base tables must be linked together using join conditions.
o Select the required fields of the base tables that need to use by the view.
o Apply some selection conditions to restrict or filter the records in the view.

Types of Views in ABAP


In ABAP DDIC, there are four types of views that differ from each other in a way in
which they are implemented and access the data. These are given below:

1. Database view

2. Projection view

3. Help view

4. Maintenance view

You might also like