Get Example source ABAP code based on a different SAP table
• EXTENSION FOR PROJECTION ABAP_BDL_PROJ_EXT • DEFINE AUTHORIZATION CONTEXT ABAP_BDL_PROJ_EXT • FOREIGN ENTITY ABAP_BDL_PROJ_EXT • IMPLEMENTATION IN CLASS ABAP_BDL_PROJ_EXT • UNIQUE ABAP_BDL_PROJ_EXT • WITH PRIVILEGED MODE DISABLING ABAP_BDL_PROJ_EXT • BASE CONTEXT ABAP_BDL_PROJ_EXT • AND ABAP_BDL_PROJ_EXT
ABAP_RAP - extension for projection>
ABAP_SYNTAX extension for projection BEGIN_SECTION VERSION 5 OUT $[ implementation in class ClassName unique>$]; $[with privileged mode disabling base context $[and ContextName$]> $]; $[foreign entity>$] END_SECTION VERSION 5 OUT $[define behavior for>$] $[extend behavior for>$] BEGIN_SECTION VERSION 5 OUT $[extend own authorization context>$] $[define authorization context>$] END_SECTION VERSION 5 OUT ...>
What does it do? Extends an existing RAP projection behavior definition> using a BDEF projection extension> in the RAP BDL>. A RAP projection behavior definition can have one or more BDEF projection extensions. The number of extensions is not limited. A BDEF projection extension itself cannot be further extended. A BDEF projection extension can have the following components: BEGIN_SECTION VERSION 5 OUT
implementation in class ClassName unique>: an ABAP behavior pool > is possible in a BDEF projection extension:
Functionality that is reused from the base BO does not require its own implementation. The implementation from the base BO is reused.
If the BDEF projection extension defines new actions or functions , an ABAP behavior pool is required.
The rules for extension ABPs apply, see topic implementation in class unique, extension>.
with privileged mode disabling base context $[and ContextName$]>:
A BDEF projection extension can enable BDEF privileged mode>. As a prerequisite, the base BO of type managed> or unmanaged> must enable privileged mode. The behavior of the extended BDEF of type projection> is irrelevant. It may define privileged mode, but this is optional.
The syntax addition disabling base context> is mandatory; and ContextName> is optional. The same rules apply as for projection behavior definitions, see topic with privileged mode>>, Alternative 2.
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 projection extension. END_SECTION VERSION 5 OUT
define behavior for>>: Defines a RAP projection extension entity> using the statement define behavior for >>.
extend behavior for>>: A RAP entity projection extension> extends the behavior of an existing entity of a projection BDEF. BEGIN_SECTION VERSION 5 OUT
extend own authorization context>>: if the projected BDEF of implementation type projection> defines a full authorization context>, this context can be extended. If the projected BDEF does not define any full 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 projection extension. For details, see topic TITLE >. END_SECTION VERSION 5 OUT BEGIN_SECTION VERSION 5 ONLY ABAP_NOTE : No ABAP behavior pool must be specified. The statement implementation in class ClassName unique> is forbidden. END_SECTION VERSION 5 ONLY BEGIN_SECTION VERSION 5 OUT
ABAP_EXAMPLE_VX The BDEF projection extension DEMO_RAP_PROJ_EXT_BEH_1>> extends the RAP projection behavior definition DEMO_RAP_PROJ_EXT_BEH>>.
It extends the behavior of the root node.
It behavior-enables an extension node using the syntax define behavior for>, reusing operations from the projected BDEF and specifying field attributes. BDEF DEMO_RAP_PROJ_EXT_BEH_1 ABAP_EXAMPLE_END
ABAP_EXAMPLE_ABEXA The executable example Projection Entity Extension> explains the example above in detail. ABAP_EXAMPLE_END END_SECTION VERSION 5 OUT