Ansicht
Dokumentation

ABENC0_PROVIDER_RULES_CDS - C0 PROVIDER RULES CDS

ABENC0_PROVIDER_RULES_CDS - C0 PROVIDER RULES CDS

Fill RESBD Structure from EBP Component Structure   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

C0 Contract Rules for Providers of CDS Entities

Generally, a repository object that is classified with the C0 contract must not be deleted after being released as an API but can become deprecated.

The following sections show the most important rules that a C0 contract imposes on different kinds of repository objects.

Prerequisites for C0 Release

In CDS view entities and CDS projection views, the annotation @AbapCatalog.viewEnhancementCategory can be used instead, or both annotations can be used at the same time. Their values must fit to each other, that means, they must both allow extensions.
  • The stable data sources defined in the annotation @AbapCatalog.extensibility.dataSources must fulfill at least one of the following conditions:
  • be a data source specified as part of the SELECT clause (CDS view entity)

  • be specified as data source after DEFINE VIEW ENTITY AS PROJECTION ON (CDS projection view)

  • be a locally defined or redefined association whose association target has exactly one data source defined after FROM, which is a DDIC database table. An association can only be defined as stable data source if is has a maximum cardinality of maximum 1.

  • Release is possible only if all elements use the correct namespace prefix. For repository objects developed in an SAP system, this means that the element names must not start with YY or ZZ. /namespace_prefix is only allowed if the enclosing object has the same prefix.

  • have exactly one DDIC database table as data source after FROM and do not define any associations.

  • The CDS entity must not have any fields of data type LCHR or LRAW.
  • The annotation @AbapCatalog.extensibility.allowNewDatasources is optional. It can be set to true or false, but true is allowed only in CDS projection views. When set to true, consumers of the released API are allowed to use new data sources. This means that a consumer can use a newly defined association in a path expression to include a field from a new data source in the extension.

General Rules for Released APIs

  • Client-dependent views must not be changed into client-independent views after C0 release.
  • The extensibility annotations must not be removed after C0 release. Changes are allowed within strict limits:
  • @AbapCatalog.extensibility.extensible must not be removed and its value must not be changed.

  • The released stable alias names specified in AbapCatalog.extensibility.dataSources must not be changed. The target object name a released alias refers to must not be changed. If the released alias name refers to an association, this association must not change its maximum cardinality. New stable data sources can be added.

  • The quota definition defined in @AbapCatalog.extensibility.quota.maximumFields and @AbapCatalog.extensibility.quota.maximumBytes must not be reduced.

  • The element suffix defined with @AbapCatalog.extensibility.elementSuffix must not be changed.

  • @AbapCatalog.extensibility.allowNewDatasources must not be removed and its value must not be changed from true to false. The reverse, from false to true, is possible though.

  • Union views must not be released under the C0 contract.
  • Entities with a GROUP BY clause are not supported.
  • The annotation AbapCatalog.viewEnhancementCategory must not be set to #UNION or #GROUP BY.
  • A maximum of 64 joins is supported (ATC error). A maximum of 32 joins is recommended (ATC warning).
  • Client-independent CDS views must not be released under the C0 contract.

Example Topics

Example for a C0 released CDS view entity which is extended from a restricted ABAP language version

Example for a C0 released CDS projection view which is extended from a restricted ABAP language version






CL_GUI_FRONTEND_SERVICES - Frontend Services   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 12102 Date: 20240511 Time: 062956     sap01-206 ( 123 ms )