What does it do? Defines a CDS transactional interface with the name projection_view in CDS DDL . The projected entity cds_entity can be either a CDS view entity or a ABAP_CDS_V1_VIEW . The projected entity must be part of a RAP BO: It must either be a root entity or contain a to-parent association. No other CDS entities or data sources are allowed as projected entity. Path expressions are not allowed for specifying the projected entity. One CDS entity can be used as basis for multiple CDS projection views. The name of the CDS projection view projection_view is defined after the DEFINE VIEW ENTITY statement. The usual rules for ABAP Dictionary views apply to this name and it is not case-sensitive (it is transformed internally into uppercase letters). It can have a maximum of 30 characters and is in the namespace of all global types of an AS ABAP. The name of the DDL source and of the CDS entity must be identical.
ABAP_PREREQUISITES A CDS transactional interface that uses the addition PROVIDER CONTRACT TRANSACTIONAL_INTERFACE must be part of a RAP business object. That means that the view must either be a root entity itself, or it must be part of a composition tree and reach a root entity via a composition. ABAP_PREREQ_END
Components
Header annotations specified before the statement DEFINE VIEW ENTITY are not inherited from the projected entity. It is possible, but not mandatory, to specify entity annotations @entity_annot or projection view annotations @proj_view_annot as header annotations.
The provider contract must be set to TRANSACTIONAL_INTERFACE.
The projection list projection_list defines the elements exposed as part of the interface.
Release Contracts
A transactional interface can be released for Contract C0.
A transactional interface should be released for Contract C1.
A transactional interface should not be released for Contract C2.
ABAP_RESTRICTIONS
A transactional interface cannot define new associations.
No further clauses are possible. WHERE, UNION, and GROUP BY are not supported. ABAP_RESTR_END
Latest notes:
CDS access control defined for a CDS transactional interface must be defined symmetrically to the CDS access control for the projected entity. The behavior of the access control of the projected entity must be inherited.
For an overview of all possible data sources of all available CDS entities, see Data Source Matrix. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 The following CDS transactional interface is based on the CDS view entity DEMO_CDS_PURCH_DOC_M. The composition is redirected to the CDS transactional interface of the child entity. Both parent and child entity should be released for system-internal use under the C1 contract. DDLS DEMO_CDS_TRANS_INTERFACE_ROOT The following CDS transactional interface represents the child entity: DDLS DEMO_CDS_TRANS_INTERFACE_CHILD ABAP_EXAMPLE_END • ROOT ABAP_CDS_PROJ_INTERFAC
ABAP Addition
What does it do? The keyword ROOT specifies that the transactional interface is the root entity of a composition tree. The transactional interface must always reflect the position of the projected entity in the composition tree: if the projected entity is a root entity , the transactional interface must be a root as well. If the projected entity is not a root, the projection view cannot be a root. In this case, the projected entity must contain a to-parent association. ABAP_NOTE A transactional interface must always either be a root entity itself, or it must be part of a composition tree and reach a root entity via an association. • AS ABAP_CDS_PROJ_INTERFAC
ABAP Addition
What does it do? Defines the name alias_name as alias name of the projected entity. The alias name can have a maximum of 30 characters. If no name is defined explicitly using AS, then the original name of the data source is used.