Ansicht
Dokumentation

ABENCDS_DEFINE_VIEW_ENTITY_BUFFER - CDS DEFINE VIEW ENTITY BUFFER

ABENCDS_DEFINE_VIEW_ENTITY_BUFFER - CDS DEFINE VIEW ENTITY BUFFER

ROGBILLS - Synchronize billing plans   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

- DEFINE VIEW ENTITY BUFFER

DEFINE VIEW ENTITY BUFFER ON cds_view_entity
                   LAYER CORE
                       $| LOCALIZATION
                       $| INDUSTRY
                       $| PARTNER
                       $| CUSTOMER
                   TYPE SINGLE
                      $| ${GENERIC NUMBER OF KEY ELEMENTS number$}
                      $| FULL
                      $| NONE

Effect

Defines a CDS entity buffer in the CDS DDL.

A CDS entity buffer is a CDS tuning object that specifies a layer dependent buffering type for the table buffering of a CDS view entity cds_view_entity. As a prerequisite, the definition of the CDS view entity must contain the following annotation:

@AbapCatalog.entityBuffer.definitionAllowed:true.

If a CDS entity buffer is active for a CDS view entity, the annotation cannot be removed there.

The buffering type is set as follows:

  • TYPE GENERIC defines generic buffering. The number of respected of key fields must be set by number behind NUMBER OF KEY ELEMENTS. number must be a positive numeric literal that is not greater than the number of key elements of the CDS view entity cds_view_entity.

The addition LAYER defines the layer for which the buffering type is valid. The layer determines the priority if there are multiple entity buffers for one CDS view entity. The priority is as follows, where the list starts with the lowest and ends with the highest priority:

  1. CORE -
  2. LOCALIZATION - SAP application component
  3. INDUSTRY - SAP industry solution
  4. PARTNER - partner
  5. CUSTOMER - customer

It is not possible to define several entity buffers with the same layer for one CDS view entity.

With the addition TYPE NONE buffering can be switched off explicitly. This is especially useful for switching off buffering in a higher layer that was defined in a lower layer.

Notes

  • The name of a CDS entity buffer is not reflected in its definition. It only occurs as the name of the repository object in ADT.
  • Only the explicitly defined key fields of a CDS entity must be considered behind NUMBER OF KEY ELEMENTS. Other than for CDS DDIC-based views, there is no client column to be considered for client-dependent views.
  • A CDS entity buffer fulfills the same task as the respective technical settings of a DDIC database table. Both can be activated and transported separately from the buffered entity. But compared to buffering DDIC database tables, the buffering type for a CDS view entity has the additional feature of being layer specific.

Example

The following definitions demonstrate the three kinds of table buffering for three different CDS entities in the layer core.

define view entity buffer on DEMO_CDS_FULL_BUFFERED_VIEW
  layer core
  type full

define view entity buffer on DEMO_CDS_GEN_BUFFERED_VIEW
   layer core
   type generic number of key elements 1

define view entity buffer on DEMO_CDS_SINGLE_BUFFERED_VIEW
   layer core
    type single

The three CDS entities DEMO_CDS_FULL_BUFFERED_VIEW, DEMO_CDS_GEN_BUFFERED_VIEW, DEMO_CDS_SINGLE_BUFFERED_VIEW all contain the annotation @AbapCatalog.entityBuffer.definitionAllowed: true.






TXBHW - Original Tax Base Amount in Local Currency   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 8732 Date: 20240511 Time: 124233     sap01-206 ( 75 ms )