SAP UI5里Batch操作和Read操作的区别

简介: I would like to share with you my story today about fighting with one customer incident.We can make changes on Appointment and click save button:

I would like to share with you my story today about fighting with one customer incident.

We can make changes on Appointment and click save button:

image.png



There is a batch operation observed in Chrome network tab to update appointment as expected. However, why every time there are three subsequent appointment read roundtrips?


image.png


The callstack clearly shows that the three roundtrips are NOT issued by customer extension, or else the customer js file could be observed in the callstack.


image.png


Set a breakpoint on the top most callstack, h function. Check the content of e.target.data:


image.png


This is actually the batch request payload which could be observed in Chrome network tab:


image.png


This finding gives me more confidence that these roundtrips are issued by framework, not standard or customer application code.

So I just continue debugging until I reach this suspicious stack:


image.png


in line 1957, this.bRefreshAfterChange = true.

image.png



However, in our internal system ( where everything works fine, there is no duplicate read operations ), this.bRefreshAfterChange = false, which has suppressed the refresh operation. This is the reason why the read operation could not be found in my internal system, since they are not executed at all. But in customer system, _isRefreshNeeded returns true, which leads to the execution of all subsequent read operations.


image.png


So why is this difference between two systems? In Chrome development tool, search the boolean variable name and we found one function setRefreshAfterChange defined for ODataModel. Just set a breakpoint in this method and re-launch the application in my internal system from beginning:


image.png


Breakpoint is triggered:


image.png


However, this line in customer system is missing, which is the root cause – our latest standard code didn’t reach customer system.

After I found the root cause, I search in SCN to check whether there are other poor guy which had encountered the same issue with me, and actually I found one:http://scn.sap.com/thread/3724174


image.png


If I read this thread several months earlier, I would save my hours’ debugging today.

image.png


相关文章
|
1月前
|
前端开发 搜索推荐 开发者
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
27 0
|
1月前
|
JavaScript 前端开发 开发者
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
15 0
|
1月前
|
Web App开发 数据采集 前端开发
纯技术讨论:如何让 SAP UI5 应用无法被别人在浏览器里调试 - 这种做法不推荐试读版
纯技术讨论:如何让 SAP UI5 应用无法被别人在浏览器里调试 - 这种做法不推荐试读版
15 0
|
1月前
|
XML 存储 数据格式
SAP UI5 控件 customData 属性的应用介绍
SAP UI5 控件 customData 属性的应用介绍
33 0
|
1月前
|
前端开发 JavaScript API
SAP UI5 sap.ui.require.toUrl 的作用介绍
SAP UI5 sap.ui.require.toUrl 的作用介绍
28 0
|
1月前
|
搜索推荐
如何让 SAP UI5 Smart Table 支持多项选择(Multiple-Selection)试读版
如何让 SAP UI5 Smart Table 支持多项选择(Multiple-Selection)试读版
18 0
|
1月前
使用 SAP UI5 Event Bus 机制,修复 SAP UI5 分页显示数据的一个 bug 试读版
使用 SAP UI5 Event Bus 机制,修复 SAP UI5 分页显示数据的一个 bug 试读版
20 0
|
1月前
|
开发者 UED
SAP UI5 SmartFilterBar 中 ControlConfiguration Aggregation 的作用介绍
SAP UI5 SmartFilterBar 中 ControlConfiguration Aggregation 的作用介绍
14 0
|
1月前
|
开发者 UED
关于 SAP UI5 sap.m.Column 的 demandPopin 属性
关于 SAP UI5 sap.m.Column 的 demandPopin 属性
15 0
|
1月前
SAP UI5 Link 控件的使用方法介绍 - 后续学习 Fiori Elements Smart Link 的基础试读版
SAP UI5 Link 控件的使用方法介绍 - 后续学习 Fiori Elements Smart Link 的基础试读版
15 0

热门文章

最新文章