This is a test message to test the length of the message box.
Login
ABAP Quick Search in source code
Created by Software-Heroes

ABAP Quick - Search in source code

Sometimes it is necessary to search through different source codes in one system. We show you how it works in the SAP GUI and in Eclipse.

Advertising

For every developer, the focus is on writing source code because it is most fun and creative. But research and understanding of source code is also an important part of daily work as a developer. Today we would like to show you how to search source code in the system, once for the SAP GUI and once as an example in Eclipse, as the new development environment.

 

Classic search

The classic search in the SAP GUI works with the report RS_ABAP_SOURCE_SCAN, which offers various options for searching the source code and further restricting the search quantity by selecting the packages and objects to be searched.

From a performance perspective, this restriction is also necessary because the runtime of the report can sometimes take a little longer until all resources have been searched.

 

For our example we are looking for a ##TODO pragma, which we have added to the source code, because we want to do something later. Such TODOs are mostly used when you later want to complete certain points that you did not manage to implement or were not required in a first prototype. For example, clean exception handling should be mentioned here.

 

The program provides the corresponding search results at the end and you can navigate to the source code by clicking on the corresponding entry.

 

Eclipse

Searching in Eclipse is a bit easier because you don't need your own report here, but you can work directly with the search function. The call is made using the key combination CTRL + H or directly in the menu. Then you will get a popup with various searches. The available searches can differ, as you can activate and deactivate them individually using "Customize ...".

 

In this case the "File Search" is sufficient for us and delivers the desired result. To restrict the amount of files searched, we only search for the pattern in all Z* and LZ* objects.

 

TODO Pragma

The use of the ##TODO pragma has also some other advantages in Eclipse. Even if this pragma does not exist in the system, it can be used. In Eclipse you get a corresponding marking in the source code and in the overview, which makes it easy to find.

 

This also works for FIXIT and XXX if you follow the SAP suggestions and provide the code with standardized comments.

 

Conclusion

The search for any object works in the new and old development world, just a little differently. Which of the searches you choose in the end is up to you, but we recommend searching in Eclipse because it is a bit more powerful and easier to use.


Included topics:
QuickSearchSource codeEclipse
Comments (0)
Advertising

ABAP Quick - Wait for task

Category - ABAP

Today a tip for asynchronous processing or if you want to put processing in a separate task in special situations. What happens afterwards?

03/05/2021

ABAP Quick - Performance INSERT vs VALUE

Category - ABAP

In this article we take a look at the performance of the insert operations APPEND, INSERT and VALUE with regard to tables and evaluate the performance and stability during development.

02/26/2021

ABAP - BOPF Quick Guide (Update)

Category - ABAP

A little update to our book that we published. For all people who find the paperless office boring.

10/23/2020

ABAP - BOPF Quick Guide

Category - ABAP

You need a quick introduction to the SAP Business Object Processing Framework (BOPF), we have the right guide for you here.

09/11/2020

ABAP Quick - Icons

Category - ABAP

Find icons in SAP and use them correctly? Here is a small guide on how to use the images for different purposes.

03/06/2020

We use cookies for our services and functions. More informations