
CDS behavior definitions are extended with CDS behavior extensions. It is possible to create behavior extensions on data model level and on projection level. The creation of behavior extensions on interface level, however, is not supported. The behavior of BO interfaces is always extended indirectly through the behavior extension of the underlying business object definition.
The developer in charge of a behavior definition, projection, or interface is able to control whether behavior extensions can be created and to what extend the behavior can be extended.
Because A BO interface cannot be extended directly, the extensions always refer to the underlying base business object but uses the using interface addition to refer to the interface as well.

Behavior extensibility is controlled by adding the extensible addition to the behavior definition. The extensible addition is only supported in strict mode, that is, if the behavior definition contains either the strict; or the strict( 2 ); directive.
The addition is supported in the following places:
- Behavior Definition Header
Adding extensible in the behavior definition header is a prerequisite for adding it anywhere else in the behavior definition. If specified, at least one RAP BO entity must be declared as extensible in its entity behavior characteristics. Within curly brackets, one or more of the following additions are possible:
- with validations on save
- with determinations on save
- with determinations on modify
- with additional save
These additions explicitly allow validations, determinations, or an additional save in an entity behavior extension. If not declared explicitly, the respective type of determination, validation, or the additional save must not be defined in an extension to an existing RAP BO entity.
- Entity Behavior Characteristics
Adding extensible to the define behavior for statement is mandatory for each BO entity that allows extensions. The addition allows the extension of the BO entity with actions, determine actions, and field characteristics for extension fields. The extension with determinations, validations, and an additional save depends on the extensible syntax in the behavior definition header.
- Determine Action Definition
Adding extensible to a determine action statement allows validations and determinations to be added to the determine action in question. It is only supported in draft-enabled business objects.
Hint
If you enable the extension of a business object with validations and/or determinations on save, it is strongly recommended to define the draft determine action Prepare as extensible.
- Field Mapping
By adding extensible to a mapping for statement, the field mapping can be extended with extension fields. The extensible addition can only be used with corresponding, so that components with the same name are automatically mapped to each other.
Hint
The moment you define a behavior definition extensible the syntax check issues a warning that tells you to make all field mappings extensible. However, it does not make much sense if the related persistent table or dictionary structure type is not extensible. You can suppress the warning using the ##UNEXTENSIBLE_MAPPING pragma.

On projection level, the use of the extensible addition is similar to its use on data model level. However, there are no curly brackets supported after the extensible keyword in the behavior definition header.
Note
For declaring a behavior projection as extensible, it is not necessary that the underlying behavior definition is declared as extensible. A behavior projection can be extensible independently of the projected business object.
In a behavior definition on interface level, the keyword extensible can only be specified in the behavior definition header. This specification includes all entities and components that are included in the interface.




