SAP C0 PROVIDER RULES BDEF



Get Example source ABAP code based on a different SAP table
  



C0 Contract Rules for Providers of RAP Behavior Definitions
BDEFs with the implementation type managed, unmanaged, projection, interface, and abstract can be released under the C0 contract, extend. Generally, a RAP behavior definition (BDEF) that is released under the C0 contract, extend must not be deleted after being released as an API but can become deprecated. BDEF extensions themselves must not be C0 released.
The following sections show the most important C0 contract rules for BDEFs.
ITOC

Prerequisites for the C0 Release BDEF Implementation TypeRules
All - A C0 release is possible for the language version ABAP for Cloud Development. C0 release for the language version ABAP for Key Users is not possible within ABAP Development Tools. lbr - The BDEF to be released must not have any syntax errors. lbr - BDEF strict mode, version 2 ( strict(2)) must be used. lbr - The respective BDEF must be enabled for RAP extensibility as described in topic RAP BDL - BDEF Extension, Extensibility Enabling.
Managed and Unmanaged - Each RAP BO must at least have one RAP BO interface that is released under the C0 contract, extend. If this requirement is not met, a C0 release is still possible, but a warning message occurs. lbr - If the RAP BO is draft-enabled , a draft query view, specified using the syntax addition query, should be specified for each extensible RAP BO entity. This draft query view must be C0 released . If no draft query view is specified, release is still possible, but a warning message occurs. lbr - If the RAP BO has the implementation type unmanaged, the annotation @AbapCatalog.extensibility.allowNewCompositions: true is not allowed in the underlying CDS data model. lbr - If the RAP BO has the implementation type managed, all RAP BO entities annotated with @AbapCatalog.extensibility.allowNewCompositions: true in the underlying CDS data model must be marked as extensible.
Projection - If a projection BDEF has already been released under the C1 contract, use system-internally , then a C0 release is not possible. lbr - Projection BDEFs with use draft as dependent cannot be C0 released.
Interface - The underlying base BDEF must be released under the C0 contract, extend. lbr - The interface BDEF must first be released for C1. lbr - If the underlying base BDEF is draft-enabled, use draft is a prerequisite for a C0 release.
Abstract - The abstract BDEF must specify with hierarchy in the BDEF header. lbr - The optional addition ABAP Alternative 1@1@>with control must be specified for each entity behavior definition in an abstract BDEF.

Naming Rules
If the RAP BO has a namespace prefix , such as /PREFIX/, its elements must also have this prefix. The element names must not start with a different namespace prefix, nor with Z, nor with Y.
If the name of the RAP BO starts with Z or Y, there is no check.
In all other cases, the names of the elements must not start with Z , or Y, nor a namespace prefix.
The checks apply to the following elements:
Alias names of RAP BO entities.
External names of RAP BO entities, specified using the addition external.
Alias names of associations, specified using the addition ABAP Addition
Alias names of RAP foreign entities .
Names of RAP actions and RAP functions.
External names of RAP actions and RAP functions, specified using the addition external.
External names of action and function results, specified using the addition external.
Names of RAP determinations and RAP validations.
Names of RAP BO determine actions.
Names of RAP business events.

Stability Rules After Release BDEF Implementation Type Rules
All - The RAP extensibility enablement must not be removed. RAP BO entities and components that are explicitly marked as extensible must not be deleted or renamed and they must remain extensible. lbr - The BDEF implementation type must not be changed. lbr - The key fields of the RAP BO root entity must remain stable. Their type and order must not be changed and no new key fields must be added. lbr - RAP draft handling must not be added or removed after release. lbr - The optional addition optimized must not be added to the RAP BO draft action Activate . lbr - RAP late numbering must not be added to or deleted from extensible entities after release. lbr - If available, the RAP own authorization context must not be removed (even if it is empty).
Managed and Unmanaged - The name of the RAP persistent table of an extensible RAP BO entity must not be changed and the RAP persistent table must not be deleted or replaced by an unmanaged save. lbr ABAP_NOTE The reverse case is possible though. An unmanaged save can be replaced by a persistent table. lbr - A draft query view in an extensible entity must not be added, nor replaced, nor deleted. lbr - The RAP field characteristic notrigger must not be added to a field if determinations and validations are allowed in extensions.
Projection - The name of the projected BDEF must not be changed.
Interface - The name of the projected BDEF must not be changed. lbr - All associations exposed in an interface, including cross-BO associations and ancestor associations, must remain stable. They must not be deleted or disabled.
Abstract - The addition with hierarchy must not be removed.

Example Topics
Example for a C0 released RAP BO which is extended from ABAP for Cloud Development.
Example for a C0 released projection BDEF which is extended from ABAP for Cloud Development.