3.2    ABAP Workbench Overview

As an ABAP developer, you’ll use the ABAP Workbench tools to work with various development objects, such as programs, functions, classes, tables, and so on. In this section, we’ll explore some of the important ABAP Workbench tools that you’ll use to develop ABAP programs. We’ll explore other ABAP Workbench tools as we progress through this book.

ABAP Workbench tools are integrated with development objects, and the ABAP Workbench provides forward navigation support to move between objects. For example, if you’re editing the program code in the ABAP Editor and come across a statement in which a function module is called, simply double-clicking the function module name will open the function module in the Function Builder tool.

Because you use different ABAP Workbench tools to design and develop various objects in an ABAP application, instead of juggling between ABAP Workbench tools in different screens, SAP provides an application called Object Navigator (Transaction SE80).

Object Navigator organizes all the development objects in a tree-like hierarchy, which makes it easy to edit the application’s different objects. We’ll look more closely at the structure of the Object Navigator screen in Section 3.2.7.

Let’s explore the ABAP Workbench tools and see how they’re integrated into the Object Navigator to provide an IDE.

3.2.1    ABAP Editor

One of the main components of ABAP Workbench is ABAP Editor, in which you write and edit ABAP code. The main transaction to open ABAP Editor is Transaction SE38, but the editor also is integrated into other ABAP Workbench tools, like Class Builder, Function Builder, and Screen Painter.

In ABAP Editor, you can choose one of three different modes:

You can select a mode by following the menu path UtilitiesSettings from any ABAP Workbench tool to open the User-Specific Settings dialog box (see Figure 3.7).

On this screen, select the ABAP Editor tab and then the Editor tab. Under the Editor tab, select the radio button for your preferred editor.

ABAP Editor SettingsABAP Editorsettings

Figure 3.7    ABAP Editor Settings

We recommend using the new front-end editor; it offers many powerful features for writing and editing ABAP code, such as syntax highlighting, code hints, and auto-completion. Figure 3.8 highlights some of the features of the new editor that are not available in other editor modes.

As shown in Figure 3.8, the new front-end editor supports bookmarking for fast navigation, highlights the changes to the source code when editing, provides code hints and auto-completion of language elements and structures, and displays element blocks that easily can be expanded or collapsed for legibility.

New Editor Mode Features

Figure 3.8    New Editor Mode Features

You can also quickly set a breakpoint by double-clicking the margin line. From within the settings, you can create user-defined source code templates to speed up the development process and avoid manually writing repetitive code.

3.2.2    Function Builder

Function modules are reusable software blocks that can be called from ABAP programs. The Function Builder is the ABAP Workbench tool that allows you to create and maintain function modules globally in the system. These function modules can be called by any ABAP program or remotely by external programs.

Function modules are called in ABAP programs or called remotely by external programs and never executed by the user directly. However, Function Builder provides a test environment to test the function modules without actually calling them in a program.

Function Builder also serves as a central library to search for existing function modules to use in your programs. You can also maintain documentation for each function module during development in the Function Builder, allowing other developers to understand the functionality and parameter interface of the function module when they use the module in their own programs.

Access Function Builder via Transaction SE37 or from the Repository Browser (Transaction SE80). Figure 3.9 shows Function Builder.

Function BuilderFunction Builder

Figure 3.9    Function Builder

We’ll explain Function Builder in more detail and you’ll use it to develop function modules in Chapter 7.

3.2.3    Class Builder

Similar to how Function Builder is used to create and maintain function modules, Class Builder is an ABAP Workbench tool used to create, define, change, and test global ABAP classes and interfaces. ABAP classes are procedures that implement object-oriented programming concepts (see Chapter 8).

ABAP classes can be defined locally in an ABAP program or globally in the system using the Class Builder tool. Class Builder allows you not only to define and maintain global classes but to maintain relations such as inheritance between objects, redefine methods in subclasses, and maintain attributes, methods, and events for the class. Class Builder also provides the runtime to test classes and interfaces.

Access Class Builder via Transaction SE24 or from the Repository Browser (Transaction SE80). Figure 3.10 shows Class Builder. As you can see, the Class Builder includes multiple tabs to maintain various components of the class, such as methods, attributes, interfaces, and more.

Class BuilderClass Builder

Figure 3.10    Class Builder

We’ll explain Class Builder in more detail and you’ll use it to implement global classes in Chapter 7.

3.2.4    Screen Painter

