A maintenance view is a special view for performing writes on multiple tables using extended table maintenance. A single maintenance view can be used to modify the content of multiple related database table consistently.
A maintenance view is not defined on the database. The structure type defined using a maintenance view
can be referenced in ABAP programs using
TYPE. A maintenance view cannot,
however, be accessed using Open SQL. Instead, the transaction SE54 can
be used to create dialogs called maintenance dialogs for maintenance views, which can themselves be
used to edit the tables of the maintenance views jointly in extended table maintenance (transactions SM30 and SM31).
When data records are inserted using maintenance views, all tables 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.
7.31 | 7.40 | 7.54
Primary Table and Secondary Tables
All database tables grouped in a maintenance view must be joined using foreign key dependencies, which means that the join conditions are always derived from a foreign key in the case of maintenance views. The first table included in the maintenance view is known as the primary table of the maintenance view. The tables added to this primary table using foreign keys are known as secondary tables. The following restrictions apply when selecting the secondary tables of a maintenance view:
- The secondary tables must have an N:1 dependency to the primary table or to the transitively preceding secondary table. This makes sure that no more than one dependent data record exists in each of the secondary tables for a specific data record in the primary table. An N:1 dependency exists if the secondary table is the check table in the foreign key in question.
- If the secondary table is the foreign key table, the foreign key fields must be key fields of a table or the foreign key must have the cardinality N:1 or N:C.
A help view implements an inner join. All key fields in the primary table must be included in its maintenance view. All key fields of secondary tables that are not part of the foreign key (that is, they are not joined with a key field already in the view using a join condition) must also be included in the view. This makes sure that the records inserted using a maintenance view can be written correctly to the tables in the view.
If a database table is joined with its text table in a maintenance view, the logon language is selected automatically for this table.
In maintenance views, the key can be divided into a non-time-dependent area and a time-dependent area. The time-dependent area can, for example, contain date fields and time fields. This means that the rows of these views have chronological importance.
The ability to change time-dependent views makes it possible to restrict which new entries are inserted to those that are only missing time information.
The Access setting in the maintenance status of a maintenance view can have the following values:
- Read only
- Read, change, delete, and insert
- Read and change
- Read and change (time-dependent views)
Like a database table, the maintenance status of a maintenance view has a Display and Maintain setting alongside the Access setting. The setting must match the Access setting. The setting Display/maintenance not allowed is not possible here.
Maintenance Characteristics of View Fields
Alongside the maintenance status of the view, characteristics called maintenance characteristics can be defined for each view field:
A maintenance view also has a delivery class, which is evaluated in extended table maintenance.
- If the view is assigned one of the delivery classes G or E, the customer namespace for the entries of the view must be defined in the database table TRESC.
- The transport interface of extended table maintenance must match the delivery class.
Regardless of this, the transport of the basis tables involved in upgrades and in transports between customer systems is determined solely by their delivery class.