ABAP Development Tools (ADT)

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

ABAP Development Tools (ADT) is the editor that SAP provides for writing ABAP. It is not a separate program: it is a set of plug-ins that you add to Eclipse, a free development environment. You work in Eclipse, but the code stays on the SAP system, and every edit, check and run goes to that system. This page shows how to install ADT, connect it to a system, create a package and a first class, and find your way around the shortcuts, the debugger and the Feed Reader. It follows the release baseline of this section: Standard ABAP release 8.16 and ABAP for Cloud Development release 9.20 (2608). ADT is the tool for ABAP Cloud development (the ABAP environment and SAP S/4HANA Cloud Public Edition) and also connects to on-premise systems, where you use it for Standard ABAP. The ADT plug-in version is not stated here: the update site always offers the current one.

Before you read

  • Basic idea of what ABAP is and where it runs: Getting Started.

  • The difference between ABAP Cloud and classic ABAP: Language Versions and Released APIs.

  • No SAP account is needed to read this page. Connecting a project and running the examples does need an SAP system. For an account-free alternative, see Hands-on Lab.

Key terms

  • ABAP Development Tools: the Eclipse plug-ins from SAP for developing ABAP objects on an SAP system.

  • ABAP project: an Eclipse project that manages the connection to one ABAP back-end system.

  • ABAP Cloud: the ABAP development model that allows only released APIs and is the model for cloud systems.

  • Package: a container that groups related development objects and defines what belongs together.

  • Activation: the step that turns a saved, inactive version of an object into the version that the system runs.

  • Perspective: an Eclipse window layout; ADT brings an ABAP perspective and a debug perspective.

  • Feed Reader: a view that shows feeds from the system, for example runtime errors or check results.

Where ADT fits

The picture shows what runs where. Your computer holds only the editor. The ABAP source, the Dictionary objects and the running programs live on the SAP system, and ADT talks to it over the network.

flowchart LR subgraph PC[Your computer] E[Eclipse with ADT plug-ins] end subgraph SYS[SAP system] R[Repository: classes, CDS views, packages] A[ABAP runtime and debugger] F[Feeds: runtime errors, system messages] end E -- edit, check, activate --> R E -- run, debug --> A F -- Feed Reader --> E

Installing Eclipse and ADT

Install in this order.

  1. Download the current Eclipse package from the Eclipse downloads page and unpack it. SAP’s installation tutorial notes that the Eclipse packages bring their own Java runtime, so you do not install a JRE or JDK yourself.

  2. Start Eclipse and choose a workspace folder. This folder holds your project settings, not your ABAP code.

  3. Open Help > Install New Software and enter the SAP update site https://tools.hana.ondemand.com/latest in the field Work with.

  4. Select ABAP Development Tools in the list, accept the licence terms, install and restart Eclipse when asked.

  5. Open the ABAP perspective with Window > Perspective > Other Perspective > Other, select ABAP and choose Open.

Which Eclipse release to use changes over time. The page at the update site lists the recommended Eclipse release, so read it when you install and do not rely on a number copied into a guide.

ABAP projects and ABAP Cloud projects

An ABAP project manages the connection between Eclipse and one ABAP back-end system, and it is the container for all development objects that live in that system. The ADT user guide names two kinds. A classic project connects to an on-premise system and is created as an ABAP project. A cloud project connects to the ABAP environment and is created as an ABAP Cloud project. All projects appear in the Project Explorer.

To create an ABAP Cloud project, choose File > New > ABAP Cloud Project. The wizard asks for the ABAP service instance URL, which must start with https://. You then log on in your browser, and ADT shows the connection settings (service instance URL, user, system ID, client and language) and a generated project name before you choose Finish. You need a user with the right authorizations and the service instance URL from your administrator.

An ABAP project for an on-premise system can be created from a connection that is already defined in the SAP Logon, from a manual system connection, or by duplicating an existing connection.

Which statements an object may use is set by its ABAP language version, not by the type of project. The rule that ABAP Cloud allows only released APIs is explained on Language Versions and Released APIs.

A package and a first class