Screen Painter is an ABAP Workbench tool used to create screens for ABAP programs and to maintain the screen flow logic. In ABAP, three types of screen can be defined for ABAP programs: selection screens, list screens, and general screens. Selections screens and list screens are automatically generated using specific ABAP keywords. General screens are designed and maintained using Screen Painter.

Screen Painter provides a graphical layout editor mode in SAP GUI for Windows, in which various screen elements, like input fields, text fields, and dropdown list boxes, can be defined easily via drag-and-drop functionality.

For operating systems that don’t support the graphical layout editor mode (e.g., SAP GUI for Java), an alphanumerical mode is also available to work with screen elements.

Screen PainterScreen Painter

Figure 3.11    Screen Painter

As shown in Figure 3.11, Screen Painter includes three tabs:

The graphical layout editor is only available in SAP GUI for Windows. This editor is shown in Figure 3.12.

Layout Editor in Graphical Mode

Figure 3.12    Layout Editor in Graphical Mode

Graphical Layout Editor

Screen Painter’s graphical layout editor is part of SAP GUI and works only with the SAP NetWeaver Application Server 6.10 with SAP GUI release 6.10 or later. In SAP NetWeaver 4.0, it works with SAP GUI release 6.20 or later, patch 56, or release 6.40, patch 8.

3.2.5    Menu Painter

Menu Painter is an ABAP Workbench tool with which you can design user interfaces for ABAP programs. As discussed in Section 3.1.3, various screen elements—such as items in the menu bar, the standard toolbar, and the application toolbar—can be designed using Menu Painter. For example, you can define the Back, Exit, and Cancel buttons for your screen or define application-specific menu options in the menu bar and define corresponding icons in the application toolbar for quick access. These items are collectively called the GUI statuses of the screen.

Figure 3.13 shows the Menu Painter screen on which various UI elements for a screen can be maintained. You can maintain the elements for the menu bar, standard toolbar, application toolbar, and function keys that can be used as keyboard shortcuts by the user.

Menu PainterMenu Painter

Figure 3.13    Menu Painter

We’ll explore Menu Painter further when we discuss dialog programming in Chapter 12.

3.2.6    ABAP Data Dictionary

ABAP Data Dictionary (see Figure 3.14) is a tool provided by SAP to centrally create and maintain data definitions. You can use ABAP Data Dictionary to create and maintain global user-defined types, like data elements, structures, and table types that can be used in any ABAP program.

You can use ABAP Data Dictionary to create objects (tables and views) in the underlying relational database, which facilitates central description of data without redundancy.

ABAP Data Dictionary: Initial ScreenABAP Data Dictionaryscreen

Figure 3.14    ABAP Data Dictionary: Initial Screen

In ABAP programs, Open SQL statements process data from the underlying relational database. Open SQL statements consist of the Data Manipulative Language (DML) part of SQL that helps perform certain actions, like reading, modifying, or updating data in database tables.

To perform certain actions, like creating or deleting database tables or creating table indexes, you use the Data Definition Language (DDL) part of SQL, which requires using Native SQL statements. However, you only use Open SQL statements in ABAP applications; it’s highly recommended not to use Native SQL statements to define database tables or perform any actions on the underlying relation database.

Instead, use ABAP Data Dictionary to create and maintain tables and views or perform any actions that would otherwise require the use of Native SQL statements. This not only helps to avoid redundancy but also helps clarify how the logical structure of the objects used in application development are mapped to the underlying relational database.

All ABAP Data Dictionary objects are globally visible in the system and maintained centrally. For example, if many programs are using a particular data element and the definition of the data element needs to be changed due to a change in business requirements, the change will be automatically reflected for all the programs using the data element. Therefore, no program needs to be manually updated, because the runtime system automatically adjusts to the changes in ABAP Data Dictionary and ensures that all the applications and tools always access current data.

The most important object types in ABAP Data Dictionary are as follows:

3.2.7    Object Navigator

The Object Navigator provides an IDE in which all the ABAP Workbench tools can be used centrally. For example, when developing an ABAP application that requires defining screens, GUI statuses, and ABAP Data Dictionary objects, these respective tools can be opened in the Object Navigator itself without having to leave the screen to access individual tools.

The Object Navigator helps organize your development objects during development and makes it easy to edit all related objects in an application in one place.

As shown in Figure 3.15, the Object Navigator includes two main areas:

Now that you’ve seen a general overview of the objects in the ABAP Workbench, the final section in this chapter will look at the other IDE that can be used with ABAP: Eclipse.

Object Navigator

Figure 3.15    Object Navigator