Skip to content

ABAP Keyword Documentation →  ABAP - Dictionary →  Classic Objects in ABAP Dictionary →  Views →  Classic Views 

Projection Views

A projection view is a special view for hiding fields from a single basis table. An SQL view is not created on the database. No selection conditions can be specified for a projection view.

The structure type defined using the view fields of the projection view can be referenced in ABAP programs using TYPE. A projection view can be accessed using ABAP SQL but not using CDS views, Native SQL, or AMDP. The database interface transforms an ABAP SQL statement that accesses a projection view to a platform-specific SQL statement that provides the correct result.

The Access setting in the maintenance status of a projection view can have the following values:

  • Read only
The projection view can only be used to read data with ABAP SQL.
  • Read, change, delete, and insert
The projection view can only be used to change data with ABAP SQL.

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 field is defined as NOT NULL on the database.

Other versions: 7.31 | 7.40 | 7.54


Notes

  • As in a database table, the client dependency of a projection view is determined by an initial column with the built-in dictionary type CLNT.

  • Like a database table, the maintenance status of a projection view has a Display and Maintain setting alongside the Access setting. The setting must match the Access setting.

Example

The projection view DEMO_SPFLI contains fields of the tables SPFLI. The view can be accessed as follows using ABAP SQL:

SELECT * 
       FROM demo_spfli 
       ORDER BY carrid, connid 
       INTO TABLE @DATA(result). 

cl_demo_output=>display( result ).