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

如何自行分析定位SAP BSP错误

阅读更多

The “BSP tag” I mentioned in the blog title means for example the tag chtmlb:configCellerator below which is pre-delivered by SAP and you could include it in your UI component view to draw various UI element.

 

 

In this blog I will share with you a real issue I meet with when I am using configCellerator and how I find the root cause. So sometimes if you find the behavior of BSP tag is not working as you expected, if time allowed, you can spend sometime to investigate by yourself. Such investigation will make you understand how native html is rendered based on those BSP tag more thoroughly.

Issue1 – Missing table toolbar

Although the entry for table toolbar is found in debugger,

 

 

However in the UI the table toolbar is missing.

 

 

I guess the issue might be related to attribute “editMode” set in line 12. I try to find documentation on this attribute in SE80 but unfortunately there is not.

 

 

Then double click on line 6 ( the first screenshot in this blog) “configCellerator”, in the new screen click tab “Attribute”, now I get to know the possible value for editMode is NONE, SINGLE and ALL. However still I don’t know the clear meaning of these three values.

 

 

So below is how I investigate on the usage of attribute “editMode”:

(1) Do observation on the callstack of UI rendering and I find framework is using CL_THTMLB_CELLERATOR to render the table defined via configCellerator.

 

 

(2) run report RS_ABAP_SOURCE_SCAN, search key word EDITMODE against class CL_THTMLB_CELLERATOR found in step 1. Navigate to the source code of the third hit:

 

 

it means if the editmode is set as NONE, the member attribute NOHEADER of class CL_THTMLB_CELLERATOR is set as TRUE.

 

 

(2.1) rerun report RS_ABAP_SOURCE_SCAN but this time search keyword NOHEADER instead ( or you can also use where used list on member attribute NOHEADER in SE24 ). The hit shows that the string “TRUE”( or “FALSE”) stored in member attribute NOHEADER is converted to abap boolean and stored in variable gv_no_header.

 

 

2.2 repeat the step 2 and 2.1, search keyword gv_no_header. The third hit demonstrates the table toolbar could only be rendered if gv_no_header is abap_false ( and other condition between line 10 and 14 are fulfilled ). The html source is the final native html code rendered by UI framework.

 

 

After I remove the editMode attribute and I could see the expected table toolbar.

 

 

I view the source code of my table view and I could find the hard coded html code in the line 17 of screenshot above. And the html code for toolbar title is just very next to it. So this issue is just resolved without debugging, but just pure source code analysis in the design time.

 

 

Issue2 – Do not expect the table cell editable

In my project I need to switch the BOL entity to change mode, however I do not want to make each table cell be editable, instead user will edit the locked object in another UI and see result after edit in the table view. In the table view I expect each cell is read only.

 

 

My BOL model has 40 attributes and I would not like to code “rv_disabled = TRUE” 40 times in each GET_I_ method.

I plan to investigate the attribute usage = “ASSIGNMENTBLOCK”

Here below is my analysis process:

(1) run report RS_ABAP_SOURCE_SCAN, search keyword ASSIGNMENTBLOCK, class CL_THTMLB_CELLERATOR – no result

(2) double click tag configCellerator, then find the element handler class name:

 

 

then run report again and change the search class to CL_CHTMLB_CONFIG_CELLERATOR. only one result which points to the commented out code. Just ignore it.

 

 

(3) find all possible value for usage attribute here, and run report again with search keyword = “SEARCHRESULT”: Only one result hit:

 

 

and the code indicates that the usage attribute “SEARCHRESULT” will set the whole table to read only mode.

 

 

After I change the attribute and test the table cells are rendered as read only as I expect.

Summary

In some case it might be possible that you can not get quite promising result by the first RS_ABAP_SOURCE_SCAN execution.

The tip is how to specify search keyword and search class ( or package, report etc ) cleverly so that the search result are relevant and helpful for your further investigation. Usually it would take several iterations before you reach your target, as are shown in my two examples in this blog.

My common experience to specify search selection for report RS_ABAP_SOURCE_SCAN is: (1) Try to find the very class ( or report, function group etc ) which is relevant. If it is difficult to identify the exact one, use * for example “CL_CHTMLB*”. (2) Find the package name of the class( or report, function group etc ), and run report against the package instead.

 

 

Reference

there is a useful blog written by Andrei Vishnevsky about creating a new BSP tag and its corresponding element handler class. By reading it you will get a deeper understanding how the element handler class takes part in the UI render process.

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

0
0
分享到:
评论

