Ansicht
Dokumentation

ABENCDS_VIEW_ENTITY_ANNO - CDS VIEW ENTITY ANNO

ABENCDS_VIEW_ENTITY_ANNO - CDS VIEW ENTITY ANNO

General Data in Customer Master   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

- CDS View Entity, view_entity_annot

... @annotation ...

Effect

Specifies an annotation annotation as a view entity annotation in the definition of a CDS view entity in front of the statement DEFINE VIEW ENTITY. The character @ must be placed directly in front of the name annotation of the annotation. The annotation must be defined as a CDS object in a CDS annotation definition. Otherwise, a syntax error occurs. The annotation definition annotation @Scope should be specified using the value #VIEW.

Notes

AbapCatalog Annotations

Technical settings of a CDS view entity.
AbapCatalog.dataMaintenance,,Can be used to restrict data preview for a CDS view entity. ,, #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.entityBuffer.definitionAllowed,,Can be used to enable or disable table buffering for a CDS view entity.,, true:\lbr Table buffering allowed. \lbr\lbrfalse:\lbr Table buffering not allowed \lbr\lbr ,,false,,true
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 view entity 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 which contain a set operator clause are not allowed. \lbr\lbr #GROUP_BY:\lbr Can only be specified together with #PROJECTION_LIST. Allows views to be extended that have aggregate expressions in the SELECT list. Aggregated or non-aggregated elements can be added to the SELECT list by the extension. The GROUP-BY clause must be extended accordingly using the addition GROUP BY. \lbr\lbr #UNION:\lbr Can only be specified together with #PROJECTION_LIST. Allows views to be extended that use a clause with a set operator. \lbr\lbr #NONE:\lbr No extensions allowed; cannot be specified together with other values. ,, #PROJECTION_LIST,,#PROJECTION_LIST

