自己實現一個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的原創文章,請關注公眾號"汪子熙":
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2716714/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 增強版本的自開發SAP WebClient UI Repository Information SystemWebclientUIORM
- 通過實際的例子,介紹 SAP ABAP 裡的 Repository Information System 的使用技巧ORM
- SAP WebClient UI One Hit Navigation的實現方法WebclientUINavigation
- 如何使用SAP CRM WebClient UI實現一個類似新浪微博的字數統計器WebclientUI
- SAP CRM WebClient UI cross component跳轉的一個具體例子WebclientUIROS
- 引起SAP WebClient UI頁面出現超時(time out)錯誤的另一個原因WebclientUI
- 使用note++開發SAP WebClient UIWebclientUI
- SAP WebClient UI的白屏問題分析WebclientUI
- 如何在SAP WebClient UI裡使用jChartFXWebclientUI
- SAP WebClient UI drop down list(下拉選單)的一個故障和解決方法WebclientUI
- SAP CRM WebClient UI和Fiori UI混搭並存WebclientUI
- SAP CRM WebClient UI 支援的一些 url 引數WebclientUI
- 如何實現一個 System Services?
- SAP WebClient UI的會話重啟原理WebclientUI會話
- SAP CRM WebClient UI和Hybris backoffice UI開發的相同點WebclientUI
- 在SAP WebClient UI裡顯示倒數計時的UIWebclientUI
- 如何在SAP WebClient UI裡使用HANA Live reportWebclientUI
- 如何把SAP CRM WebClient UI上某個欄位高亮加粗顯示WebclientUI
- System Volume Information是什麼檔案 System Volume Information可以刪除嗎ORM
- 在SAP CRM WebClient UI中用javascript觸發ABAP eventWebclientUIJavaScript
- 使用Selenium自動化測試SAP CRM WebClient UIWebclientUI
- SAP CRM WebClient UI異常的持久化機制WebclientUI持久化
- 將SAP CRM WebClient UI的表格匯出成PDFWebclientUI
- 如何將SAP WebClient UI的表格匯出成PDFWebclientUI
- SAP WebClient UI component模型後設資料解析工具WebclientUI模型
- 迫於 l5-repository 太難用,我自己寫了一個 laravel-repositoryLaravel
- SAP UI5 System Test 的工具之一:uiveri5UI
- 實現一個自己的mvvmMVVM
- SAP WebClient UI配置決定(configuration)的邏輯介紹WebclientUI
- 使用SAP Transaction Launcher將ABAP Webdynpro嵌入到WebClient UI中WebclientUI
- SAP CRM WebClient UI的Delta處理機制介紹WebclientUI
- 在SAP CRM WebClient UI裡開啟ABAP Webdynpro頁面WebclientUI
- SAP WebClient UI component context node class單元測試方法WebclientUIContext
- SAP CRM WebClient UI和ABAP Webdynpro頁面的互相跳轉WebclientUI
- 如何在SAP WebClient UI裡建立柱狀圖(bar chart)WebclientUI
- SAP CRM WebClient UI html 格式的 Text 顯示邏輯WebclientUIHTML
- 自己實現一個window.location
- 自己實現一個java的arraylistJava