Skip to Content
Author's profile photo Christian Drumm

Refresh Button in IC Web Client


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).

2014-02-28 17_49_24-Interaction Center - [Übersicht für Andreas Müller] - Internet Explorer bereitge.png

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

Step 1: Enhance the view IUBOTREE/IsuBolTree

2014-02-28 18_07_48-CVQ(1)_100 Structure of Component IUBOTREE - Enhancement Set ZES_CRM.png

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.


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 ).

       destination = rfc_dest
       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' ).


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Sandesh K
      Sandesh K

      Hi Christian,

      I have a similar issue , I hope you can help me in this.

      In our scenario , we create relationships to an account dynamically based on some custom logic on save of the BP using BADI: PARTNER_UPDATE.

      But these new relationships get reflected on the WebUI only if the agent logsoff from the current WebUI session and re-opens the account in a new WebUI session.

      We would like to see the new relationships on the WebUI as soon as they are created through the BADI. how can we get through this WebUI buffer issue? Any pointers will be very helpful.



      Author's profile photo Christian Drumm
      Christian Drumm
      Blog Post Author

      Hi San,

      the approach described above should also work ion your situation.

      Alternatively you could try to force a reread of the related entities of the BP. This can be done in the CL_CRM_BOL_ENTITY->GET_RELATED_ENTITIES and CL_CRM_BOL_ENTITY->GET_RELATED_ENTITY method by using CL_CRM_BOL_ENTITY=>BYPASSING_BUFFER as IV_MODE (cf. Refresh BOL Buffer).


      Author's profile photo Sandesh K
      Sandesh K

      Thanks Christian. I will check on this.

      Author's profile photo Mahesh Jagannath
      Mahesh Jagannath

      Hi Christian,

      A very informative article on refresh of BOL Tree.

      I have an issue where when disconnections are created from WebUI for AMI Devices but the status updates do not get reflected back(unless we end the interaction and re-confirm the account), as statuses are being fetched from buffer.
      I am thinking of enhancing the search component to call CL_CRM_COL_CORE->RESET. Is this a correct approach or is there any better way to do this?


      Author's profile photo Christian Drumm
      Christian Drumm
      Blog Post Author

      Hi Mahesh,

      Which search component are you trying to enhance?
      I guess you could also call a CL_CRM_COL_CORE->RESET in a search component. The issue I see, is that this would trigger a implicit refresh. I thinks it is better to have the reset called explicitly using a button. This way you don't loose any buffering done in the BOL in situations where the refresh is not required.