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的原创文章,请关注公众号"汪子熙":

如何自行分析SAP WebClient UI开发环境里抛出的错误消息根源相关推荐

  1. SAP WebClient UI开发工具中attribute文件夹展开的实现原理分析

    For project reason I need to figure out the logic how the field list is assembled when folder " ...

  2. SAP WebClient UI overview页面里assignment block的可见性分析技巧

    issue some assignment block is visible in design time ( the assignment block already appears in &quo ...

  3. SAP CRM webclient ui开发workbench里点了Test按钮,发生了什么事

  4. 如何调试SAP CRM产品主数据应用后台ABAP端抛出的错误消息

    Created by Wang, Jerry, last modified on Dec 19, 2014 核心函数:COM_PRODUCT_ADD_MESSAGE 要获取更多Jerry的原创文章,请 ...

  5. 谈谈 SAP 产品 UI 开发中的组件概念

    这是 Jerry 2021 年的第 54 篇文章,也是汪子熙公众号总共第 331 篇原创文章. 任何企业级软件的前端开发,都离不开组件(Component)这个概念.撇开具体的 UI 开发技术不谈,所 ...

  6. 在 V2EX 的开发环境里尝试了一下 OneAPM @livid

    作为一名python开发的小coder,偶然试用了OneAPM的产品,个人觉得还不错,比New Relic的性价比高! 在v2ex上竟然看到ceo livid也在试用 http://www.v2ex. ...

  7. SAP WebClient UI和business switch相关的逻辑介绍

    Do you know the meaning of these two checkboxes in F2 popup? Let's first learn some prerequisite kno ...

  8. 在SAP WebClient UI里使用AJAX进行异步数据读取

    For POC purpose I need to implement the AJAX functionality in Webclient UI component. The UI compone ...

  9. Kendo UI开发教程 2 准备Kendo UI开发环境

    分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow 也欢迎大家转载本篇文章.分享知识,造福人民,实现我们中华民族伟大复兴! 首先你需 ...

最新文章

  1. 【Spark】Spark基础练习题(一)
  2. 高颜值免费在线SCI绘图工具增加上传功能
  3. Linux疑难杂症解决方案100篇(七)-SHELL编程变量与四则运算
  4. 【2012百度之星/初赛上】C:集合的交与并
  5. latex中插图心得
  6. WCF服务重构实录(中)
  7. Ubuntu之安装摄像头软件GTK_UVC_Viewer
  8. linux文件系统之mount流程分析
  9. 通过MD5校验游戏安装文件完整性实例演示,MD5校验工具Hash使用演示
  10. Chinalinuxpub.com初学版精华
  11. 机器学习教程 - 分步指南
  12. KRC跨境商城系 拍卖系统 竞拍系统 商城系统 虚拟支付源码
  13. 网页设计-动态雪花背景源码
  14. vue单向数据绑定和双向数据绑定
  15. word目录中页码没有向右对齐的解决方法
  16. EXCEL 2010如何分屏/多窗口显示多文件
  17. rhel6 中安装使用finger命令
  18. Win10注册表无法保存对权限所作的更改拒绝访问
  19. 【1034】计算三角形面积
  20. Windows同一局域网如何文件共享

热门文章

  1. Memcache查看运行状况
  2. 五、性能监视(2)Windows性能日志
  3. ios 中是否每一个对象(尤其是在使用多线程时),都要判断一下对象是否为nil,以防止程序闪退?...
  4. Android\OPhone动画分析之翻转效果
  5. JAVA设计模式总结之23种设计模式
  6. JavaScript Object.defineProperty()方法详解
  7. maven中添加servlet、jsp依赖
  8. [acm]HDOJ 1200 To and Fro
  9. jQuery Ajax 实例 全解析
  10. 点击图片弹出固定或自适应窗口