自己实现一个SAP WebClient UI Repository Information System
For traditional ABAP artifact we have a handy tool Repository Information System in SE80 which can help us to efficiently locate the objects according to various search criteria.
For example, see my blog A small tip to find message id and number by repository information system.
However, for CRM WebUI Component, it is not supported by this information system. Several days ago I was asked by my colleague to provide him a list of all UI Component which have utilized the Genil model node “Product”.
Requirement: find all UI components which have context node bound to Genil model node “Product”.
Since there is no existing tool, so I write one.
REPORT zui_context_node_scan.
DATA: lt_context_node TYPE TABLE OF vseoextend-clsname,
lo_cls TYPE REF TO cl_bsp_wd_context_node,
lv_total TYPE int4,
lt_result TYPE TABLE OF zwebuicontextnam.
DELETE FROM zwebuicontextnam.
SELECT clsname INTO TABLE lt_context_node FROM vseoextend WHERE refclsname =
'CL_BSP_WD_CONTEXT_NODE'.
lv_total = lines( lt_context_node ).
LOOP AT lt_context_node ASSIGNING FIELD-SYMBOL(<node>).
TRY.
CREATE OBJECT lo_cls TYPE (<node>).
ASSIGN lo_cls->('BASE_ENTITY_NAME') TO FIELD-SYMBOL(<name>).
APPEND INITIAL LINE TO lt_result ASSIGNING FIELD-SYMBOL(<result>).
<result> = VALUE #( context_node_cls = <node> bol_node_name = <name> ).
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
percentage = ( sy-tabix * 100 ) / lv_total
text = | index: { sy-tabix }: { <node> } |.
"WRITE: / 'context node class: ', <node>, ' bol node:', <name>.
CATCH cx_root INTO DATA(cx_root).
WRITE: / cx_root->get_text( ), ' class: ' , <node>.
CONTINUE.
ENDTRY.
ENDLOOP.
INSERT zwebuicontextnam FROM TABLE lt_result.
Use this report, first I get a list of all UI component context node class from table vseoextend based on the assumption that a class could be considered as context node class as long as it inherits from super class CL_BSP_WD_CONTEXT_NODE.
The name of bound Genil model name is stored in attribute BASE_ENTITY_NAME of context node class.
So I finally store context node class name and bound Genil model node name to an Z table:
Now I run report and can simply query the Z table via BOL_NODE_NAME = Product:
And get to know that in my system there are totally 673 context node which are bound to Product Genil model node.
Since my colleague needs the UI component name, so I wrote another report to extract the UI component name based on context node class name:
REPORT zui_get_app_name_by_context.
DATA: lt_context_node TYPE TABLE OF zwebuicontextnam,
lt_app TYPE TABLE OF o2pagpar,
lt_ui TYPE TABLE OF o2pagpar-applname.
SELECT * INTO TABLE lt_context_node FROM zwebuicontextnam WHERE bol_node_name = 'Product'.
CHECK sy-subrc = 0.
SELECT * INTO TABLE lt_app FROM o2pagpar FOR ALL ENTRIES IN lt_context_node WHERE type = lt_context_node-context_node_cls.
SORT lt_app BY applname ASCENDING.
SELECT applname INTO TABLE lt_ui FROM o2pagpar FOR ALL ENTRIES IN lt_context_node WHERE type = lt_context_node-context_node_cls.
SORT lt_ui.
DELETE ADJACENT DUPLICATES FROM lt_ui.
Now the internal table lt_app contains the concrete information of UI component name and view name which the context node is in.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关文章
- SAP UI5 sap.ui.core.Element 的概要介绍
- SAP UI5 sap.ui.layout.Grid 控件宽度百分比的设置原理
- SAP 电商云 Assisted Service Module (ASM) 功能模块讲解
- 关于 SAP 电商云 Spartacus UI 里 Router 模块的 forRoot 方法
- SAP UI5 sap.ui.base.ManagedObject 的构造函数参数讲解
- 关于 SAP 电商云 Spartacus UI Navigation Service 执行的一些明细
- SAP 电商云 Spartacus UI Angular UI 和 Accelerator JSP UI 的混合使用
- 使用 SAP UI5 sap.ui.export.Spreadsheet API 进行 Excel 导出的一些限制
- SAP WebIDE的本地安装方式「建议收藏」
- SAP 电商云 Spartacus UI UrlMatcherService 的用法介绍
- UI自动化平台_ui自动化是什么意思
- 什么是 SAP 云平台的 multi-cloud architecture
- 澄清一些对 SAP UI5 响应式表格 sap.m.Table 的常见理解误区试读版
- SAP ABAP 中,if_http_extension 接口的flow_rc 字段含义
- Oracle购买SAP: 开启新数据时代(oracle收购sap)
- SAP 已经Release(释放)的传输请求(TR)重新传输-SE03详解编程语言
- 系统SAP在Linux系统上的开启之旅(sap启动linux)
- 比较:Oracle与SAP的对比(oracle和sap)
- 深度比较:SAP vs Oracle(sap与oracle比较)
- SAP HANA连接Oracle系统的指南(hana连接oracle)
- Oracle从SAP抽取数据的简单方法(oracle从sap抽数)
- 缓存使用SAP创建Redis缓存,实现高效稳定加速(sap如何创建redis)
- Oracle与SAP权衡利弊比较之路(oracle与sap比较)
- 比拼Oracle与SAP的优劣对比(oracle与sap优劣)
- 对比Oracle和SAP价格比较哪个是更值得投入的选择(oracle与sap价格)
- Oracle与SAP金蝶谁更具竞争力(oracle sap金蝶)
- Oracle SAP系统深入探索管理系统之魅力(oracle sap系统)