相关推荐

    SAP BSP必要配置

    SAP BSP使用前的必要配置 内有截图 详细步骤

    SAP web 开发技术 BSP2 处理网页的

    ### SAP Web开发技术BSP2处理网页的关键知识点 #### 一、引言 在SAP Web开发领域,BSP(Browser Screen Page)扩展是构建高效、功能丰富的Web应用程序的重要工具。本书《BSP Extensions: How to Master Web ...

    NET200 SAP BSP 开发

    这表明了SAP不对材料中的任何错误或遗漏承担责任,也不对材料的应用结果承担任何责任。 通过以上介绍,我们可以了解到SAP BSP开发是一种强大而灵活的技术,它不仅有助于构建高质量的Web应用程序,而且还可以充分...

    BSP报表开发实例(HTML)

    BSP(Business Server Pages)是SAP提供的一种用于构建Web应用程序的技术,它允许开发者使用ABAP语言创建动态网页。在这个实例中,我们将了解如何通过BSP来开发一个简单的HTML报表,并结合ABAP代码进行交互。 1. **...

    结构概念分析与SAP2000应用

    根据文件内容,以下是从标题、描述、标签以及部分内容中提取的知识点,详细说明了《结构概念分析与SAP2000应用》一书的核心内容及其重要性。 ### 标题与描述的知识点: 1. **结构概念分析**:这部分内容强调了结构...

    sap IDOC 错误处理

    - **日志分析**:仔细查看 SAP 系统的日志,找出错误发生的具体环节,这对于诊断问题至关重要。 - **合作伙伴支持**:如果问题涉及外部系统,需要与合作伙伴协调,共同查找问题原因。 6. **最佳实践** - 实施...

    sap2000pushover分析

    ### SAP2000 Pushover 分析详解 #### 一、引言 SAP2000 是一款广泛应用于土木工程领域的高级结构分析与设计软件。它支持多种类型的线性和非线性分析方法,包括静力分析、动力分析、模态分析等。其中,Pushover ...

    SAP错误集锦

    【SAP错误集锦】 在SAP操作过程中,可能会遇到各种各样的错误,这些错误往往涉及到公司的财务、物料管理、销售和分销等多个模块。以下是一些常见错误的解决方案: 1. **公司代码分配折旧表错误**:当收到“3000 的...

    SAP HANA 内存使用分析

    标题和描述中提到的知识点有:SAP HANA内存使用分析、SAP技术顾问或 Basis相关人员、通过SQL语句进行分析。 在SAP HANA数据库中,内存是最重要的资源之一。内存的使用情况对于SAP HANA系统的性能有着直接影响。因此...

    SAP创建销售订单时,出现“定价条件错误:必要条件 MWST 丢失”错误,查错及其解决方法

    面对“必要条件 MWST 丢失”的错误,首先需要通过一系列的检查来定位问题的根本原因。这包括检查物料和客户主数据、进行对比测试以及深入分析条件记录等。一旦找到问题所在,可以通过配置条件类型或更新销售订单来...

    SAP系统F4帮助,出现“内部错误:表格格式” 问题,点击之后,F4搜索不出来任何数据的处理方法

    SAP系统F4帮助,出现“内部错误:表格格式” 问题,点击之后,F4搜索不出来任何数据的处理方法 另外,SAP各种问题大全(持续更新中): https://blog.csdn.net/L1985Z/article/details/123368182

    SAP AC605获利能力分析标准教程

    根据提供的文件信息,我们将重点讨论SAP AC605获利能力分析的几个关键知识点。SAP AC605是关于获利能力分析的标准教程,它通常包含在SAP ERP财务管理模块中。本教程的学习可以帮助参与者理解并掌握如何在SAP环境中...

    SAP UKM_PI 008报错分析

    SAP UKM_PI 008报错分析是指在SAP系统中出现的UKM_PI 008错误的解决方法。该错误通常发生在信用管理模块中,无法调用信用管理系统,导致无法进行信用检查和信用风险评估。 一、基本配置 在SAP系统中,信用管理模块...

    SAP性能测试报告及分析---Part1

    ### SAP性能测试报告及分析知识点 #### 一、SAP性能测试报告简介 SAP性能测试是确保SAP系统能够高效稳定运行的关键环节之一。通过对SAP系统的性能进行测试,可以发现并解决潜在的性能瓶颈问题,从而提高系统的整体...

    SAP2000结构工程案例分析

    在本篇内容中,我们将深入探讨“SAP2000结构工程案例分析”,通过具体的实例来解析SAP2000软件在实际工程项目中的应用及其优势。 ### SAP2000简介 SAP2000是一款由Computers and Structures, Inc. (CSI)开发的专业...

    创建BSP

    本篇文章将详细阐述如何在SAP系统中创建一个BSP程序。 首先,启动SAP GUI并输入事务码`SE80`,进入编程环境。在弹出的界面中,选择“BSP Application”,这是创建BSP程序的入口。接下来,你需要输入BSP程序的名称,...

    SAP SQL查询分析器

    SAP SQL查询分析器是一款专为SAP系统设计的强大工具,它允许用户以类似于标准查询分析器的方式执行ABAP OPEN SQL语句。ABAP(Advanced Business Application Programming)是SAP系统中的主要编程语言,而OPEN SQL是...

    sap 成本分析报告

    在现代企业管理中,成本控制是一项至关重要的环节,尤其在实施SAP系统的企业环境中,如何进行有效的成本分析和管理,对于提升企业的整体运营效率和财务透明度具有深远的意义。SAP系统以其强大的功能,为成本管理和...

    SAP GUI760 解决搜索帮助内部格式错误

    非760的版本不要使用,目的是解决搜索帮助内部错误,由于本人没有这个报错,补丁是其他朋友提供的,所以我没有尝试,可以谨慎使用,如果不想打补丁,可以找我的文章【SAP搜索帮助内部错误:表格格式】同样可以解决此...

    关于SAP Debug的基本知识

    SAP Debug是一种重要的调试工具,帮助开发者和管理员解决SAP系统中的错误和问题。在这篇文章中,我们将介绍SAP Debug的基本知识,并描述一些常用的Debug工具和技巧。 T-cd:SM21 系统日志(System Log) System Log...

Global site tag (gtag.js) - Google Analytics