Ansicht
Dokumentation

ABENCDS_PROJ_VIEW_VIRTEL_ABEXA - CDS PROJ VIEW VIRTEL ABEXA

ABENCDS_PROJ_VIEW_VIRTEL_ABEXA - CDS PROJ VIEW VIRTEL ABEXA

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

- CDS Projection View, Calculating a Virtual Element

This example demonstrates how a virtual element is calculated at runtime.

Source Code

Execute

Description

The example accesses the CDS projection view DEMO_SALES_PV_SO_EXP in which a virtual element expiry_date is bound to an ABAP class CL_DEMO_SALES_VIRT_ELEM_EXIT:

  • First, it reads data from the view using an ABAP SQL SELECT statement.
  • Second, it reads data from the view using the service binding DEMO_SB_SALES_PV_SO_EXP. For that, an OData Client Proxy is used, that accesses the OData service of the service binding.

When using ABAP SQL, the class CL_DEMO_SALES_VIRT_ELEM_EXIT is not accessed and the virtual element is not calculated. When using the service binding, the class CL_DEMO_SALES_VIRT_ELEM_EXIT is accessed. When using the OData service, the results of the query are provided by the RAP query engine. The RAP query engine uses ABAP SQL and also calls the method for calculating the virtual element.






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

Length: 1759 Date: 20240424 Time: 164101     sap01-206 ( 32 ms )