ABAP Tools - Work with Eclipse (Search)
In this small series we want to bring you closer to working with Eclipse and show the advantages for the speed of development.
After talking about installing the ABAP Development Tools in the first articles and explaining in the last article why you should switch to Eclipse, we will talk about techniques in use in this small series. Here you will learn something about the shortscuts and possibilities that are available in Eclipse.
If you have connected to your system or the cloud, you should first learn proper navigation so that you can move through the system and the objects in a targeted manner. So if you are looking for an object or you already know the name, you can open the dialog with CTRL + SHIFT + A:
In the upper area you can specify a system (project) in which you want to search for your object. The dialog normally opens in the current system in which you are currently working or on the object where the focus is currently. For example, if you click on another system in the Project Explorer and open the Dialog, this project will be shown for the search.
When entering the search mask, you can, as usual in SAP, also work with search patterns. In this example we are looking for all classes that start with "CL_ABAP *".
As you can see, we have reached the maximum number of hits of 50 and no further results are loaded. If you want to increase the number of hits by default, you can do this via the settings. Under "Window -> Preferences -> ABAP Development -> Search" you will find the search settings and can, for example, increase the search results to 200, as is usually set in the SE80. The next time you search, you will get a lot more hits.
If you only want to search for objects of a certain type or from a certain user, you can work with additional filters in the dialog. When you have entered your search pattern, you can use CTRL + Spacebar to display further suggestions for what you can filter for.
You are free to choose whether you are looking for objects in a certain package, objects that belong to you and want to search for certain object types. For our search we want to search for special types. Double-clicking on Type opens another menu and we can search for types from a long list. In this case we want to search for data definitions (DDLS), i.e. existing core data services.
Such searches can also be linked with one another as desired. For example, you can include the year of creation to filter all DDLS objects from the past year or the current year.
Hint: If you are looking for several types, you can also separate them with a comma and thus pre-assign several values for a filter.
When you have found your object via the search, you can open it in the list with a double click. If there is already an Eclipse dialog, the object is displayed in the ADTs. If no view is available for an object or the service is not available on the system, the SAP GUI is opened as a new window in Eclipse.
Wenn du dein Objekt dann über die Suche gefunden hast, kannst du es mit einem Doppelklick in der Liste öffnen. Wenn es bereits einen Eclipse Dialog gibt, dann wird das Objekt in den ADTs angezeigt. Sollte einmal kein View für ein Objekt zur Verfügung stehen oder der Service ist auf dem System nicht verfügbar, wird die SAP GUI als neues Fenster in Eclipse geöffnet.
To see the object in the package hierarchy, the Project Explorer must be linked to the editor. To do this, click on the double arrow (see picture) and the object hierarchy is loaded up to the element that is currently focused in the editor.
For performance reasons, we recommend that you deactivate the option afterwards, otherwise the Explorer will jump back and forth in the view every time you switch objects. As you can see above, only the hierarchy was loaded up to the package, but the objects from the package are not yet visible. Behind the objects is "partly loaded" and a question mark in brackets.
So that you can now load all objects in the hierarchy, simply select the package or folder. Then select "Load Full Content" from the context menu or simply press the F5 key. Now all objects are loaded below and in the brackets you will find the number of objects contained.
The first step for a successful navigation and search in the system has been taken. You can now filter the objects by type or creation and you know how to load the package hierarchy to the object. In the next part, we go into the arrangement and flexibility of Eclipse.