且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

一些能提高ABAP开发人员日常工作效率的ABAP小工具

更新时间:2022-09-05 23:17:32

I write some small ABAP tools for my daily work. Some of them might not be so useful at first glance – I just write them for fun. Some of them could be used to improve work efficiency, to just reduce several mouse clicks – I am too lazy


Tcode Usage Statistics Tool

This 56 lines of report can print the tcode usage for a given user per month.

一些能提高ABAP开发人员日常工作效率的ABAP小工具

一些能提高ABAP开发人员日常工作效率的ABAP小工具

For example if you would like to check the tcode usage for user WANGJER during March 2017, you have to just choose any date in March and execute:

一些能提高ABAP开发人员日常工作效率的ABAP小工具

It shows I have used SAT for 692 times. Looks like I have some performance trouble on March?

一些能提高ABAP开发人员日常工作效率的ABAP小工具

The similar function could be found in tcode ST03N.


ABAP Class Version Browse Tool

ABAP workbench has built-in version management tool.


The version comparison could only be performed against two version at a time.


一些能提高ABAP开发人员日常工作效率的ABAP小工具

Sometimes I have the requirement to do some pure text analysis on the source code version, for example I need to figure out on which version a variable is introduced. So I write this small tool, which can downloads all the versions of source code into a text file, then I can simply use text analysis tool to fulfill my query.


Execute this 38 lines of tool and it will print out the source code of all versions of specified method.

一些能提高ABAP开发人员日常工作效率的ABAP小工具

一些能提高ABAP开发人员日常工作效率的ABAP小工具

The left task is to download it locally via Workbench:

一些能提高ABAP开发人员日常工作效率的ABAP小工具

Now I can review all the 77 versions of this method in a single text file.

一些能提高ABAP开发人员日常工作效率的ABAP小工具

Sublime Text is my favorite local text editor, as you can see from above screenshot there is also ABAP plugin for it to display ABAP source code with correct syntax highlight.

In Sublime Text it is possible to open the same file in separate two views so it is very convenience for me now to compare any two versions within the same editor window.


一些能提高ABAP开发人员日常工作效率的ABAP小工具

Development History Trace Tool

For example if I would like to recall what I have changed between 2017-03-01 and 2017-03-25, I can simply execute this 67 lines of reports:

一些能提高ABAP开发人员日常工作效率的ABAP小工具

一些能提高ABAP开发人员日常工作效率的ABAP小工具

一些能提高ABAP开发人员日常工作效率的ABAP小工具

Double click on each entry, and ABAP editor will be opened to allow me to review the source code of chosen entry.

一些能提高ABAP开发人员日常工作效率的ABAP小工具

This tool is especially useful for me as when I grow old, sometimes I didn’t remember what I have changed several days ago, and if I only make changes on Z objects then there will be no log in transport requests. Use this tool and I can immediately realize what I have changed for a given time interval.


Execute some transaction code without logging on to backend system

Suppose I am too lazy to log on a backend system to execute transaction code SM04. Then I can trigger it in excel and review result there as well.


Then I just create an excel with Macro enabled ( .xlsm ), put a button and assign the following VB code to it:

一些能提高ABAP开发人员日常工作效率的ABAP小工具

一些能提高ABAP开发人员日常工作效率的ABAP小工具

一些能提高ABAP开发人员日常工作效率的ABAP小工具

With this script I am calling function module TH_USER_LIST from excel, parse the result and display them in excel.

Now I click the button, I can observe in ABAP system that the function module TH_USER_LIST is called:


一些能提高ABAP开发人员日常工作效率的ABAP小工具

And result is displayed in excel:

一些能提高ABAP开发人员日常工作效率的ABAP小工具

XML difference compare tool

No need to download additional software to compare the different XML, as there is a standard class cl_proxy_ui_utils which can do this task for you.

See the following sample code:

一些能提高ABAP开发人员日常工作效率的ABAP小工具

Execute the report and there will be a popup where the difference is displayed. The implementation of


Mischief: send a message to another online user

The function module TH_POPUP can generate a popup window for a given online dialog user.

See example below:


一些能提高ABAP开发人员日常工作效率的ABAP小工具

Once executed, I will see a popup in my SAPGUI:

一些能提高ABAP开发人员日常工作效率的ABAP小工具

I have then written a report using this FM.

Once this report is executed, you can see a list of online users in current application server, which has the same content as in tcode SM04.

一些能提高ABAP开发人员日常工作效率的ABAP小工具

Double click on a given user, and he / she will see a popup dialog in his SAPGUI. You can use this mischief report to greet your colleague, for example send a message like “hey guys, you’d better stand up and have a cup of coffee” after you see he / she has already debugged one issue for half an hour?


BSP page browse history tool

The title might be a little bit misleading. To be more exact, this tool lists all automatically generated ABAP classes for BSP pages accessed by a given user.

Simply execute the report with a user name

一些能提高ABAP开发人员日常工作效率的ABAP小工具

And detail browser list is displayed:

一些能提高ABAP开发人员日常工作效率的ABAP小工具

You can find more background information regarding BSP and JSP, and also the source code of this tool from my blog JSP attribute tag used in Hybris UI implementation and counterpart in ABAP BSP.