Notes

  • In the annotation array AbapCatalog.viewEnhancementCategory[ ], #GROUP_BY and #UNION can only be specified together with the default value #PROJECTION_LIST. The value #NONE excludes any other values.
  • 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.
  • Extensions of a view with aggregate expressions or with a set operator clause ( EXCEPT, INTERSECT, or UNION) modify the cardinality of the result set. This means that these extensions must have special permission in the view to enable consumers of the view to handle any changes to cardinalities.
  • AbapCatalog.viewEnhancementCategory[#UNION] allows extensions not only for union views, but for views including any set operator (also EXCEPT and INTERSECT). The annotation array value #UNION is a known misnomer.
  • AbapCatalog.extensibility.allowNewdataSources must be set to false in CDS view entities. The value true is only allowed in CDS projection views.
  • 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.

  • must not be set in union views.

  • The annotation AbapCatalog.dataMaintenance defines whether the CDS view entity 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 .
  • The following AbapCatalog annotations are available in other CDS entities, but they are not supported in CDS view entities:
  • Buffering annotations are currently not supported in CDS view entities, because buffering is not yet possible.

  • The annotation @AbapCatalog.compiler.compareFilter is not required and not allowed in CDS view entities, because the filter is implicitly and automatically compared.

  • The annotation @AbapCatalog.preserveKey is not required and not allowed in CDS view entities. It serves the definition of key fields of the CDS-managed DDIC view in . Since there is no CDS-managed DDIC view in CDS view entities, it is obsolete here.

AccessControl Annotations

Defines access control for the CDS view entity.
AccessControl.authorizationCheck,,Defines implicit access control when is used to access the CDS view entity,,#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. If a role is assigned to this view in DCL source code, a syntax warning occurs. \lbr\lbr#PRIVILEGED_ONLY:\lbr Privileged CDS association (evaluated by SADL).,, #CHECK,,#CHECK

Notes

  • The value #NOT_REQUIRED is recommended for CDS view entities that don't require access control in the beginning, but that might later on be enhanced with roles.
  • The value #NOT_ALLOWED disables implicit access control when the CDS view entity is accessed in . To disable access control for views not annotated with this annotation, the addition WITH PRIVILEGED ACCESS can be used in the FROM clause. In the case of views too, the authorization check with the addition WITH PRIVILEGED ACCESS must be disabled during update sessions in ABAP SQL statements. If not, a runtime error occurs.
  • CDS access control does not work for client-independent access. For view entities that are subject to client-independent access, it is recommended that the annotation AccessControl.authorizationCheck:#NOT_ALLOWED is used

DataAging Annotations

Defines data aging for the CDS view entity.
DataAging.noAgingRestriction,,Defines how data aging is respected on the SAP HANA database when the view entity is accessed using . ,,true:\lbr reads all data \lbr\lbrfalse:\lbr reads current data only ,,false,,true

Metadata Annotations

Defines the handling of metadata of the CDS view entity.
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 view entity are respected. \lbr\lbr false:\lbr Inherited annotations of CDS view entities used are also respected.,, false,,true

ObjectModel Annotations

The following subannotations of ObjectModel characterize CDS view entities with respect to their performance-relevant properties.
ObjectModel.usageType.dataClass,,Specifies the data category of the CDS view entity.,,A CDS view entity can be assigned to one of the following data categories: \lbr\lbr#TRANSACTIONAL: \lbr The CDS view entity delivers data written or modified in high volume transactions or in background transactions. \lbr\lbr#MASTER: \lbr The CDS view entity delivers 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 view entity delivers data that describes organizational structures and customer processes. \lbr\lbr#CUSTOMIZING: \lbr The CDS view entity contains data that describes a customer's customizing data. \lbr\lbr #META: \lbr The CDS view entity delivers technical system configuration data or the structure of entities. \lbr\lbr#MIXED: \lbr The CDS view entity contains data of mixed data categories.,,#MIXED,,#MIXED
ObjectModel.usageType.serviceQuality,,The quality of the service with respect to the performance that can be expected by the consumer of the CDS view entity.,,A CDS view entity can be assigned to one of the following quality categories: \lbr\lbr #A: \lbr The CDS view entity can be used for high volume transactions or for background transactions. \lbr\lbr#B: \lbr The CDS view entity can be used for transactions or for background transactions. \lbr\lbr #C: \lbr The CDS view entity can be used to query individual objects in transactions. \lbr\lbr #D: \lbr The CDS view entity can be used for analytical queries. \lbr\lbr #X: \lbr The CDS view entity is designed for special application cases, such as data migration. \lbr\lbr#P: \lbr The CDS view entity is used to structure hierarchies of CDS entities and must not be used outside of such a hierarchy.,, #X,,#X
ObjectModel.usageType.sizeCategory,,Specifies the size of the data volume that must be scanned to return the result. This usually corresponds to the largest underlying table.,,A CDS view entity can be assigned to one of the following size categories: \lbr\lbr #S: \lbr The expected size of the data volume that needs to be scanned is less than 1000. \lbr\lbr #M: \lbr The expected size of the data volume that needs to be scanned is less than 100,000. \lbr\lbr#L: \lbr The expected size of the data volume that needs to be scanned is less than 10,000,000. \lbr\lbr #XL: \lbr The expected size of the data volume that needs to be scanned is less than 100,000,000. \lbr\lbr#XXL: \lbr The expected size of the data volume 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 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 view. For the quality categories annotated with ObjectModel.usageType.serviceQuality, the following rules apply:
  • A CDS view entity with the quality category A should access no more than three DDIC database tables, must not call any functions, must not aggregate a large number of table rows for direct access, and must not access DDIC database tables with mixed data categories. If the underlying tables are buffered, the CDS view entity should be buffered too. The runtime for reading a single line with a fully specified key must be less than 1 ms for selecting fields from a field list or 2 ms for selecting all fields with *.

  • A CDS view entity with the quality category B should access no more than five DDIC database tables, must not call any functions, must not aggregate a large number of table rows for direct access, and must not access DDIC database tables with mixed data categories. If the underlying tables are buffered, the CDS view entity should be buffered too. The runtime for reading a single line with a fully specified key must be less than 2 ms for fields from a field list or 5 ms for selecting all fields with *.

  • A CDS view entity with the quality category C should access no more than 15 DDIC database tables, must not aggregate a large number of table rows for direct access, and must not access DDIC database tables with mixed data categories. The runtime for reading a single line with a fully specified key must be less than 10 ms for fields from a field list or 20 ms for selecting all fields with *.

  • A CDS view entity with the quality category D should access no more than 100 DDIC database tables. The performance should be checked and monitored with realistic data by a test framework.

  • A CDS view entity with the quality category X can access more than 100 database tables. The performance must be checked and monitored with realistic data by a test framework.

  • A CDS view entity with the quality category P is not intended for usage in business applications. Performance checks by a test framework are not required.

  • For all quality categories, the subannotations sizeCategory and dataClass should be specified. Only for quality category P, they do not need to be specified.

These rules can be checked in the ABAP Test Cockpit (ATC) by tests delivered by SAP.
  • Generally, a CDS view entity used in an application should not access more than 100 DDIC database tables and should have a quality category between A and D.





Addresses (Business Address Services)   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 29891 Date: 20240426 Time: 031507     sap01-206 ( 440 ms )