Ansicht
Dokumentation

ABENCDS_PROJ_VIEW_ANNOTATIONS - CDS PROJ VIEW ANNOTATIONS

ABENCDS_PROJ_VIEW_ANNOTATIONS - CDS PROJ VIEW ANNOTATIONS

BAL_S_LOG - Application Log: Log header data   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

- proj_view_annot

... @annotation ...

Effect

Specifies an annotation annotation as a view annotation in the definition of a CDS projection view in front of the statementDEFINE $[TRANSIENT$] VIEW ENTITY AS PROJECTION ON. The character @ must be placed directly in front of the name annotation of the annotation. The annotation should be defined as a CDS object in a CDS annotation definition and the annotation definition annotation @Scope should be specified here using the value #VIEW.

Notes

  • Projection views inherit the field and association annotations of the projected entity. Header annotations are not inherited and must be specified anew, if required.
  • Alongside the view annotations shown here, the globally valid entity annotations can also be specified for a CDS projection view.
  • Only a limited number of view annotations can be used in CDS projection views. The following groups of annotations are not possible and are therefore not listed below:
  • Client handling is done implicitly in CDS projection views. The client is always set to #session_variable_filter. Therefore, client handling annotations cannot be explicitly set in CDS projection views.

  • DataAging annotations are currently not supported for projection views.

AbapCatalog Annotations

Technical settings of a CDS projection view.
AbapCatalog.dataMaintenance,,Can be used to restrict data preview for a CDS projection view,, #RESTRICTED:\lbr Display allowed with restrictions \lbr\lbr #DISPLAY_ONLY:\lbr Display only. Data preview is allowed \lbr\lbr #NOT_ALLOWED:\lbr Display not allowed \lbr\lbr ,, #RESTRICTED,,-
AbapCatalog.extensibility.allowNewDatasources ,, Defines whether a CDS view entity extension is allowed to use new data sources. More precisely, if a CDS view entity extension specifies an association, this annotation defines whether it is allowed to use the newly defined, local association in path expressions.,, true:\lbr New data sources in extensions allowed. \lbr\lbrfalse:\lbr New data sources in extensions not allowed. \lbr\lbr ,,false,,true
AbapCatalog.extensibility.dataSources[ ],, Allowlist of stable alias names of data sources and locally defined associations to be used in extensions.,, 'data_source_name': \lbr Alias name of a data source or alias name of a locally defined or redefined association.,, -,,-
AbapCatalog.viewEnhancementCategory[ ],,Specifies how the CDS projection view is extended using CDS view extensions. A comma-separated list of values can be specified in the square brackets of the annotation array.,,#PROJECTION_LIST:\lbr Extensions of the SELECT list and additional CDS associations are allowed; extensions of CDS views whose SELECT lists contain aggregate expressions or have a UNION clause must be allowed using further values \lbr\lbr #NONE:\lbr No extensions allowed; cannot be specified together with other values,, #PROJECTION_LIST,,#PROJECTION_LIST

