Using the OLAP cache serves to improve performance when executing queries (see OLAP Cache Monitor and Cache Mode).
The use of the cache is usually deactivated if virtual characteristics or key figures are used in the query because these InfoObjects are filled according to user via a customer exit (SAP enhancement RSR00002 or BAdI RSR_OLAP_BADI) and were only written to the queue afterwards.
Using the option Using Cache Despite Virtual Characteristics/Key Figures on the Query Properties dialog box, you can explicitly determine that this data be written to the cache after it has been read by the database and has run through the customer exit. The following describes access to the cached data.
Note that a change to the data via a customer exit does not lead to invalidation of the cache. If the data coming out of the customer exit does not only depend on the inbound data, but for example, also on the user, on time or on other tables, the cached data can deviate from the data that would be determined at that moment.
Activation of the option Using Cache Despite Virtual Characteristics/Key Figures should thus only be done in exceptional cases and after precise analysis of SAP enhancement RSR00002 and Business Add-In RSR_OLAP_BADI.
A special case in which the option Using Cache Despite Virtual Characteristics/Key Figures could be useful, for example, is the use of a variable for a virtual characteristic with which the end user in reporting can select constants as the basis for currency translation types.
SAP Enhancement RSR00002
...
1. You have created an active project in transaction CMOD, which you have assigned to SAP Enhancement RSR00002.
2. You have defined the required virtual characteristics or key figures within the InfoProvider. You have defined customer-specific code in include reports for the function module EXIT_SAPMRSRU_001.
For more information on customer exits, see the system documentation. Choose the sub-object Documentation in transaction SMOD for enhancement RSR00002 (BI: Virtual Characteristics and Key Figures in Reporting); choose Display.
BAdI RSR_OLAP_BADI
As an alternative, you can implement the Business Add-In RSR_OLAP_BADI (Virtual Characteristics and Key Figures from SMOD) instead of SAP enhancement RSR00002.
For more information on the interface of this Business Add-In, see the BAdI definition (SE19). Note that you can transfer the example code for this BadI (example implementation class CL_EXM_IM_RSR_OLAP_BADI).
The following ODS objects for the utilities industry, delivered in the context of SAP Business Content, contain examples of virtual characteristics and key figures:
InfoProviders |
Virtual InfoObjects |
ODS Object Inventory Statistics Prepayment Counter Technical name: 0UCS_DS02 |
Virtual characteristics: VKF key figure area consumption debt VKF key figure area consumption debt rate VKF key figure area non consumption debt VKF key figure area non consumption debt rate |
DataStore object Payment Scheme Technical name: 0UCS_DS03 |
Virtual key figure Number of payments |