What does it do? Extends an existing RAP behavior definition> of type managed> or unmanaged> using a BDEF extension> in the RAP BDL>. An existing RAP behavior definition can have one or more BDEF extensions. The number of extensions is not limited. A BDEF extension itself cannot be further extended. Naming: BDEF extensions themselves and each single extension element should use a separate namespace> to avoid naming conflicts with the original BDEF and its elements. BDEF extensions created in non-SAP and non-partner development systems should use the customer namespace> prefix Z> or ZZ>. A BDEF extension can have the following components:
using interface>>: It is strongly recommended that a RAP BO is extended via an interface layer. For details, see topic RAP BDL using interface>, Extension >.
extension_header>>: Mandatory component of a BDEF extension. Similar to the RAP behavior definition header> but offers fewer options. The semicolon after the keyword extension> is either mandatory or not allowed, depending on the components of the extension_header>. See examples.
foreign entity>> : Defines a RAP BO entity> which is not part of the CDS composition tree> of the current RAP BO as part of the response structures. A foreign entity can be defined before, after, or between the other components. Only entities that belong to the same software component can be added as RAP foreign entity> to a BDEF extension.
entity_behavior_extension>>: behavior extension of an existing RAP BO entity.
extension_entity_behavior>>: defines the behavior for an extension node.
extend own authorization context>>: if the extended BO defines a full authorization context>, this context can be extended. If the extended BO does not define an own authorization context, it must not be added via an extension.
define authorization context>>: a new authorization context for disable > can be defined in a BDEF extension. The syntax is similar to the syntax for RAP BOs with the following difference: The addition for disable > is not supported. For details, see topic TITLE >.
ABAP_EXAMPLE_VX5 The following source code shows BDEF extension DEMO_RAP_EXTENSION_1>>. It extends BDEF DEMO_RAP_EXTENSIBLE_ROOT >>. The extension contains the following components: