
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.
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:
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.
Database views implement an inner join. The other view types implement an outer join(see Inner and Outer Join).
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: