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.

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)

ABAP Quick - CLEAR right

Category - ABAP

Delete correctly? In this article we want to take a look at when it makes sense to delete and how you can do it effectively.

05/12/2023

ABAP Quick - Performance chained statements

Category - ABAP

Let's take a look at the performance when creating chained statements with DATA and FIELD-SYMBOL. Which variant will be ahead in terms of performance?

04/28/2023

ABAP - ALV still relevant in 2022?

Category - ABAP

Today the joking question, do we still need reports that generate ALV outputs in 2022? In this article, we want to look into this question.

07/01/2022

ABAP in Change

Category - ABAP

The programming language ABAP has been changing for years and is being modernized in various concepts. In this article, we'll look at it in detail.

06/24/2022

ABAP Quick - Clean Core

Category - ABAP

In this article something about Clean Core, what does it mean for the developer, what are the requirements and what do you have to pay attention to.

06/17/2022