Quantcast
Channel: SCN : Blog List - Customer Relationship Management (SAP CRM)
Viewing all articles
Browse latest Browse all 229

Three ways to control the visibility of an assignment block in overview page in web client UI

$
0
0
Hi Friends,
It is a common requirement that a certain assignment block in overview page should only be displayed under some condition, for example under control of a business switch.
clipboard1.png
Here are three ways which could control the visibility of one assignment block via code.
Approach1: dynamical view detachment
refine method DETACH_STATIC_OVW_VIEWS of the controller class of your overview page. All views put into rt_viewid will be hidden by UI framework in the runtime.The code below means if a switch is turned on, the assignment block SearchResult will be hidden.
clipboard2.png
Approach2: dynamic UI configuration load
Create a new configuration within which only Search view is displayed. The configuration is bound to a certain UI object type.
clipboard3.png
Now we have two UI configurations. The standard configuration will display two assignment blocks by default, the configuration with UI object type = CRM_SMC will only display Search view.
clipboard4.png
Implement DO_CONFIG_DETERMINATION:
clipboard5.png
  method DO_CONFIG_DETERMINATION.  " IF search result view should be hidden     me->set_config_keys( iv_object_type          = 'CRM_SMC'                          iv_propagate_2_children = abap_false ).  " ENDIF  endmethod.
Approach3:
This is a most elegant way, however it could only be used if you would like to control the visibility of your view via a business switch.
When you are assigning your assignment view to the view area of Overview page in runtime repository, a business switch can be assigned.
If the switch is turned off, the related view will be automatically hidden by UI Framework.
clipboard6.png

Viewing all articles
Browse latest Browse all 229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>