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:
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?
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.
Set a breakpoint on the top most callstack, h function. Check the content of e.target.data:
This is actually the batch request payload which could be observed in Chrome network tab:
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:
in line 1957, this.bRefreshAfterChange = true.
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.
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:
Breakpoint is triggered:
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
If I read this thread several months earlier, I would save my hours’ debugging today.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关文章
- 把 ALV 转换成 PDF 格式并发送到 SAP Inbox(此段代码未经笔者验证)
- SAP UI5 sap.ui.export.Spreadsheet API 介绍
- SAP UI5 Gateway Export 和 Client Export 的比较
- SAP UI5 sap.ui.Device.media 的使用介绍
- SAP UI5 sap.ui.Device.media 公有方法介绍
- 关于 SAP AMDP 调用错误消息 client-specific and restricts access to a client
- 使用 SAP UI5 OData API 读取单条 order 数据的办法
- 如何给 SAP ABAP ALV 报表的修改功能添加自定义校验逻辑试读版
- 关于 SAP UI5 接口 sap.ui.core.IAsyncContentCreation 的问题讨论
- 什么是 sap.ushell.Container
- SAP Fiori Launchpad url 参数 sap-app-origin-hint 的含义
- 深入比较:SAP vs Oracle(sap和oracle)
- SAP横向纵向打印详解编程语言
- SAP MM分割评估详解编程语言
- SAP 《MM学习指南》操作记录—- 计划协议及交货计划详解编程语言
- sap abap 对字符串的操作详解编程语言
- SAP vs Oracle:差异点与解析(sap和oracle的区别)
- Oracle从SAP抽取数据的简单方法(oracle从sap抽数)
- Oracle与SAP权衡利弊比较之路(oracle与sap比较)
- Oracle和SAP技术比较优势和劣势(oracle与sap比照)
- 展望未来Oracle与SAP的合作结盟前景(oracle、sap)
- 聘请高级Oracle与SAP顾问,拓展业务潜力(oracle sap顾问)
- 探索 Oracle 与 SAP 技术的开发可能性(oracle sap开发)