Hi Friends, Here are three ways which could control the visibility of one assignment block via code. Approach1: dynamical view detachmentrefine method DETACH_STATIC_OVW_VIEWS of the controller class of your overview page. All views put into internal table rt_viewid will be hidden by UI framework in the runtime. The code below just means you can evaluate some condition in line 3, and if the condition is met, the assignment block SearchResult will be hidden. Approach2: dynamic UI configuration loadCreate a new configuration within which only Search view is displayed. The configuration is bound to a certain UI object type. 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. Implement DO_CONFIG_DETERMINATION: Approach3: Control the visibility via business switchThis 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. After you have assigned a view to the view area of overview page, the switch ID is displayed after view name. You could first find the related business function for switch CRM_SOC_SFWS_SMI_2 via tcode SFW1, then find the business function status in SFW5: If the business function is deactivated, the assignment block will also be hidden automatically. |
|