SAP HANA CACHED VIEWS ABEXA



Get Example source ABAP code based on a different SAP table
  


VX_EXA_ONLY

SAP HANA, Cached Views
This example demonstrates AB-SQL access to a cached view on the SAP HANA database.

ABAP_SOURCE_CODE
DEMO CL_DEMO_SELECT_CACHED_VIEW

ABAP_DESCRIPTION
The instance DEMOCDSCACH of the CDS view DEMO_CDS_CACHED_VIEW on the SAP HANA database is designated for caching using ADBC and the SQL statement ALTER TABLE. The maximum cache lifetime cannot be specified. It is also possible to delete an existing cache.
When the CDS view is accessed using the AB-SQL statement SELECT, the database hint %_HINTS HDB 'RESULT_CACHE' is used to specify that the cache is accessed.
The addition EXTENDED RESULT of the INTO clause can be used to determine whether a cache is available, and the cache properties are read.