Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
ceedee666
Active Contributor

Introduction

In SAP CRM 7.0 the BOL and GenIL do a very good job related to data caching. This caching is necessary to allow for a good performance in the Web UI as the need for actually fetching data from the data base is reduced. However, sometime this data caching also leads to some problem.

In the SAP CRM 7.0 for Utilties implementation for one of our clients we implemented a quite advanced account overview screen in the IC Web Client. The call center agents mainly work in the account overview and start the necessary processes using context menus (see the screen shot below). Due to the caching of the BOL we sometimes have the situation, that the data in the account overview isn't refreshed after some process has been performed. This is especially true for the view processes were SAP IS-U transactions are called via the transaction launcher (cf. Almost Everything About Transaction Launcher - Part I and Almost Everything About Transaction Launcher - Part II). The result is, that the call center agents get confused and start to double check if they did something wrong or if it is one of the caching issues. This double checking is usually performed by ending an interaction and identifying the account again.

Due to this issues, the agents regularly asked for a refresh function in the account overview screen. So finally I set down an implemented this functionality.

Implementing a Refresh Button for the Account Overview

In order to provide the request refresh functionality I enhanced the component IUBOTREE with a small refresh button (see screen shot below).

In order to implement the refresh functionality the following steps were necessary.

Step 1: Enhance the view IUBOTREE/IsuBolTree

Step 2: Add the refresh button to the BOL tree.

In order to add the refresh button to the view I overwrote (I never can get used to the SAP terminology of "redefine") the method GET_ACTIONS  in the view controller (ZL_CRM_IU_COL_TREE_IMPL with the following code:

METHOD get_actions.
   DATA: action     TYPE crmt_thtmlb_button,
         window     TYPE REF TO cl_bsp_wd_window,
         usage_name TYPE string.

   result = super->get_actions( mode = mode ).

   window = me->view_manager->get_window_controller( ).
   usage_name = window->get_component_usage_name( ).

   IF usage_name = 'usageIUBOTREE_2'.
     action-id       = 'refresh_tree'.
     action-on_click = 'refresh_tree'.
     action-enabled = abap_true.
     action-type = cl_thtmlb_util=>gc_icon_refresh.
     APPEND action TO result.
   ENDIF.

ENDMETHOD.


Step 3: Implement the event handler EH_ONREFRESH_TREE.

In order to refresh the data I simply performed a reset of the BOL, closed the oen RFC connections to the SAP IS-U and navigated back to the account overview. This way all the data in the account overview is refreshed without the need to end the interaction an identify the account again. The call center agents love it.

There is one caveat to this approach. Any open changes that haven't been committed yet, will get lost during the BOL reset.

METHOD eh_onrefresh_tree.
   DATA: rfc_dest    TYPE bdbapidst,
         bol_core    TYPE REF TO cl_crm_bol_core,
         nav_service TYPE REF TO  if_crm_ui_navigation_service.

   "reset the BOL
   bol_core = cl_crm_bol_core=>get_instance( ).
   bol_core->reset( ).

   "reset all RFCs to IS-U
   zc_crm_cl_cxx_tools=>get_rfc_destination( EXPORTING iv_dialog      = abap_false
                                             IMPORTING ev_destination = rfc_dest ).

   CALL FUNCTION 'RFC_CONNECTION_CLOSE'
     EXPORTING
       destination = rfc_dest
     EXCEPTIONS
       OTHERS      = 1.

   "navigate back to the overview page
   nav_service = cl_crm_ui_navigation_service=>get_instance( ).
   IF nav_service IS BOUND.
     nav_service->navigate( iv_link_id = 'UTL-OVW-WC' ).
   ENDIF.

ENDMETHOD.
5 Comments
Labels in this area