ABAP for Cloud Development
AS ABAP Release 914, ©Copyright 2024 SAP SE. All rights reserved.
ABAP - Keyword Documentation → ABAP RAP Business Objects → RAP - Behavior Definitions → RAP - BDL for Behavior Definitions → RAP - BDEF Extension → RAP - BDEF Extension, Extensibility Enabling →
RAP - Extensibility Enabling for Base BOs
Syntax
managed unmanaged
strict; (version)
extensible
with friends BDEFExtension1 , BDEFExtension2 ,...
{
with validations on save;
with determinations on save;
with determinations on modify;
with additional save;
} ;
...
define behavior for RootEntity
extensible
...
{
...
mapping for PartnerType corresponding extensible
determine action Name extensible { ... }
draft determine action Prepare extensible { ... }
...
}
...
Prerequisite
To allow BDEF extensions to a managed or unmanaged RAP behavior definition, BDEF strict mode must be switched on using the keyword strict
(version).
Description
The keyword extensible
can be specified at different places to allow for extensions:
extensible
in the RAP behavior definition header- Prerequisite for extensibility. If it is not specified, extensions are not allowed. If specified, at least one RAP BO entity must be declared as extensible in the entity behavior characteristics.
- Allows the following components to be added to a RAP BO via a BDEF extensions:
- RAP foreign entity
- Adding a new RAP authorization context for disable and extending an existing full authorization context from the extended entity.
- Defining behavior for an extension node by means of a RAP extension entity behavior.
In the header declaration, the following optional additions are available:
with friends
: Can be used to declare one or more BDEF extensionsBDEFExtension1
,BDEFExtension2
, ... as friends of the current behavior definitionRootEntity
. At least one BDEF extension must be specified. The friends of a BDEF have enhanced access rights to the behavior definition in question. Further details are described in the topic RAP -with friends
.- 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 a RAP additional save in a RAP 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.
- Note: This declaration refers only to extensions of existing RAP BO entities (
extend behavior for
). In extension nodes (define behavior for
), validations, determinations, and an additional save are always possible and no explicit permission is required. extensible
in the entity behavior characteristics- Mandatory for each individual RAP BO entity that allows extensions.
- Allows the following behavior extensions to be added via a BDEF extension for the RAP BO entity in question:
- RAP determinations and RAP validations can be defined for the RAP BO entity in question, under the precondition that the particular kind of determination and validation is allowed in the header definition.
- RAP field characteristics can be added to extension fields.
- RAP actions including RAP feature control.
- RAP functions.
- RAP BO determine actions.
- Behavior-enabling of associations that have an extension node as association target.
- RAP type mapping.
- RAP foreign entities.
- RAP additional save.
extensible
can be specified in different places in the entity behavior body:mapping for PartnerType corresponding extensible
: a RAP type mapping defined in the extended RAP business object can be extended with extension fields.extensible
can only be used in combination withcorresponding
, so that components with the same name are automatically mapped to each other.determine action Name extensible { ... }
: only allowed for draft-enabled BOs. Allows validations or determinations to be added to the determine action in question.Internal
determine actions must not be declared as extensible.draft determine action Prepare extensible { ... }
: only allowed for draft-enabled BOs. Allows validations or determinations to be added to the draft determine action Prepare in question.Internal
draft determine actions must not be declared as extensible.
&ABAP_LIMITATION&
In unmanaged RAP BOs, there are the following limitations:
- Determinations and validations cannot be specified in BDEF extensions to unmanaged RAP BOs. Therefore, the following additions are not available:
with validations on save;
with determinations on modify;
with determinations on save;
- A RAP additional save is not available in BDEF extensions to unmanaged RAP BOs. Therefore, the addition
with additional save;
is not available. - Determine actions and the draft determine action
Prepare
are not available in BDEF extensions to unmanaged RAP BOs. Therefore, determine actions and the draft determine actionPrepare
cannot be specified asextensible
. - Node extensibility is not available for unmanaged RAP BOs.