You are on page 1of 5

Views

A View is a virtual table, that is, a table that is not


actually physically stored, instead it is created by combining
the data of one or more tables containing information.
Types of views
1. Projection view
2. Database view
3. Maintenance view
4. Help views

1. Projection view

1)  Projection view is a special view which allows us to


selected the required fields from the table for
displaying and hide the remaining fields of the table.
2) Projection view can be created for the single table.
3) This view allows us to read and also maintain the
needed data.
4) we cannot specify any selection/join conditions for
this view.
5) When rows are inserted using projection views, all

table fields not in the view are given the type-specific


initial values of the field. This is done regardless of
whether the fields is defined as “NOT NULL” on the
database.
6) We can convert projection view to database view,
maintenance view, help views.
Advantages of projection view

1) Selection of Data from View is faster.


2) It helps to display only required & relevant data.
3) It limits full data access to unauthorized users.

2. Database views

1) A Database View in SAP ABAP is a view which


combines multiple tables in to a single View.
2)  It implements inner join for integration.
3) It can even contain a single table without any Join
statement.
4) And if there is only table then we can maintain data also
otherwise we can just read only.
5) Foreign key relationship is not mandatory to create a
database view.
6) Database view for a single basis table doesn’t contain
any foreign key relations and here no inner join operation
happens.
7) Database view for more than one basis table can contain
the foreign key relationship otherwise we can explicitly
provide the condition for that both fields domain should
be same.
8)  If you define a database view using only one table, you
can make changes to the view like read only, read and
write. For database views containing several tables,
however, only read accesses are allowed.
9) Buffering is allowed for maintenance view only.
10) The database view is only defined using transparent
tables.
11) A database view should only be used to insert data in
the table if the flag for initial values is set for all table
fields that are not in the view.
12) We can change the view field name in database view.

Advantages of database views

1) Selection of Data from Views is faster than Selection of


Data from individual tables.
2) It helps to select data from logically connected tables.

3. Maintenance view
1) A maintenance view is a special view for performing
writes on multiple tables using extended table
maintenance.
2) A single maintenance view can be used to update content
to the multiple related database table consistently.
3) When data records are inserted using maintenance views,
all table fields not in the view are given the type-specific
initial values of the field. This is done regardless of
whether the fields is defined as NOT NULL on the
database.
4) Foreign key relationship is mandatory for maintenance
views and buffering is not allowed.
5) In maintenance view we can perform CRUD operations.
6) Maintenance views implement outer join.
7) The secondary tables have to be in an N:1 dependency to
the primary table or directly preceding secondary table.
8) This ensures that there is at most one dependent record in
each of the secondary tables for a data record in the
primary table.
9) We can change the view field name in Maintenance view.
10) We can maintain Delivery Class of View separately.

Advantages of maintenance view


1. Maintenance View fetches required data from Multiple
Tables and hence faster than selecting data from these
tables individually.
2. It maintains (Create/Update/Delete) Multiple Tables at
once and hence faster than maintaining multiple tables
individually.

4. HELP VIEW
1) A Help View in SAP ABAP is a view that combines
multiple tables into a single view and is mainly used as
an input to Search Help.
2) Help view implements left outer join
3) Foreign key relation between the tables is mandatory.
4) Since it is specially designed for the search help option,
we cannot directly execute the data.
5) It allows us to only read the data; we cannot maintain the
data in this view.
6) We can change the field view name in help views.

Advantages of help view

1) Help Views utilizes Outer Join and hence all data from
Primary table is displayed irrespective of their presence
in other secondary tables.
2) Help views used as elementary search helps (F4).

You might also like