`
JerryWang_SAP
  • 浏览: 1044102 次
  • 性别: Icon_minigender_1
  • 来自: 成都
文章分类
社区版块
存档分类
最新评论

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

0
2
分享到:
评论

相关推荐

    CRM7.0 WebClient UI config

    在SAP CRM 7.0版本中,WebClient UI配置是一项关键任务,它涉及到了用户界面的定制和优化,以提升用户体验和业务效率。WebClient UI是SAP CRM的一个核心组件,提供了一个基于Web的交互界面,使得用户能够访问和操作...

    WebClientDemo_webclient_

    【WebClientDemo_webclient_】项目是一个C#编程示例,展示了如何使用`WebClient`类来实现文件的下载功能。在.NET Framework中,`WebClient`是System.Net命名空间下的一个类,它提供了一种简便的方法来上传和下载数据...

    WebClient下载文件展示进度条

    请注意,实际应用中可能需要处理错误和异常,以及考虑线程同步问题,确保UI线程安全地更新进度条。此外,如果要实现更复杂的功能,比如暂停和恢复下载,可能需要使用更高级的类如System.Net.Http.HttpClient,配合...

    C# WebClient 上传文件

    ### C# WebClient 上传文件知识点解析 #### 一、引言 在开发过程中,经常会遇到需要将客户端的文件上传到服务器的需求。C#语言提供了多种方法来实现这一功能,其中`WebClient`类就是一种非常简便的方式。本文将详细...

    Creating a Dropdown in SAP CRM WebUI.docx

    通过这个过程,你不仅学会了如何在SAP CRM WebUI中创建下拉列表,还了解了值帮助方法和接口在SAP UI开发中的重要性。这是提高用户界面功能性和用户体验的关键步骤,对于任何WebUI开发者来说都是必备技能。

    SAPCRM基础培训教材.doc

    首先,让我们来看看SAP CRM WebClient UI的发展历程。从最初的GUI界面,到PCUI,再到IC WebClient,最终发展到目前最新的WebClient UI,这一过程中,用户界面不断优化,以适应不同设备和用户的使用需求。在CRM 7.0...

    WebClient访问间歇性返回403解决方案.docx

    分析错误信息,我们可以发现,403 错误是由于权限设置问题所引起的。因此,我们可以通过添加授权证书来解决这个问题。代码如下: ```csharp webclient.Credentials = CredentialCache.DefaultCredentials; ``` ...

    SAP CRM WebClient UI cross component跳转的一个具体例子

    Sent: Thursday, April 18, 2013 3:59 PM Subject: 为什么design time时候看到的是ICQR,点了service之后看到02QR的代码被call到 这是cross component navigation在起作用。 Result list是model在ICQR里面,如果点...

    WebClient-2.2.5.exe

    WebClient安装文件。 在Java世界中,有许多用于发送HTTP请求的库。比较三种流行的HTTP客户端:WebClient,HttpClient和OkHttp。WebClient是Spring 5中引入的非阻塞,反应式的Web客户端。它是在Project Reactor和...

    UI Guidelines for CRM WebClient User Interface

    UI Guidelines for CRM WebClient User Interface

    SAPCRM基础培训.doc

    在SAP CRM基础培训中,WebClient UI(Web客户端用户界面)是一个重要的学习焦点,它是用户与系统交互的主要界面。下面我们将深入探讨WebClient UI的相关知识点。 WebClient UI的发展历程是从GUI(图形用户界面)...

    C#中WebClient实现文件下载

    在C#编程中,WebClient类提供了一种简单的方式来实现文件下载。WebClient是一个高度封装的网络通信类,主要用于HTTP协议交互,包括上传和下载数据。以下是对标题和描述中涉及知识点的详细解释: 1. **WebClient下载...

    WebClient jar包

    WebClient jar包

    C#通过webclient下载demo

    - **错误处理**:`WebClient`的下载方法可能会抛出异常,如`WebException`,因此在实际应用中,应添加适当的异常处理代码。 - **取消下载**:可以通过调用`WebClient`的`CancelAsync()`方法取消正在进行的下载任务...

    SAP_CRM中文自学笔记

    SAP CRM的基础知识通常包括对于其核心组件的理解,包括主数据(如账户、组织模型、产品等),交易处理、定价、开票、CRM中间件以及CRM WebClient UI。CRM中间件主要负责不同系统组件之间的信息交换,而CRM WebClient...

    WebClientDemo

    【WebClientDemo】是一个示例项目,展示了如何在Eclipse集成开发环境中使用`WebClient`进行网络通信。`WebClient`是Java中的一个类,主要用在Spring Framework的WebFlux模块,它允许开发者发送HTTP请求并处理响应,...

    SAP CRM WebClient UI ON_NEW_FOCUS的用途

    Sent: Thursday, May 9, 2013 6:30 PM Subject: ON_NEW_FOCUS的用途 ROOT ———————————— Product ID PRODshortText ———————————— Product Description Genil Model hierarchy

    WebClient 的Post实现

    Silverlight是一种由微软开发的富互联网应用程序(RIA)平台,它允许开发者创建交互式、多媒体丰富的Web应用。 首先,让我们深入理解WebClient类。WebClient是System.Net命名空间下的一个类,它简化了HTTP请求的...

    webclient 控件

    在.NET Framework中,WebClient控件是一个非常实用的类,用于简化从Web下载数据的任务,尤其是在WinForm应用程序中。标题中的"webclient 控件"指的是这个内置的.NET类,它为开发者提供了简单的方法来执行HTTP操作,...

    webclient程序源码

    在IT领域,Web客户端(Webclient)通常是指用于与Web服务器进行交互的软件或应用程序。在本案例中,我们讨论的"webclient程序源码"是用C语言编写的,...理解和分析这样的源码有助于深入学习网络编程和C语言应用开发。

Global site tag (gtag.js) - Google Analytics