Prerequisites
Your ABAP system must be using a SAP HANA database.
In order to provide the required space for the ABAP Source Search and its indexing,
your SAP administrator needs to activate the SRIS_SOURCE_SEARCH
business function in the Switch Framework (transaction code SFW5)
of the corresponding ABAP system.
Context
In SAP NetWeaver 7.4 SP 5 and higher, the SAP HANA-based ABAP Source Search
functionality enables you to find text that is contained in source-based repository
objects (like classes, programs, function pools, and so on) as well as message
classes of an ABAP project.
You have two options for performing a search in ABAP source code:
- If you want to search within the entire ABAP system, select
from the menu or open the shortcut (Ctrl H).
- If you want to search within a certain development object, select a certain
development object in the Project Explorer or open it in the source code
editor and choose Search Content... from the context
menu.
The same dialog is provided for both options. Proceed as follows:
Procedure
- In the following dialog box, choose the ABAP Source Search tab.
Note If the recommended tab is not displayed, choose the
Customize... button to select the corresponding
one.
- In the ABAP Source Search tab, enter the text you wish to find in the Search Term field.
Note In the search field, the following operators are available to
adjust your search criteria:
| Operator |
Description |
| * (asterisk) |
You can add an asterisk '*' to search for all
characters. |
| OR |
Matches containing at least one of the terms joined by the
OR operator are returned. |
| - (minus) |
Matches that do not contain the term immediately following
the minus sign are returned. |
| "SEARCH_TERM" (quotation marks) |
Only exact matches for SEARCH_TERM are returned. Terms within
quotation marks are not tokenized and are handled as a
string. |
Note If you enter multiple search terms, the AND operator is
automatically interpreted by default. As a consequence, only the repository
objects are displayed that contain all search terms.
- [Optional:] In the Search Filter field, you can restrict the search by one or more:
- ABAP packages
- ABAP source-based development objects
- Object types like clas, intf
- Responsible User that is provided in the table TADIR,
field AUTHOR
Tip When editing the search filter, you can benefit from the content assistant
functionality by pressing Ctrl + Space.
Note If you want to select several ABAP packages and / or development objects, leave a space between the entries.
- [Optional:] Move the Maximum number of results slider to limit the quantity of the results that are displayed in the Search view.
Note You can define the number from 25 up to all search results.
- [Optional:] Choose the Browse... button for selecting the
Project if you want to search in another ABAP project.
Note By default, the current ABAP project is used.
- Choose Search to launch the search.
Results
If the text is found in the ABAP source code, the matching code snippets are
displayed in the result list of the Search view. These code snippets are
grouped according to their repository objects and packages. In addition the search
term is highlighted.
From the results list, you can navigate to the repository object or source code
position by using double-click. In addition, you can do the following:
- Scroll to the next or previous match
- Copy the content of the result to the clipboard
Note In the
Search view, you can choose the
Open Search Dialog button from the tool bar to redefine the
search.