Get Example source ABAP code based on a different SAP table
HIDDEN
C0 Contract Rules for CDS Service Definitions The following sections list the most important C0 contract> rules for CDS service definitions>. The general rules for CDS service definition extensions> are described in topic CDS SDL - EXTEND SERVICE>>. ITOC
C0 Contract Rules for Providers of CDS Service Definitions
Prerequisites for a C0 Release
A provider contract must be set using the syntax statement PROVIDER CONTRACT>>.
The annotation @AbapCatalog.extensibility.extensible: true>> must be set.
The C0 release is possible only if all exposed entities use the correct namespace> prefix. For repository objects developed in an SAP system, this means that the entity names must not start with YY> or ZZ>.
Stability Rules After Release
The service definition in question must not be deleted.
The annotation @AbapCatalog.extensibility.extensible: true> must not be removed or set to false>.
The provider contract must remain stable. It must not be removed and its value must not be changed.
If new entities are added, these new entities must obey the naming rules. For repository objects developed in an SAP system, this means that the entity names must not start with YY> or ZZ>.
C0 Contract Rules for Consumers of CDS Service Definitions
The extended service definition must be released under the C0 contract.
If entities are exposed that were initially created in an SAP system, these entities must be released under the C1 release contract>.
The rules of the provider contract must be respected. These rules are described in topic CDS SDL - PROVIDER CONTRACTS>>.
Example: C0 Released CDS Service Definition, Design and Consumption The following CDS service definition DEMO_CDS_SD_PROVIDER_CONTRACT>> is defined as extensible and it specifies a provider contract. It fulfills all requirements for C0 release. ABAP_NOTE This service definition shows how to create a released API. However, it is not released under the C0 contract, extend, because it is not intended to be used as an API. SRVD DEMO_CDS_SD_PROVIDER_CONTRACT The following CDS service definition extension DEMO_CDS_SD_PROVIDER_CONTRACT>> extends the service definition displayed above. It exposes one further entity, respecting the provider contracts' rules. SRVD DEMO_CDS_SD_C0_EXTEND