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

如何自行分析定位SAP BSP错误相关推荐

  1. 7 php 内存泄漏_PHP 内存泄漏分析定位

    引用前言 本文开始撰写时我负责的项目需要用php开发一个通过 Socket 与服务端建立长连接后持续实时上报数据的常驻进程程序,在程序业务功能开发联调完毕后实际运行发送大量数据后发现内存增长非常迅速, ...

  2. 7 php 内存泄漏_PHP内存泄漏分析定位

    说明:本文来自作者  邹毅 在 GitChat 上分享「  PHP 内存泄漏分析定位」 目录 场景一 程序操作数据过大 场景二 程序操作大数据时产生拷贝 场景三 配置不合理系统资源耗尽 场景四 无用的 ...

  3. 达梦 DM 执行SQL报字符串截断如何分析定位/超长文本截取

    达梦 DM 执行SQL报字符串截断如何分析定位/超长文本截取 DM数据库报字符串截断 1 .执行INSERT时报错 一般此类问题是由于目标表存在一个(或多个)字段长度不够,导致插入失败.重点关注CHA ...

  4. 遇到bug我们如何分析定位?

    前言:日常工作中,每天可能都会遇到不同的bug,有些刚入行的测试喜欢不加分析就直接甩给开发去解决.开发比较闲还好,如果手头工作比较多,就容易烦.甚至有可能是后端的问题,但是你却把问题丢给了前端,这种事 ...

  5. 软件测试人员正确分析定位BUG小技巧

    软件测试人员测试过程中如何分析定位常见BUG 一.前置知识 1. 熟透系统业务.团队成员情况 2. 熟悉使用F12或抓包工具 3. 了解HTTP/HTTPS协议,能够区分请求URL.请求头.请求体.入 ...

  6. PHP 内存泄漏分析定位

    转载地址:https://mp.weixin.qq.com/s/98D_VtkFEM5bZsu9cazggg? 目录 场景一 程序操作数据过大 场景二 程序操作大数据时产生拷贝 场景三 配置不合理系统 ...

  7. 分析“HTTP500内部服务器错误”解决方法

    系统中出现的一些故障是用户最不想看到的,有时候遇到一些故障都到折腾个大半天才能够搞定.打开网站出现了HTTP500内部服务器错误的提示,无法法查看错误的详细信息,用户也没办法根据具体的问题来解决,这对 ...

  8. idea debug教程启用Debug模式可以分析定位异常发生的位置

    在现在的开发中,我们经常采用Debug来追踪代码的运行流程,通常在程序运行过程中出现异常,启用Debug模式可以分析定位异常发生的位置,以及在运行过程中参数的变化.通常我们也可以启用Debug模式来跟 ...

  9. iOS crash分析定位

    一.xcode源码安装 1.1源码以run的形式安装到手机并启动APP时(手机处于解锁状态):当crash时,会直接定位到源码某一行,这时候在手机上没有crash log. Note:在真机上运行时, ...

最新文章

  1. 2.1 . df 命令和du命令
  2. Jackson 序列化对象成 JSON 字符串,忽略部分字段(属性)
  3. [学习笔记]数字电路技术
  4. php json转数组后并在前端展示,0516-如何从服务器端获取JSON格式字符串并解决到前端页面中显示...
  5. String,StringBuffer与StringBuilder
  6. 使用执行程序和ThreadPoolExecutor的Java线程池示例
  7. 第六篇:Spring Boot 访问静态资源
  8. maven POM总结
  9. python调整图像大小_使用Python调整图像大小
  10. 使用SQL Server ROWCOUNT
  11. 修改GDAL库支持IRSP6数据
  12. 阶段3 1.Mybatis_02.Mybatis入门案例_1.mybatis的入门
  13. 老李分享:浏览器引擎的介绍
  14. 动态规划实战篇--斐波那契数列
  15. Must Know Tips/tricks in DNN
  16. postman安装html插件安装,Postman 安装与更新
  17. 第二次作业,问卷星的使用
  18. 第一行代码读书笔记___3章
  19. 高德地图html5生成,高德地图选择位置然后生成静态地图
  20. 【期末复习】网络安全技术(双语)

热门文章

  1. SQL性能优化-查询条件与字段分开执行,union代替in与or,存储过程代替union
  2. git服务器的简单搭建
  3. ambari 2.5.0源码编译安装
  4. [Erlang危机](5.1.1)内存
  5. 判断浏览器是否支持某个css属性
  6. Mongodb在windows下配置文件的配置
  7. Python(2.7.6) copy - 浅拷贝与深拷贝
  8. [转]Hamcrest使用方法实例
  9. 【转】oracle having -OCP-047-53
  10. HP unix 常用管理命令