Registering an OData Service for Caching

This section describes the steps you perform to register an OData service for caching.

As an example we use the POWL enabling service. Note that here you have to skip step 2 as this has already been implemented in advance in the POWL enabling framework.

  1. Use transaction /UI2/CACHE to register your service and your entity data provider for cache use.

    Specify the following parameters:

    • Service Name: The name of the service

    • Data Provider Class: The service's data provider class

      In our case it is /UI2/CL_POWL_APPLID_DATA.

    • Filtering: Select the checkbox
    • Cache active: Select the checkbox. To deactivate the cache, deselect the checkbox.
  2. Enhance your model provider (here class /UI2/CL_POWL_MODEL_CUST) so that it includes the action 'RefreshCache' defined in the cache model provider /UI2/CL_GW_MP_CACHE. Change method DEFINE as shown below:
    * include action 'RefreshCache' defined in external model 
    /ui2/gw_cache_model.
    * mpc is /ui2/cl_gw_mp_cache.
    me->model->extend_model(
    iv_model_name = /ui2/cl_gw_mp_cache=>gc_cache_model_name
      ).
  3. Always specify as data provider class /UI2/CL_GW_DP_CACHE when registering your service in the back end. As model provider specify the one pertinent to your service. In the POWL case it is the generic model provider /UI2/CL_POWL_MODEL_CUST. This is done with transaction /IWBEP/REG_SERVICE in the OData Channel (back end).
  4. Activate the service on the Gateway server. Use transaction /IWFND/MAINT_SERVICE to activate the service on the Gateway server. In our example the Gateway server is G3J_300.