SAP WebClient UI源代码搜索工具-阿里云开发者社区

开发者社区> jerrywangsap> 正文

SAP WebClient UI源代码搜索工具

简介: SAP WebClient UI源代码搜索工具
+关注继续查看

The source code scan report RS_ABAP_SOURCE_SCAN ( or transaction code CODE_SCANNER ) is a good tool for ABAPers.


In my Webclient UI development life, I would also expect that there is also a similar tool which enable the scan on html source code of ui component view, forexample I want to search by keyword “ActiveXObject” to get a list of ActiveX control used in Javascript code.


image.png


Why RS_ABAP_SOURCE_SCAN could not support html source code scan

In the beginning I plan to enhance RS_ABAP_SOURCE_SCAN instead of development a new tool. All the objects( class, report, function module) which supported by this tool could have their source code read out via keyword READ REPORT.


image.png


this is not the case for handler class of ui component view. Although you could still set breakpoint on the ABAP code in view handler class and debug them,


image.png


however they are stored in a difference way than normal ABAP class /report, thus it is not possible to fetch their source code from repository via READ REPORT. Besides that you can easily observe the page editor are quite different from normal ABAP Editor for class/report/function module, which means if I enhance RS_ABAP_SOURCE_SCAN, I also need to enhance the navigation logic after I double click on the result list to see the source code in ABAP editor.

So finally I decide to develop a tool on my own.


Develop a tool to allow scan on UI component view source code

There are only two parameters for code scan: Search keyword and UI component whose BSP view’s html source you expect to scan.


image.png


You could specify multiple UI component via selection options:


image.png


The search result is displayed in ALV. Double click on result row,


image.png


and it will automatically navigate to the BSP view editor with the very line which contains the search keyword being highlighted as below:


image.png


This tool has simple input and output UI, but it has already 100% fulfilled my html source code scan requirement.


image.png


How to make this tool run on your laptop

create a new Z report and copy the source code from attached text file. This tool contains the following parts:


(1) an executable report zbsp_code_view

(2) a global class ZCL_BSP_CODE_TOOL

(3) a function module ZCALL_EDITOR. Of course you should also have a function group, in my case it is named as zbspeditor.

(4) a new screen 0101 used in FM ZCALL_EDITOR.

Flow logic:


image.png


Element list:


image.png


layout design:


image.png


Feel free to adapt this tool to meet your own requirement


版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
Java基础-18总结Map,HashMap,HashMap与Hashtable区别,Collections工具类
你需要的是什么,直接评论留言。 获取更多资源加微信公众号“Java帮帮” (是公众号,不是微信好友哦) 还有“Java帮帮”今日头条号,技术文章与新闻,每日更新,欢迎阅读 学习交流请加Java帮帮交流QQ群553841695 分享是一种美德,分享更快乐! 1:Map(掌握) (1)将键映射到值的对象。一个映射不能包含重复的键;每个键最多只
2453 0
eclipse与myeclipse恢复已删除的文件和代码
顿时感觉myeclipse真的很强悍啊;必须将这个功能写写,要不感觉就对不起myeclipse的作者 1.类文件的恢复 前些天在开发中,不小心将一个写着有数1000行代码的类删除了,本能下去按了ctrl+z进行恢复,但没有一点用,但还是搜索下有没有解决的方法,要重新写一遍真有点 心不...
652 0
+关注
2628
文章
0
问答
来源圈子
更多
+ 订阅
文章排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载