如何自行分析SAP WebClient UI開發環境裡丟擲的錯誤訊息根源
In this blog I will demonstrate how I resolve the error message “endless binding loop” raised by UI workbench. I would not emphasize the issue itself, but would rather share with you how I would deal with such error messages raised by UI workbench in my daily life.
The issue is we have the context node PARAMS defined in component controller, which is bound to node with same name defined in view LogView02.
However, the node in view LogView02 is again set to be bound to the node in component controller by mistake, leading to an endless binding loop ( A is bound to B and B is also bound to A ). So the error message is raised by workbench. I planned to use the context menu item “Delete binding” to delete the binding from component controller node to view controller node, but there is no such context menu item available on the erroneous context node.
So I go through the following trouble shooting process:
(1) find where the error message is raised by workbench
This is quite easy, just click on the red icon of the error message, and we get required information on the technical help: message class id BSP_WD_TOOLS, message number 082.
Go to tcode SE91, use where used list on that message, only one hit in below method.
(2) figure out why the error message is raised
Set a breakpoint on the method found in step 1, go to UI component workbench and double click on component controller again, breakpoint is triggered. Now we get to know the error is caused by the failed internal table insertion done in line 12.
The insertion failed because a duplicate record is tried to be inserted to the internal table while the record with the same key( cnode_name and cnode_class ) already existed there. This duplicate record just represents the wrong data binding from component controller context node to view controller context node, which is what we expect to delete.
(3) figure out why the duplicate record is created
It is expected that the duplicate record in step 2 should never be created, so it is necessary to find out where it is being created. We have to go to the outer callstack of the record insertion, that is callstack layer 22. Now we know the generation of the duplicate record is caused by the evaluation of variable lv_target_controller_class in line 83.
(4) figure out why the binding target controller class is not initial
from the method get_cnode_type in step3, we know the lv_target_controller_class is filled by CL_BSP_WD_APPL_MODEL~GET_CNODE_TYPE. We are now quite near to the issue root cause: if we find out how the UI workbench determines the binding relationship, we should then know how such relationship is maintained or determined. Based on the finding we will finally know how to delete the wrong relationship.
Set a breakpoint on the method and restart the workbench again and navigate to component controller:
Now workbench is loading the source code of method CREATE_PARAMS of component controller context node PARAMS’s implementation class and stored it into internal table LT_SOURCE.
Have you noticed the hard coded string ‘DO_CONTEXT_NODE_BINDING’ in line 46?
(5) figure out where and how binding relationship is maintained by UI workbench
Final finding: every time we define a context node binding, UI workbench will automatically generate the following code ( starting with owner->do_context_node_binding )in method CREATE_. When UI workbench is displaying the context node, it will locate that hard coded string and get the necessary information by parsing the source code ( via ABAP keyword SCAN ABAP-SOURCE ).
after we delete the automatically generated code for wrong binding on context node ( line 16 ~ 23 ) in method CREATE_PARAMS, the endless binding loop is resolved.
Summary
my favorite way to deal with message raised by UI workbench: find out where the message is raised -> find out why the message is raised -> find out the wrong setting / development object which leads to the message -> correct the mistake.
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2717308/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SAP CRM WebClient UI,如何快速定位到丟擲錯誤訊息的那一行程式碼WebclientUI行程
- 如何根據 SAP UI5 框架程式碼丟擲的錯誤訊息,反查出是哪一行程式碼引起的錯誤訊息試讀版UI框架行程
- 如何在SAP WebClient UI裡使用jChartFXWebclientUI
- 使用note++開發SAP WebClient UIWebclientUI
- 如何在SAP WebClient UI裡使用HANA Live reportWebclientUI
- SAP WebClient UI的白屏問題分析WebclientUI
- 如何在SAP WebClient UI裡建立柱狀圖(bar chart)WebclientUI
- Promise基礎(消化錯誤和丟擲錯誤)Promise
- 部署 SAP UI5 應用到 SAP BTP 時遇到的 fiori not found 錯誤訊息UI
- 在SAP CRM WebClient UI裡開啟ABAP Webdynpro頁面WebclientUI
- 在SAP WebClient UI裡顯示倒數計時的UIWebclientUI
- 如何修復 SAP UI5 aggregation with cardinality 0..1 相關的錯誤訊息UI
- 如何分析SAP UI5應用的undefined is not a function錯誤UIUndefinedFunction
- SAP WebClient UI overview頁面裡assignment block的可見性分析技巧WebclientUIViewBloC
- 部署 SAP UI5 應用到 SAP BTP 時遇到的 error retrieving MTA 錯誤訊息UIError
- SAP CRM WebClient UI和Hybris backoffice UI開發的相同點WebclientUI
- SAP錯誤訊息除錯之七種武器:讓所有的錯誤訊息都能被定位除錯
- 如何在 WebClient UI 裡建立 Value HelpWebclientUI
- 使用SAP WebIDE消費API Portal裡建立的API時的錯誤訊息WebIDEAPI
- SAP雲平臺CloudFoundry環境裡route 超過quota的錯誤處理Cloud
- CRM中介軟體裡parent not ok的錯誤訊息如何處理
- 增強版本的自開發SAP WebClient UI Repository Information SystemWebclientUIORM
- 如何將SAP WebClient UI的表格匯出成PDFWebclientUI
- SAP BTP Kyma Runtime dashboard 開啟報缺少缺陷的錯誤訊息該如何解決
- SAP CRM WebClient UI表格編輯模式的除錯明細WebclientUI模式除錯
- 引起SAP WebClient UI頁面出現超時(time out)錯誤的另一個原因WebclientUI
- 關於 SAP UI5 getSAPLogonLanguage is not a function 的錯誤訊息以及 API 版本的討論UIGoFunctionAPI
- 搭建Easy UI開發環境UI開發環境
- 深入探討 SAP UI5 本地開發環境裡的 package.json 和 ui5.yaml 試讀版UI開發環境PackageJSONYAML
- 如何處理SAP雲平臺錯誤訊息 there is no compute unit quota for subaccount
- qt使用mysql,開啟資料庫,丟擲無法連線錯誤。QTMySql資料庫
- Kafka如何保證訊息不丟之無訊息丟失配置Kafka
- 在SAP CRM WebClient UI中用javascript觸發ABAP eventWebclientUIJavaScript
- SAP WebClient UI的會話重啟原理WebclientUI會話
- 【APIM】Azure APIM丟擲 java.lang.RuntimeException 錯誤定位APIJavaException
- 如何在CRM WebClient UI裡使用HANA Live ReportWebclientUI
- 《從零開始學Swift》學習筆記(Day54)——丟擲錯誤Swift筆記
- SAP CRM WebClient UI上將text area裡的文字清空的後臺處理WebclientUI