Every development object belongs to a package. To create a package, select a package node in the Project Explorer, open the context menu and choose New > ABAP Package. You enter a name and a description. Customer-specific objects use names that start with Y or Z or your own namespace between slashes. The wizard then asks for the software component, the package type (structure, main or development) and the transport layer. In the ABAP Cloud development model, developers can create only development packages, as subpackages of the single structure package.

A class is created the same way: select the package node, open the context menu and choose New > ABAP Class. The wizard asks for a name and a description, optionally a superclass and interfaces, and then for a transport request. The back end creates an inactive version of the class, and the source editor opens with the generated source code. The following class prints a message for an expense claim. It uses the console interface that the ADT run command understands. This example requires an SAP system; not run here.

CLASS zcl_exp_hello DEFINITION
  PUBLIC FINAL
  CREATE PUBLIC.

  PUBLIC SECTION.
    INTERFACES if_oo_adt_classrun.
ENDCLASS.

CLASS zcl_exp_hello IMPLEMENTATION.
  METHOD if_oo_adt_classrun~main.
    out->write( |Expense claims app: first class works| ).
  ENDMETHOD.
ENDCLASS.

Check and activate the class, then run it by choosing Run As > ABAP Application (Console) from the context menu of the source editor, or press F9. The text appears in the Console view. The Ctrl+F3 shortcut activates the object in the editor. The Console view needs the interface if_oo_adt_classrun, which the user guide lists for SAP NetWeaver AS for ABAP 7.51 innovation package SP01 and higher.

Shortcuts worth learning

The ADT user guide lists these shortcuts for Windows. On an Apple Mac the guide says you may need the Command key instead of Ctrl.

Shortcut What it does

Ctrl+Space

Code completion (content assist).

Ctrl+1

Open the quick fix and quick assist dialog.

Ctrl+Shift+A

Open a development object by name.

Ctrl+F2

Check consistency and syntax.

Ctrl+F3

Activate the inactive development object.

Ctrl+Shift+F3

Activate all inactive development objects.

Shift+F1

Format the source code (pretty printer).

F1

Show the ABAP Keyword Documentation of the keyword under the cursor.

F2

Show the ABAP element info.

F3

Navigate to the ABAP source code of the element under the cursor.

Ctrl+Shift+G

Where-used list.

Ctrl+H

Open the Search dialog.

Ctrl+Shift+L opens a list of the shortcuts for the area you are working in. The full list of keys is under Window > Preferences > General > Keys.

The debugger

Start the debugger by setting a breakpoint in the source code and then running the program. Double-click the ruler of the source editor next to an executable line to set a breakpoint, or choose Run > ABAP Breakpoints > Toggle Breakpoint with the cursor on the statement. The Debug perspective offers buttons to resume, terminate and disconnect, and to step: Step Into is F5, Step Over is F6 and Step Return is F7. Run to Line is Shift+F8. The Breakpoints view in the Debug perspective lists and manages your breakpoints. The Variables view shows the current values, so you can see what a statement produced.

The Feed Reader

The Feed Reader (the Feeds view) displays and reads feeds from the ABAP repository and other native feeds. By default it shows runtime errors and system messages, so a failed run of your class is visible without leaving Eclipse. You can also subscribe to any feed published in Atom or RSS format by giving its URL, and you can add or delete a feed. ADT refreshes a feed periodically, but only while an ABAP project is open. Otherwise the feed is dormant and shown in gray.

Older material you may meet

Older books and training material describe the classic way of working in the SAP GUI: the Object Navigator (transaction SE80) and the Dictionary (transaction SE11). They are covered on Classic Tools. The ADT user guide also offers a question list for developers who know SE80.

Summary

  • ADT is a set of Eclipse plug-ins; the code and the execution stay on the SAP system.

  • Install Eclipse, then add ABAP Development Tools from the SAP update site and open the ABAP perspective.

  • An ABAP Cloud project connects to the ABAP environment; a classic ABAP project connects to an on-premise system.

  • Objects live in packages; save stores an inactive version and activation makes it effective.

  • Learn completion, quick fix, activation and the F5 to F7 debugger keys first.

  • The Feed Reader brings system feeds such as runtime errors into Eclipse.