Show TOC

 ViewsLocate this document in the navigation structure

Definition

Data about an application object can bedistributed to several tables. By defining a view, you can define an application-dependent view that combines this data. The structure of such a view is defined by specifying the tables and fields used in the view. Fields that are not required can be hidden, thereby minimizing interfaces. A view can be used in ABAP programs for data selection. In the following figure you can see a view that contains data distributed to three tables.

Structure

The data of a view is derived from one or more tables, but not stored physically. The simplest form of deriving data is to mask out one or more fields from a base table (projection) or to include only certain entries of a base table in the view (selection). More complicated views can comprise several base tables, the individual tables being linked with a relational join operation. See also Join, Projection and Selection .

When you define a view you have to do the following four steps:

  1. You must select the base tables of the view.
  2. These tables must be linked by defining the join conditions. It is also possible to use the join condition from a foreign key defined between the tables (see Foreign Key Relationship and Join Condition ).
  3. You must select the fields of the base tables that the view uses.
  4. Formulate the selection conditions that restrict the records in the view.

Four different view types are supported. These differ in the way in which the view is implemented and in the methods permitted for accessing the view data.

The join conditions for database views can be formulated using equality relationships between any base fields. The join conditions for the other view types must be obtained from existing foreign keys. Tables can be combined in a maintenance view or help view only if they are linked to one another with foreign keys.

The maintenance status defines whether you can only read data with the view, or whether you can also insert and change data with it.

See also:

Example for Views

Creating Views

Deleting Views