SAP WebClient UI drop down list(下拉選單)的一個故障和解決方法
Issue description
Today I received a ticket with priority very high complaining that the drop down list for Business Role in Work center “Sales Operation” is empty:
However, Using my user I could indeed see lots of drop down list entries there:
Issue analysis
I didn’t start debugging immediately but made the following analysis beforehand:
(1) I could reproduce this issue in my laptop with my colleagues’ user
Based on this finding I made the following comparison between my colleague’s user and mine: a. compare the authorization settings: result: The two are exactly the same ( both copied from the same user group and we didn’t have authorization to make changes ). Also there is no corresponding entries found in SU53 when I test with my colleague’s user. b. compare the user parameter in tcode SU3 result: no difference found related to this issue c. compare the business switch setting result: the same setting for both user
(2) compare the final native html source code
I do believe there must be differences when the page is rendered via different users. So I use the development tool ( click F12 ) in IE, and soon found the difference:
This one is the html source code generated by my user and it works perfectly:
And this below is the one generated by my colleague’s user. The title are completely missing!
(3) Use mini-system approach to isolate and locate root cause
Since this issue occurs in CRM Organizational Model management and the underlying business model is huge and complex. In this situation I always prefer to use mini-system approach I described in this blog to try to make the issue also reproducible in the small nutshell. At least I could have the following benefits from the nut shell:
a. the nut shell could eliminate all impacts from unrelated components so that I could concentrate on the key part of program which might lead to the issue b. the nut shell makes debugging be more efficient. For example sometimes I have to debug how does webclient framework class reacts to my input for my UI component, the method is so generic so that it would be triggered too frequently( like method PROCESS_NAV_QUEUE of class CL_BSP_WD_VIEW_MANAGER, which have helped me to resolve many issues
). Using nutshell I do not need to press “deactivate all BPs again and again.
I just spent 5 minutes to build a nutshell, which contains a view, a value node and one attribute. The attribute contains GET_V and GET_P method whose source code are copied from standard Org management UI component.
The nutshell in the runtime looks like below. The issue could be reproduced within it by using my colleague’s user.
(4) Debug the nutshell
When I debug the GET_V, I soon found the root cause: The following code plan to retrieve profile and description from table crmc_ui_prof_t:
profile will act as drop down list key and description as drop down list value:
Unfortunately between profile and description column in table crmc_ui_prof_t there is another column LANGUAGE:
As a result the select statement does not work as expected at all. The SELECT xxx INTO CORRESPONDING FIELDS OF TABLE must be used instead.
(5) why I could see entries with my own user?
First of all, the entries displayed with my own user are not correct at all, they are just the wrong entries populated in internal table LT_ROLES, column PROFILE in screenshot above. In the wrong implementation, only drop down list key is filled with the incorrect entries.
For my user, I have enabled that key will also be displayed in dropdown list, so I could see the incorrect keys in UI. However my colleague didn’t enable this so he could only see nothing there, since the drop down list value is not filled due to wrong implementation.
(6) Why the native HTML source code is different based on different personalization setting?
Why my user could see the not initial title attribute in native html source code but my colleague’s user could not?
It is related to your personalization settings regarding whether dropdown list key must be displayed or not.
Just set a breakpoint on method CL_THTMLB_PERSONALIZATION~GET_DDLB_KEY_MODE, start the nutshell.
It stops at the place where the drop down list UI element is to be rendered. The callstack is also very helpful if we would like to study how the UI element defined by SAP tag like chtmlb, thtmlb is finally converted to html source code.
This setting is evaluated here and populating drop down list entries accordingly:
All the entries to be displayed in drop down list is available in the current callstack:
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2719604/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SAP Fiori Elements裡Drop down list的實現原理
- SAP WebClient UI component context node class單元測試方法WebclientUIContext
- SAP WebClient UI One Hit Navigation的實現方法WebclientUINavigation
- 自己實現一個SAP WebClient UI Repository Information SystemWebclientUIORM
- SAP CRM WebClient UI cross component跳轉的一個具體例子WebclientUIROS
- SAP WebClient UI配置決定(configuration)的邏輯介紹WebclientUI
- SAP WebClient UI的白屏問題分析WebclientUI
- SAP UI5 下拉選單(Select) 控制元件的使用方式試讀版UI控制元件
- SAP CRM WebClient UI 支援的一些 url 引數WebclientUI
- SAP WebClient UI的會話重啟原理WebclientUI會話
- SAP WebClient UI頁面標籤的決定邏輯介紹WebclientUI
- android中The connection to adb is down,問題和解決Android
- 使用note++開發SAP WebClient UIWebclientUI
- 如何在SAP WebClient UI裡使用jChartFXWebclientUI
- SAP CRM WebClient UI和Hybris backoffice UI開發的相同點WebclientUI
- 在SAP WebClient UI裡顯示倒數計時的UIWebclientUI
- SAP CRM WebClient UI和Fiori UI混搭並存WebclientUI
- 引起SAP WebClient UI頁面出現超時(time out)錯誤的另一個原因WebclientUI
- SAP CRM WebClient UI異常的持久化機制WebclientUI持久化
- 將SAP CRM WebClient UI的表格匯出成PDFWebclientUI
- 如何將SAP WebClient UI的表格匯出成PDFWebclientUI
- 三種動態控制SAP CRM WebClient UI assignment block顯示與否的方法WebclientUIBloC
- SAP UI5 sap.ui.Device.media.initRangeSet 方法的單步除錯UIdev除錯
- 三種方法解決純css下拉選單滑鼠移入選單內容時選單隱藏消失的問題CSS
- 如何在SAP WebClient UI裡使用HANA Live reportWebclientUI
- SAP CRM WebClient UI的Delta處理機制介紹WebclientUI
- SAP CRM WebClient UI html 格式的 Text 顯示邏輯WebclientUIHTML
- SAP CRM WebClient UI和Hybris的controller是如何被呼叫的WebclientUIController
- 如何把SAP CRM WebClient UI上某個欄位高亮加粗顯示WebclientUI
- antd design Menu選單下拉回撥以及下拉選單時只能顯示一個列表,其餘關閉
- 如何使用SAP CRM WebClient UI實現一個類似新浪微博的字數統計器WebclientUI
- vue下拉選單Vue
- SAP CRM WebClient UI的on_new_focus應該怎麼理解WebclientUI
- SAP CRM WebClient UI表格編輯模式的除錯明細WebclientUI模式除錯
- SAP CRM WebClient UI和Hybris Commerce的懶載入機制WebclientUI
- SAP WebClient UI和business switch相關的邏輯介紹WebclientUI
- 增強版本的自開發SAP WebClient UI Repository Information SystemWebclientUIORM
- SAP CRM WebClient UI Text Type 顯示的過濾邏輯WebclientUI