Ansicht
Dokumentation
ABENBDL_BDEF_PROJECTION_HEADER - BDL BDEF PROJECTION HEADER
CL_GUI_FRONTEND_SERVICES - Frontend Services ROGBILLS - Synchronize billing plansThis documentation is copyright by SAP AG.
- CDS Behavior Definition Header, Projection BDEF
implementation type;
${$[implementation in class ClassName unique$]$};
$[strict;$]
$[extensible;$]
$[use draft;$]
$[
with privileged mode disabling base context;$]
$[foreign entity EntityName;$]
${
entity behavior definition
$| define $[own$] authorization context $}
...
Effect
The CDS behavior definition header of a projection BDEF is similar to the header of a managed or unmanaged BDEF. It can project certain elements from its base BO. Some elements are also newly defined. All possible elements are listed below. The implementation type is mandatory and all other attributes are optional.
- implementation type: a projection BDEF must start with the keyword projection and it must be based on a CDS projection view.
- implementation in class ClassName unique: in a projection behavior definition, an ABAP behavior pool is not compulsory but possible:
- Functionality that is reused from the projected BO does not require its own implementation. The implementation from the projected BO is reused.
- If the projection BDEF defines new actions or functions, an ABAP behavior pool is required.
- strict: BDEF strict mode can be used. As a prerequisite, it must be specified in the projected BO.
- extensible: if specified, BDEF extensions are allowed. As a prerequisite, BDEF strict mode must be switched on. In projection BDEFs, only the keyword extensible is possible, without the additions described in topic extensible.
- use draft: the draft concept can be reused from the base BO.
- For details on the draft concept, see topic CDS BDL - with draft.
- For details on the reuse, see topic CDS BDL - use.
- with privileged mode disabling base context: BDEF privileged mode can be used. As a prerequisite, it must be specified in the projected BO. For details, see topic CDS BDL - with privileged mode disabling.
- foreign entity: Defines an entity which is not part of the BO structure as component for the response structures, thus enabling message mapping for other BOs.
The behavior definition header is followed by
- either the entity behavior definition that starts with define behavior for
- or by the definition of an authorization
context that starts with define $[own$] authorization context.
Example
The following example shows a projection BDEF based on the projected BO DEMO_SALES_CDS_BUPA_2. It defines the managed BDEF DEMO_CDS_VALIDATION as foreign entity and exposes the standard operations and associations of the underlying BO.
Like in a RAP BO of type managed or unmanaged, the foreign entity is included in the reported structure:
IMAGE @@foreign_in_projection.jpg@@221@@94@@SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up RFUMSV00 - Advance Return for Tax on Sales/Purchases
This documentation is copyright by SAP AG.
Length: 6798 Date: 20240420 Time: 062740 sap01-206 ( 68 ms )