打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
三种动态控制SAP CRM WebClient UI assignment block显示与否的方法

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.

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 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 load

Create 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:

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: Control the visibility via business switch

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 as displayed in the picture below. If the switch is turned off, the related view will be automatically hidden by UI Framework.

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.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
排骨焯水后,为什么又腥又柴?原来很多人一直用错水了,难怪不好吃
〖养生茶饮〗多种养生茶配方☕男女都可以饮用
“富养女儿”与“剩女”现象:一碗毒鸡汤引发的思考
图文:中医秘方—飞蚊症秘方
快捷键
黑河江边
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服