Notes

  • AbapCatalog.viewEnhancementCategory[#NONE] is mandatory for views that contain an element of data type LRAW or LCHR. The reason is that elements of data type LRAW or LCHR must always be in the last position in the SELECT list and therefore, no extensions are allowed.
  • The annotation AbapCatalog.dataMaintenance defines whether the CDS projection view can be displayed or maintained by certain tools such as Data Preview in ABAP Development Tools (ADT). The annotation is evaluated by these tools. Restrictions imposed by that annotation are user-independent and they are evaluated before accessing the data. Additional restrictions imposed by CDS roles are evaluated during the actual data access, if this is done by.
  • AbapCatalog.extensibility.dataSources:
  • can only be specified if extensions are allowed. If @AbapCatalog.extensibility.extensible is set to false or @AbapCatalog.viewEnhancementCategory is set to #NONE, no data sources can be specified.

  • can specify only such associations as data_source_name which have a maximum cardinality not greater than 1.

  • Most Abap.Catalog annotations supported in CDS views are not supported in CDS projection views, for the following reasons:
  • AbapCatalog.buffering annotations are not possible, since buffering doesn't work with another CDS view as data source.

  • AbapCatalog.compiler.compareFilter is not required, since the optimization of joins is done automatically.

  • AbapCatalog.preserveKey cannot be specified, since the key fields are inherited by the projected entity.

  • AbapCatalog.sqlViewName is not required, since projection views don't have a corresponding SQL view in ABAP Dictionary.

AccessControl Annotations

Defines access control for the CDS projection view.
AccessControl.authorizationCheck,,Defines implicit access control when is used to access the CDS view,,#CHECK:\lbr If is used to access the view, access control is performed implicitly if a CDS role is assigned to the view. If there is no role for the view, a syntax check warning occurs. \lbr\lbr #NOT_REQUIRED:\lbr Like #CHECK, but there is no syntax check warning. \lbr\lbr#NOT_ALLOWED:\lbr No access control is performed. This produces a syntax check warning in the DCL source code of a role for the view. \lbr\lbr#PRIVILEGED_ONLY:\lbr Privileged CDS association (evaluated by SADL).,, #CHECK,,#CHECK

Notes

  • Value #NOT_REQUIRED is recommended for CDS projection views that no access control is provided for when they are created, but which roles can be defined for later on.
  • The value #NOT_ALLOWED disables implicit access control when the CDS projection view is accessed in . The addition WITH PRIVILEGED ACCESS can be used in the FROM clause to disable access control for views not annotated with this annotation. In the case of views too, the authorization check with the addition WITH PRIVILEGED ACCESS must be disabled in updates in ABAP SQL statements. If not, a runtime error occurs.
  • CDS access control does not work for client-independent access. This is why in , the addition USING and the obsolete addition CLIENT SPECIFIED can only be used when accessing CDS entities where access control is disabled. It is recommended that the annotation AccessControl.authorizationCheck:#NOT_ALLOWED is only specified for CDS projection views that are subject to client-independent access.

Metadata Annotations

Defines the handling of metadata from the CDS projection view.
Metadata.ignorePropagatedAnnotations,,Defines whether analysis of annotations is possible using the annotation API CL_DD_DDL_ANNOTATION_SERVICE.,, true:\lbr Only direct and derived annotations of the current CDS entity are respected. \lbr\lbr false:\lbr Inherited annotations of CDS entities used are also respected.,,false,,true

ObjectModel Annotations

Characterizes CDS projection views with respect to their performance-relevant attributes.
ObjectModel.usageType.dataClass,,Specifies the data type of the CDS projection view.,,A CDS projection view is assigned to one of the following data classes: \lbr\lbr #TRANSACTIONAL: \lbr The CDS projection view contains the data written or modified in high volume transactions or in background transactions. \lbr\lbr #MASTER: \lbr The CDS projection view contains the master data. The master data is read in high volume transactions or background transactions, but not written or modified. \lbr\lbr #ORGANIZATIONAL: \lbr The CDS projection view contains data that describes organizational structures and customer processes. \lbr\lbr#CUSTOMIZING: \lbr The CDS projection view data that describes customer customizing data. \lbr\lbr #META: \lbr The CDS projection view contains technical system configuration data or the structure of entities. \lbr\lbr#MIXED: \lbr The CDS projection view contains mixed class data.,,#MIXED,,#MIXED
ObjectModel.usageType.serviceQuality,,The quality of the service with respect to the performance expected by the consumer of the CDS projection view.,,A CDS projection view is assigned to one of the following quality categories: \lbr\lbr #A: \lbr Within the business logic, the CDS projection view can be used for high volume transactions or for background transactions. \lbr\lbr#B: \lbr Within the business logic, the CDS projection view can be used for transactions or for background transactions. \lbr\lbr#C: \lbr The CDS projection view can be used by the user interface to query individual objects in transactions. \lbr\lbr #D: \lbr The CDS projection view can be used for analytical queries. \lbr\lbr #X: \lbr The CDS projection view is designed for special application cases, such as data migration. \lbr\lbr#P: \lbr The CDS projection view is used to structure CDS hierarchies and is not used outside of the CDS hierarchy.,, #X,,#X
ObjectModel.usageType.sizeCategory,,Specifies the size of the data record that must be scanned to return the result. This is usually the largest underlying table.,,A CDS projection view is assigned to one of the following size categories: \lbr\lbr#S: \lbr The expected size of the data record that needs to be scanned is less than 1000. \lbr\lbr #M: \lbr The expected size of the data record that needs to be scanned is less than 100,000. \lbr\lbr#L: \lbr The expected size of the data record that needs to be scanned is less than 10,000,000. \lbr\lbr #XL: \lbr The expected size of the data record that needs to be scanned is less than 100,000,000. \lbr\lbr#XXL: \lbr The expected size of the data record that needs to be scanned is 100,000,000 or greater.,,#S,,#S

Notes

  • With the above subannotations of ObjectModel, it can be documented for a CDS projection view for which kind of application it is intended and which kind of data are to expected. This information is especially important in regards of performance that can be expected by the consumer of the function. For further details refer to the general rules for view annotations.





RFUMSV00 - Advance Return for Tax on Sales/Purchases   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 20919 Date: 20240329 Time: 111428     sap01-206 ( 296 ms )