SAP BDL EXTENSIBILITY ENABLING M U



Get Example source ABAP code based on a different SAP table
  


• EXTENSIBLE ABAP_BDL_EXTENSION
• WITH VALIDATIONS ON SAVE ABAP_BDL_EXTENSION
• WITH DETERMINATIONS ON SAVE ABAP_BDL_EXTENSION
• WITH DETERMINATIONS ON MODIFY ABAP_BDL_EXTENSION

ABAP_RAP - Extensibility Enabling for Base BOs

ABAP_SYNTAX
managed $| unmanaged
strict$[(version)$];
extensible $[{
$[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 { ... }$]
...
}
...

ABAP_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)$] .
ABAP_PREREQ_END

What does it do?
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 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.
ABAP_NOTE This declaration refers only to extensions of existing RAP BO entities. In extension nodes, 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 with corresponding, 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_EXAMPLE_VX5
The RAP behavior definition for DEMO_RAP_EXTENSIBLE enables BDEF extensions by specifying multiple extension points.
BDEF DEMO_RAP_EXTENSIBLE
The extension DEMO_RAP_EXTEND1 extends the RAP behavior definition DEMO_RAP_EXTENSIBLE.
BDEF DEMO_RAP_EXTEND1
ABAP_EXAMPLE_END