Organizing Work with Eclipse

Objective

After completing this lesson, you will be able to Customize ABAP Development Tools (ADT).

The Eclipse Workbench

Eclipse and ABAP Development Tools

You need the Eclipse development environment to develop ABAP applications for the SAP Business Technology Platform (BTP).

A perspective comprises a set of views appearing as tabs in the Eclipse window. The most important views are the source code editor and the project explorer, which you use to navigate between different development objects. There is a wide range of other views that you will need, such as the problems view to display error messages, the documentation view, and views for searching for objects or displaying where in the system a particular object is used.

Screenshot showing the installation process

To develop ABAP applications for SAP BTP, first download the Eclipse development environment for free from https://www.eclipse.org/. Next, to obtain the ABAP Development Tools, do the following:

  1. Open Eclipse.
  2. Choose HelpInstall New Software.
  3. In the dialog box that appears, enter the following: https://tools.hana.ondemand.com/latest.
  4. Be sure to check for updates in HelpCheck for Updates.

Workbench

The term Workbench refers to the desktop development environment in Eclipse. It is used to edit objects, manage views, and arrange the developer's work area.

Screenshot of the Eclipse Workbench

Features of the workbench are as follows:

  • Each workbench contains one or more perspectives
  • Perspectives contain views and editors
  • More than one Workbench window can exist on the desktop at any given time, for example, you may open ABAP Development Tools, but also SAP HANA Studio at the same time

Perspectives

The Eclipse Workbench consists of different views including the source code editor

A perspective in Eclipse is a window to perform a certain task. This window contains the tools necessary to build development to build development objects. SAP created the ABAP Development Tools (ADT) perspective as the go-to IDE for ABAP development.

To develop ABAP applications, choose WindowPerspectiveOpen PerspectiveOther, and double-click ABAP. This opens the ABAP Development Tools (ADT) perspective.

A perspective comprises a set of views appearing as tabs in the Eclipse window. Even though there are other views, the ones we want to focus on today are the most important:

  • Source code editor
  • Project Explorer – SAP provides several perspectives in Eclipse: the ABAP Development Tools (ADT) perspective, the ABAP Profiling perspective, and the Debug perspective

The most important of these is the ABAP Development Tools (ADT) perspective.

The ADT perspective, like any other, provides an initial set of views and editors and determines their layout. Specifically, the ABAP views and editors allow you to work with ABAP development objects managed by an ABAP backend system. When using the ABAP perspective, you must establish a system connection, represented by a corresponding ABAP project. The ABAP perspective enables access to both Eclipse-based and SAP GUI-based ABAP tools.

The ABAP perspective consists of an editor area containing various ABAP source code editors, and the following views:

  • Project Explorer
  • Outline
  • Task Repositories
  • Task List
  • Problems
  • Templates
  • Properties
  • Feed Reader
  • Transport Organizer

Eclipse Preferences

Eclipse Preferences allow you to make general settings about how you want Eclipse to operate. You can access Preferences by choosing WindowPreferences.

The figure, Eclipse Preferences, shows you the Source Code Editors section of the Eclipse Preferences window.

Screenshot of the Source Code Editors section of the Eclipse Preferences window

If ABAP Development Tools are installed, a specific section for settings related to ABAP Development exists. Settings that can be controlled here include the following:

  • Whether the system ID is displayed in the Editor tab page, and, if so, where
  • Settings relating to Debugging, for example, whether system programs are debugged
  • Settings specific to source code, for example, whether brackets are automatically closed, and whether the automatic syntax check is performed
  • Settings related to editors, for example, font size and color options

In case you want to discard the settings that you have made, there is a Restore Defaults button.

Project Properties

You can adjust the properties of a specific ABAP project, just as you can adjust preferences for Eclipse in general. To do this, choose Properties from the project’s context menu. One useful collection of settings is found under ABAP DevelopmentEditorsSource Code EditorsFormatter (as shown in the figure, ABAP Format Settings).

Screenshot of the ABAP Formatter section of the Eclipse Preferences window

You can control the code style of the formatter, including whether source code is indented (for example, when programming an IF or CASE construct), and whether keywords and identifiers are in uppercase or lowercase.

When you have made and applied these settings in the project properties, the formatting can be applied by choosing SHIFT + F1 (on your keyboard) to format the code in the source code editor.

Open and Customize the ABAP Development Tools

Business Example

You are a programmer for an SAP customer and work with the new ABAP Development Tools. Your current task is to customize the ABAP perspective by adding ABAP Function Module to the New menu, and then to save the perspective as S4D100_XX. You also want to remove, and then reinstate, the Help menu and the Launch toolbar from your new perspective.

Note

In this exercise XX refers to your number.

Steps

  1. Open the Debug perspective.

    1. Choose WindowPerspectiveOpen PerspectiveDebug.

  2. Save the ABAP perspective as a new perspective, S4D100_XX, where XX is your number.

    1. Choose WindowPerspectiveSave Perspective As... 

    2. In the Save Perspective As dialog box, enter S4D100_XX as the name.

    3. Choose OK.

  3. Customize the ABAP perspective by adding Function Module to the New menu.

    1. Choose WindowPerspectiveCustomize Perspective ...

    2. Choose the Menu Visibility tab.

    3. Expand the File node.

    4. Expand the New node.

    5. Select ABAP Function Module.

    6. Choose OK.

      The ABAP Function Module has been added to the New menu in the ABAP perspective.

      Note

      Editors:

      Most perspectives in the Workbench comprise an editor area and one or more views.

      There are different editors for different ABAP development objects. The appropriate editor opens automatically when you open the object. If there is no associated native editor for an ABAP development object, the Workbench will attempt to launch an external editor associated with the object type.

      Practice

Log in to track your progress & complete quizzes