Abap Dev User Guide EN
Abap Dev User Guide EN
Application Server ABAP 7.55 FPS00 and SAP Cloud Platform ABAP Environment
Document Version: 3.12 – 2020-10-07
2 Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 Eclipse Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Quick Launch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3 Basic Tutorials. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3 Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.1 ABAP Development Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Tools for ABAP Development. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Status of a Development Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Source Code Unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Modularization with Function Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.2 Documentation of Development Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Short Texts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Long Texts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.3 Element Info. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
3.4 ABAP Repository. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Relation Explorer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
ABAP Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
ABAP Repository Trees. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42
ABAP Search. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
ABAP Type Hierarchy View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.5 ABAP Runtime Errors and Short Dumps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.6 ABAP Perspectives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.7 ABAP Profiling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.8 ABAP Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.9 ABAP Editors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
ABAP Source Code Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
ABAP Package Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
ABAP Dictionary Editors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59
Messages and Message Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Transformation Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
RND Parser. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.10 Activation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.11 Unit Testing in ABAP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.12 ATC Quality Checking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4 Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
4.1 Fundamental Tasks and Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Working with ABAP Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Working with ABAP Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Working with ABAP Repository Trees. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Working with Development Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Working with ABAP Source Code Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Working with Classic Objects in ABAP Dictionary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Working with Number Range Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
5 Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794
5.1 List of Development Objects with an Eclipse-based Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794
5.2 Keyboard Shortcuts for ABAP Development. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797
Edit Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .798
Displaying Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
Navigation Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
Moving Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800
Commenting Actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800
Search and Help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800
WindowsTM-based Shortcuts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .801
5.3 Syntax of ABAP Dictionary Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801
Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802
Database Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823
Scope of Documentation
This documentation describes the functionality and usage of the ABAP Development Tools (ADT) within the
ABAP core development scenario. In particular, it focuses on use cases for creating, editing, testing, debugging,
and profiling development objects in an Eclipse-based IDE.
Context
This guide provides documentation about features which are client-specific or require a specific back-end
version.
Target Audience
ABAP developers who are involved in the ABAP core development scenario and want to work with an Eclipse-
based IDE.To highlight and contrast back-end-specifics in the relevant context, the following icons are used:
Validity of Documentation
This documentation belongs to the ABAP Development Tools client version 3.12 and refers to the range of
functions that have been shipped as part of the standard delivery for:
Caution
To highlight and contrast back-end-specifics in the relevant context, the following Consider that
debugging of ABAP code in ABAP Development Tools at least requires:
Note
To enable you developing ABAP source code, your ABAP system administrator needs to configure an
ABAP system. For this, the Configuration Guide for Configuring the ABAP Back-end for ABAP Development
Tools is provided.
Visit also the ABAP Development SAP community channels for more information and to interact with
other ABAP developers.
The following information provides you with a selected overview of Eclipse features in order to make your
transition working with ABAP Development Tools (ADT) easier.
This section describes general information about Eclipse that is relevant for ABAP developers working with
ADT.
Note
To get more information about Eclipse in general and getting started with ADT, see the Related Information
below.
In addition, you can gain more experience with ADT using the Feature Explorer. It provides interactive tours
to explore ADT features directly on the UI. To open it, enter Feature Explorer in the Quick Access input
field beside the toolbar. Then choose the Views entry as follows:
● What is displayed when I open ADT for the first time? [page 10]
● What does the Eclipse UI display and where can I found what? [page 10]
● How can I browse through the repository content? [page 11]
● Can I open the SAP GUI anyway? [page 11]
● How can I arrange and modify the perspective? [page 12]
● How can I reset the perspective? [page 12]
● Where can I set general properties/preferences? [page 12]
● How can I open a view quickly? [page 12]
● How can I display input help? [page 13]
After installing and opening the Eclipse-based IDE for the first time, the Welcome page is displayed. From here,
you can open a feature overview of the elementary activities in the area of ABAP projects, perform tutorials like
cheat sheets, use cases, and code examples, as well as get information about new Eclipse features.
Welcome page that provides further details about working with ADT
What does the Eclipse UI display and where can I found what?
After creating an ABAP project, you are connected with the back end. You can then open and edit a
development object.
● A view such as the Project Explorer to reflect the repository as well as, for example, the Outline or
Properties to display object-specific information
● A source- or form-based editor to display or edit objects
For more information, see ABAP Source Code Editor [page 52]
In the Project Explorer, the whole repository is represented as ABAP repository trees and folders. From here
you can, for example, open or navigate to other development objects. In addition, you can perform functions
from the context menu of a development object.
Some development objects or development scenarios are not yet fully integrated in Eclipse. To handle them,
you can open the integrated SAP GUI.
A perspective is the initial arrangement of views and editors. You can adapt the perspective in order to arrange
it to your current needs. To do this, position the mouse cursor on the tab of a view or editor. Drag it to the
relevant new position. A green frame will highlight the position where you can drop them.
Tip
You can also move a view or editor outside of the Eclipse application, for example, on a second screen.
To get the default perspective back, choose Window Perspective Reset Perspective... from the menu
bar.
You define the behavior of ADT, for example the ABAP source editors, Project Explorer, ABAP Debugger, and so
on, using the Preferences pages.
For more information, see Setting Configurations and Preferences [page 772]
The fastest way to open a view is using the Quick Access next to the toolbar. Just type in your search string.
When you have focused an input field that provides input help, the lightbulb or "i" decorator is shown. To
display the relevant information for the current position in the tooltip, mouse over the relevant decorator.
Example
The lightbulb decorator displays information about input values, such as using asterisks and so on:
The "i" decorator displays information about possible input features, such as using code completion and so
on:
Example for the "i" decorator when using the ABAP Source Search
This Quick Launch aims to provide you with the compact knowledge you may need when working with ABAP
Development Tools (ADT) during the introductory or training period.
Getting Started...
● To start, create a project from the New ABAP Project menu path. An ABAP project always
represents one system connection. It acts as an intermediary between an ABAP system and the front-end
IDE client.
Tip
To be able to work in multiple ABAP systems in parallel, you only need to create one additional ABAP
project.
More on this:
○ ABAP Projects [page 51]
○ Creating ABAP Projects [page 115]
● Open ABAP Development Objects in your project using Ctrl + Shift + A .
More on this: Searching Development Objects [page 322]
● Browse the contents of a project in the Project Explorer. The root of an ABAP project contains a list of ABAP
packages that are grouped either under the favorites list (Favorite Packages) or the System Library node.
You can find the development objects simply by expanding the package node.
More on this: Browsing Development Objects in the Project Explorer [page 127]
● Add ABAP packages that are relevant for your work to the list of favorites.
More on this: Adding a Favorite Package [page 136]
● To open a development object, starting from the project tree, double-click the corresponding node in the
project.
More on this: Opening Development Objects [page 156]
● Use Link with Editor to synchronize the project structure in the Project Explorer with the editor.
Whenever you change an object in the editor, this object will be selected in the expanded Project Explorer
tree.
● Use the Outline view to display the structure of a development object.
● Search for references to your development object using the Where-Used function ( Ctrl + Shift +
G ).
More on this: Searching Usages (Where-Used) [page 323]
● Open the Quick Outline in the source editor currently opened using Ctrl + O .
More on this: Using Quick Views [page 396]
● Navigate the source code using F3 or Ctrl + Click .
● To navigate between editors, click the back or forward arrow key on the toolbar.
● To switch between the class, its local types, or its ABAP Unit test classes, use the bottom tabs of the class
editor.
● Press F2 to display the signature of a class or method.
● Activate one or multiple development objects using the corresponding icons in the toolbar.
More on this: Activation [page 65]
● Compare source code objects, even across different ABAP systems, using the Compare with function in
the context menu of the editor or Project Explorer.
More on this: Comparing Source Code [page 218]
● Run ABAP Unit tests for one or multiple development objects using the context menu Run As ABAP
Unit Test in the editor or Project Explorer.
More on this: Launching ABAP Unit Tests [page 610]
● ABAP Unit test results are displayed automatically for you in the ABAP Unit Runner view.
More on this: Evaluating ABAP Unit Test Results [page 628]
Run ABAP programs or test environment for classes or function modules using the context menu Run As
ABAP Application in the Project Explorer or by pressing F8.
If a runtime error occurs in a program that you have started, the IDE will alert you to an ABAP feed with a small
window. However, you can also subscribe to an ABAP feed from the ABAP repository. To subscribe to an
additional ABAP feed, press Ctrl + 3 and select Feed Reader.
● The Welcome page Help Welcome provides a standardized set of pages that introduce the ABAP
Development Tools to new users.
● To access the complete reference user guide in the context of standard ABAP development, choose Help
Contents ABAP Development User Guide .
● Press F1 to request context-sensitive help for a given tool or UI component.
● The cheat sheets Help Cheat Sheets... provided will guide you interactively through some
essential tasks.
More on this: Basic Tutorials [page 18]
To configure Eclipse for using a screen reader, bigger fonts, higher contrasts
Development Objects
Shortcut Description
Ctrl + S Save
Ctrl + F2 Check
Ctrl + F3 Activate
Navigation
Shortcut Description
This topic aims to provide you with the introductory knowledge material that you may need when working with
ABAP Development Tools (ADT) the first time.
Learn how to use ADT by stepping through the interactive tutorials available:
Development objects are the individual parts that are used to build an ABAP application.
The AS ABAP stores the development objects in a repository. For this reason, they are also called repository
objects. When the user activates the development objects, the system generates a corresponding runtime
version of these objects. The runtime objects are also stored in the repository.
ABAP packages are used to group development objects into units that belong together semantically. In
addition to organizing the development objects, packages also take care of the link-up of the development
objects to the software logistics.
In the ABAP Repository, some of the objects have subobjects. Classes are main objects and have methods as
subobjects. Function groups are divided in the function modules.
A main development object is uniquely determined by the specification of its name and object type whereas for
the specification of a subobject the name and type of the main object is required in addition.
Related Information
ABAP Development Tools is the Eclipse-based development environment for ABAP. They are characterized by
the same look and feel and the same navigation behavior that is typical for the Eclipse Workbench. Some
examples of such native Eclipse tools are different variants of ABAP Source Code editors, editors for ABAP
Not all ABAP development tools that are available in the new development environment are integrated into
the native Eclipse environment. Some ABAP tools are made available in the new IDE through the SAP GUI,
which is installed locally together with the Eclipse-based client. GUI-based tools represent, in the broadest
sense, the tools and utilities of the traditional GUI-based ABAP Workbench. Typical example is SAP GUI-based
UIs with ABAP Dynpro. The particular strength of the integration of these tools is that navigation between
Eclipse and SAP GUI is normally seamless.
During the course of being processed within the ABAP Development Tools, a development object takes on
various statuses.
The following figure shows the different statuses, depending on the user action involved:
Icon/Decorator Meaning
Related Information
A source code unit comprises a coherent source-code part of an ABAP development object that is output to an
editor window. Certain functions within the ABAP Development Tools can only be used within one and the same
source code unit. For example, changes in variable names only take effect for occurrences within the same
source code unit.
The entire source code of a development object can even be divided across several source code units. This is
the case, for example, with global ABAP classes where the different source code units are spread across the
respective editor tabs. In this way, the definition and implementation part of a class forms a single source code
unit and is output under the Global Class tab. Local definitions and test classes that belong to the class define
their own source codes, respectively.
Another example can be seen in function groups. Each individual include of a function group as well as the
function group itself form precisely one source code unit in each case.
Related Information
Function modules allow you to encapsulate and reuse global functions in an ABAP system.
You can create, display, test, and administer the following development objects in the ABAP Development Tool
(ADT):
● ABAP function group: Container for grouping and to defining the interface of function modules with
similar or complementary functions
● ABAP function module: Procedures with interfaces that allow the reuse of functions within other
programs
● ABAP function group include: Container for grouping other units – for example, subroutines, PAI, PBO
modules, local class declarations, event blocks, etc.
The following chapters inform you about the differences for editing function modules in the Function Builder
of the SAP GUI based Workbench (SE37) and ADT.
The editor generates a synthetic view of a function module. The function module will be displayed as one
source code unit. The content set is displayed as the Definition Part [page 23] and Implementation Part [page
25] in the editor, retrieved from the back end.
Related Information
The definition part declares the parameters of a function module. It starts with FUNCTION < func_name >
and ends with a period after the last declaration.
Note
You must define a type for each parameter. Otherwise the meaning is not clear.
When you open an existing function module, the system checks if the type of an IMPORTING, EXPORTING, or
CHANGING parameter has been declared in the back end. If this is not the case, the editor automatically assigns
the addition TYPE ANY to the parameter. For table parameters without a type, the editor adds the addition
TYPE STANDARD TABLE.
For both untyped parameters, the ##ADT_PARAMETER_UNTYPED pragma is added to the definition.
That is, the system does not explicitly add TYPE ANY or TYPE STANDARD in transaction SE37.
Note
Global, untyped parameters are supported with SAP NetWeaver 7.5 SP00. So,2054349 is obsolete in
these releases.
Example
The following example shows a definition part that starts with FUNCTION and ends after the last parameter
declaration with a period. You can also see how TYPE ANY has been added to the exporting parameter
EX_PARAM_3. The table parameter TAB_PARAM_2 was not assigned a type and will be changed to TYPE
STANDARD TABLE.
FUNCTION MY_FUNCTION_MODULE
IMPORTING
VALUE(IM_PARAM_1) TYPE STRING OPTIONAL
VALUE(IM_PARAM_2) TYPE I DEFAULT 42
IM_PARAM_3 TYPE STRING
EXPORTING
EX_PARAM_1 TYPE REF TO STRING
EX_PARAM_2 TYPE ANY
VALUE(EX_PARAM_3) TYPE ANY
VALUE(EX_PARAM_4) TYPE ANY
CHANGING
CH_PARAM_1 TYPE STRING
VALUE(CH_PARAM_2) LIKE TADIR
TABLES
TAB_PARAM_1 LIKE TAB LINE
TAB_PARAM_2 TYPE STANDARD TABLE
EXCEPTIONS
EXCEPTIONS_1.
Limitations
The ADT source code-based view of a function module is not persisted in the database in the back end. This
leads to the following limitations:
● You cannot add or save any comments in the definition part. They will be lost after activation.
● After activation, since the source code is rebuilt from the persisted components in the back end, the pretty
printer will convert the definition part into upper case letters.
Related Information
The implementation part of a function module contains the functionality of the function module and ends with
the statement ENDFUNCTION..
When you open a function module in the ABAP source code editor, there can be empty lines between the
definition part and the implementation part. The reason for this is that the editor automatically adapts the first
implementation line. The position is important for the navigation services, the syntax check, and the position of
error markers.
So that it is the same line both in the ABAP source code editor and in the Function Builder of the ABAP
Workbench.
Example
Display of the first line of the implementation part in the Function Builder (SE 80)
Related Information
Development objects and their elements can be documented with short and long texts.
Short texts are available for the following elements among others:
● Function modules
○ Parameters
● Global classes and interfaces
○ Methods
○ Parameters
○ Attributes
○ Types
○ Constants
○ Events
Short texts are stored as metadata in the corresponding function module, class, or interface pool.
These texts are visible in several locations and are sometimes also editable.
Whenever a short text is changed, the change is reflected in all locations where the short text is visible.
If you create or change short texts, the changes are saved and synchronized on the back end.
1 Creation Wizard
In the creation wizard, you can fill in a Description for the object you want to create.
2 Source Code
If you edit the short texts in the Editor of the CDS objects or source-based DDIC objects, the changes are
updated automatically in the Properties view.
ABAP Objects
The short texts in ABAP Docs are not visible by default, unless they were created there. Otherwise they have to
be generated using quick fixes or explicit synchronization features.
ABAP Doc can also be seen as the source code-based option for writing short texts.
The short texts for main objects can be edited in the Properties view if you are logged on in the master language
of the object.
4 Element Information
Element Information displays short texts, but only if no ABAPdoc comment exists. If an ABAPdoc comment
exists, then this replaces an existing short text, even if the 'short text synchronized' tag is not used.
However, if the short text is added to ABAPdoc by using the 'short text' tag or the 'short text synchronized' tag,
the short text is also shown in the Element Information.
5 Outline View
The short texts for objects and their parts are displayed in the Outline view and in Project Explorer.
6 Further Tools
Further tools like abapGit that allow you to read or write ABAP short texts.
Related Information
Related Information
ABAP Doc enables you to document classes, interfaces, and function modules as ABAP Doc comments. These
comments consist of one or more comment lines, prefixed by "!.
In the source code editor, they can be placed in an empty line directly in front of a declarative statement. You
can document both globally available artifacts (such as classes, interfaces, their methods, attributes, or
method parameter) and local artifacts (such as variables and field-symbols).
If for an object, both ABAP Doc Comment and ABAP Short Text exist and they are not synchronized, ABAP Doc
Comment is displayed in the Element Info.
ABAP Doc Comment in the ABAP Editor and in the Element Info
The figure shows ABAP Doc Comments for the method climb. If you press F2 on the method name, the
information of the method and its documentation is displayed in the Element Info popup.
The source code editor verifies the position and the content structure of ABAP Doc comments when you
execute the ABAP syntax check. So, if comments are added at the wrong position or contain incorrect syntax,
a warning is displayed in the Problems view.
Related Information
Knowledge transfer documents contain documentation of development objects and their elements. It is based
on markdown language with plain text formatting syntax.
In the knowledge transfer document, you can create documentation for every element of the object
individually.
The figure shows an abstract example of a hierarchically structured documented development object (DDO)
with an already existing knowledge transfer document (KTD). Some of the elements are documented, while
one element has no documentation (gray).
Create
The KTD must be created in the same package as the referenced DDO. The name of the KTD is freely
selectable.
If the package assignment [page 191] of the DDO is changed, the package assignment of the KTD is changed
as well.
Copy
When copying a DDO, the associated KTD is not copied automatically. It is not possible to copy a KTD.
Transport
When transporting a DDO, the associated KTD is not transported automatically. You can transport DDO and
KTD both together and separately.
Translate
KTD texts can be translated. The texts in all languages are stored inside one KTD.
Delete
Related Information
The following tables give you an overview of the general formatting options and how to format links.
This text contains **bold elements** This text contains bold elements
This text contains *italic elements* This text contains italic elements
This text contains `inline code` This text contains inline code
```
* first item
first item
* second item
second item
<www.help.sap.com> www.help.sap.com
<cl_plane> cl_plane
Note
To display a character that would otherwise be used to format the text, add a backslash \ in front of the
character.
You can link to the following development objects and their elements:
Related Information
A development object is an element in itself. Development objects may have subobjects, which are elements as
well. These subelements may have further subelements. Each element has a name and a type and may have
further properties. Each subelement has a parent element. Elements may be related to other elements. An
element may have a short text and/or a long text.
Element Info provides all this information for a selected element. It is available for the following object types
and their subobjects.
● ABAP Dictionary (domains, data elements, structures, database tables, table types)
● Core Data Services (CDS views, behavior definitions)
● Source Library (classes, interfaces, function modules)
Examples
Related Information
The Relation Explorer helps you to understand how the objects are related to each other.
In general, ABAP repository objects are related to each other in many ways. The objects, together with their
relations, build networks. For any object, the Relation Explorer determines related objects and displays them as
a tree. The object you start with is called entry object.
Depending on the kind of relations you are interested in, this might only be a subset of the related objects. By
selecting a certain context, you can concentrate on one of those subsets.
In the following example, class CL_RE_CAR is used as an entry object, which is displayed in the context Used
Objects. As a result, you can see related objects that are used by the entry object.
Additionally, you might be interested in objects that use the entry object. Therefore, switch to the Using Objects
context.
Contexts
Behavior Definitions
CDS Views
Access Controls
Related Information
An ABAP package is a transportable ABAP repository object that groups development objects of an ABAP
system.
Overview
In ABAP Development Tools (ADT), packages form the basic modules of ABAP projects. They are displayed as
ABAP repository tree in the Project Explorer. Each package node can contain subpackages or development
objects as subnodes.
The package hierarchy is represented as a node tree. It represents the technical view of the architecture from
an application or an SAP system.
Example
The following example displays how the hierarchy of an ABAP package might be represented in the Project
Explorer:
Use the functionalities of the ABAP repository trees to adopt the representation of a package to your current
needs.
Packages which contain no development objects within their hierarchy are highlighted with the empty package
icon in the Project Explorer.
Types
Structure package A structure package is the root container of a package hierarchy that defines the
basic architecture of an application.
Note
Structure packages cannot contain any development objects except their
own package interfaces and subpackages.
Main package A main package defines the root container for one or more development pack
ages.
It is used to group functions semantically that share the same system, transport
layer, and customer delivery status.
Note
Main packages cannot contain any further repository objects except its own
package interfaces and subpackages.
Development package A development package groups development objects of the same transport layer
in a self-contained unit.
Note
Development packages can contain any number of repository objects, but
each one can only be assigned to one development package.
Features
Components
An SAP product consists of a delivery unit and product unit which consist of a set of single packages. Such a
set of functions forms a software component that represents a view on software logistics. A package or
development object is assigned to a software component through its superpackage or when you assign it
manually.
SAP's development objects belong to packages that are assigned to an SAP-internal application component.
Related Information
With package interfaces you can encapsulate your packages and hide objects that should not be used from
other packages. Objects that should be used from outside can be added to a package interface.
Other packages that need to use these objects can declare use access to the particular package interface to
get allowance to use the exposed objects.
The package check validates the actual uses of objects against the package interfaces and use accesses and
reports violations.
You can create and edit package interfaces from the context menu of the relevant package node using the
integrated SAP GUI.
Related Information
An ABAP repository tree is a container that represents a predefined structure of development objects in the
Project Browser. It consists of ABAP repository folders. Each folder contains one or more development objects.
Note
ABAP repository trees and folders are supported since SAP NetWeaver AS for ABAP 7.51 innovation
package SP00.
For simplification, ABAP repository trees and folders are called trees and folders in this documentation.
Overview
● Local Objects ($TMP): Contains your local objects – sorted by owner and object type.
● System Library: Contains all development objects of the whole ABAP system – sorted by ABAP package
and object type.
● Favorite Packages: Contains a predefined list of ABAP packages – sorted by ABAP package and object type.
● Favorite Objects: Contains added by user.
● Object counters that inform you how many objects are contained in a specific folder
● Short texts for each development object (including ABAP packages)
Note
To hide this information, deselect the Display object counters and Display short description of
development objects checkboxes on the Preferences ABAP Development Project Explorer
preferences page.
● Link the content of trees and folders with the source code editor. Therefore, Link with Editor has to be
enabled. Then, the selection automatically navigates to the position where the currently opened
development object is located in the tree. In this special case, you can also load the full content if only a
limited selection is displayed.
● Visualize the distribution of the containing development objects from a tree in a chart. This enables you to
get an impression, for example, in which year most of the development objects have been created, and so
on.
You can create, adjust, and delete these trees or even create new ones from scratch to display favorite content
of the ABAP repository in the Project Explorer. For this reason, you can define your own tree structure by
configuring the so-called tree levels such as the creation year, object types, user who created an development
object, and so on.
1. For each ABAP project through the configuration wizard from the context menu of the Project Explorer.
2. On base of templates that contain a predefined filter set.
3. By deriving from an existing one, for example, through duplicating the relevant tree.
You can adjust the total set of objects to be displayed in the tree through refining the filters to your new needs.
You can do this, for example, by adding a package to the Favorite Packages tree.
You can also change its structuring. You can do this, for example, by adding the Creation Year tree level to the
Local Objects ($TMP) tree.
You can use the following properties to change the structuring/filtering of a tree and/or folder:
Name Description
Related Information
ABAP search describes all functions that are provided for performing a search in an ABAP system in all of the
back end you work with.
● ABAP Source Search: Full text search inside the ABAP source code of the entire system.
● ABAP Development Object Search: Search for development objects on the basis of the corresponding
name.
Note
Alternatively, you can search for a development object using the shortcut Ctrl Shift A.
Note
In addition, Eclipse provides search functions that are not ABAP-specific, such as the Task Search, and so
on. Use the ABAP search functions to detect ABAP content. The Eclipse file search results may be
incomplete.
The where-used function enables you to determine the development objects that use a specific object, thereby
making the dependencies between the development objects clear.
Related Information
3.4.4.1.1 Availability
You can start the where-used function from the following locations:
● Project Explorer
● Outline
● Source code editor
● Another where-used result
● Main ABAP development objects, such as function groups or global ABAP classes
● Subobjects, such as attributes, messages, function modules as part of a function group, or class methods
as part of a class, and so on
Note
The improvements in the Where-used view like the general and filter functionalities from the toolbar and
context menu are provided for SAP NetWeaver 7.3 EHP1 SP14 and higher as well as ReleaseSAP NetWeaver
7.4 SP08 and higher.
You can trigger the where-used function in any of the following ways:
The findings of a where-used search are displayed in a hierarchical tree in the Search view. They represent the
relationships between development objects and their elements.
In addition, on the first level you will also see the number of matches and the objects where a match was found.
Note
The number of related objects is automatically evaluated and displayed. ABAP Development Tools (ADT)
displays a question mark as placeholder for the number of matches for those levels you have not selected
thus far. The reason for this is that evaluating the number of matches is time-consuming. To evaluate and
display this number, select Expand Tree from the context menu of the relevant subtree.
From the integrated toolbar in the Search view, you can do the following:
If you hover a finding, a tooltip is displayed that provides you with further information.
In addition, variables with write or read-only access are highlighted with a colored background.
The color settings can be defined in the Window Preferences General Editors Text Editors
Annotations preferences.
You can open the filter dialog from the integrated toolbar in the Search view to limit the search.
Note
Use Ctrl + Space to open the Content Assist in order to consider existing entries.
● Package(s): Select the main ABAP package or specific subpackages in which you want to search.
● Object Type(s): Select one or more development object(s), like ABAP classes, ABAP interfaces, and so on,
that are relevant for you.
● Responsible User(s): Select one or more users that are involved in your project and might have created or
edited the relevant development object(s).
● Code Category: Select one of the following categories to define the code area you want to investigate:
○ Production and Test Code
○ Production Code Only
○ Test Code Only
● Exclude Indirect References: By default, the where-used result also contains indirect usages. Perform a
selection in order to minimize the number of results that relate to components like structures, and so on,
or ABAP classes.
Note
When you search for a structure, for example, you will get:
○ Direct usages: DATA: speed TYPE zmg_speed.
○ Component usages: speed-value = 50. “value is a field of the searched
structure
○ Other indirect usages: drive( speed ). “speed is typed with the searched
structure
You can exclude the indirect matches by selecting the Exclude indirect usages checkbox.
You can run an ABAP unit test or search for another usage from the context menu of a development object or
its elements that are displayed in the search results.
The ABAP Type Hierarchy view displays the inheritance tree of a selected ABAP class or interface.
In the case of classes, it lists the superclass(es) and subclasses of a given class that are located in the relevant
ABAP backend system (which is associated with the chosen ABAP project).
Related Information
If an ABAP program encounters a runtime error (because of an uncaught exception, an exit message, or a failed
assertion), the program writes a short dump to document the runtime error and help in its analysis.
Definition
● well-structured information for localizing and understanding a runtime error, including a textual description
of the error and its likely cause
● an excerpt showing the location of the error in the source code
● tables of variables and their values,
● and more.
Use
If a runtime error occurs, then the ADT alerts you of the runtime error in a small dialog window. From this
dialog, you can navigate to the ABAP Runtime Error viewer or display the last state of the terminated process in
the post-mortem ABAP Debugger.
You can subscribe to an ABAP feed of the runtime errors. In the Feed Reader view, two entries for runtime
errors are added by default. These are runtime errors caused by you and runtime errors for objects you are
responsible for.
You can add new feed queries and edit feeds [page 769] by defining filter conditions for runtime errors.
Just like any other perspectives in Eclipse, the ABAP perspectives define the initial set and layout of tools
(views and editors) in the Eclipse window and in this way provide a set of functions aimed at accomplishing a
specific type of task. In particular, they work with ABAP development objects that are managed by an ABAP
backend system. When using ABAP perspectives, you always have to establish a system connection that is
managed by a corresponding ABAP project.
The ABAP development tools contribute the following perspectives to the Eclipse workbench:
ABAP
This (default) perspective is designed for working with arbitrary ABAP development objects that the user can
access by means of ABAP projects.
It consists of an editor area, where the various (ABAP) source code editors are placed, and the following views:
● Project Explorer
● Outline [page 81]
● ABAP Unit
● Search [page 323]
● Problems
● Relation Explorer [page 37]
● Templates
Debug
This perspective allows you to manage the debugging of ABAP development objects. It consists of the following
views:
● Debug
● Breakpoints
ABAP Profiling
This is a perspective designed for analyzing ABAP statements and performance with the ABAP trace
functionality. It consists of the following views:
● Project Explorer
● ABAP Traces
● ABAP Trace Requests
Related Information
ABAP profiling lets you analyze the runtime behavior of an ABAP program.
The ABAP Trace has been integrated completely into the ABAP Developer Tools (ADT).
The ABAP Trace shows you where runtime is being consumed, and where effort for refactoring and
optimization can best be applied. The ABAP Trace also lets you analyze and understand program flow, useful
when you are trying to understand a problem or learn about code you must analyze or maintain.
Related Information
An ABAP project plays a mediating role between an ABAP back-end system and ABAP Development Tools
(ADT), and it provides a framework for creating, processing, and testing development objects.
● Project name
● System data This includes specifications of the system ID, client, user, and password.
● Default language ABAP project-specific preference for predefining the original language of the
development objects that are created as well as the language of the messages and UI texts.
Note
● [Optional:] List of the ABAP packages that are listed as favorites within the project.
ABAP projects form a part of a user-specific workspace. They thus define the starting point for all development
activities within ADT. Several ABAP projects are contained in a workspace. This means that the ABAP developer
can work on multiple ABAP systems in one and the same Eclipse IDE session without having to leave the
immediate work environment. This can be very useful whenever, for example, the status of development
objects from the original development system is to be compared with the status in the consolidation system.
ABAP projects can only be processed if there is an existing system connection (to the ABAP back end). It is
therefore not possible to have read or write access to the content of an ABAP project in offline mode. The
connection data for an ABAP system is stored in the workspace.
The structure of an ABAP project is usually displayed in the Project Explorer. The root of an ABAP project
contains a list of ABAP packages, which are itemized either under the favorites list (as Favorite Packages) or the
System Library node.
Depending on whether you have modified the existing system connection, the following project variants are
created and displayed in the Project Explorer:
1. If you have used the existing system connection: The project references a system connection in the SAP
Logon. A decorator is then added to the project icon that reflects the connection to the SAP Logon.
2. If you have modified the existing system connection: The project is independent from the SAP logon.
The project is added without a decorator .
Related Information
An ABAP editor enables you to create and edit ABAP repository objects using ABAP Development Tools (ADT).
● ABAP Source Code Editor [page 52] to work with ABAP source code
● ABAP Package Editor [page 56] to work with non-ABAP source-based development objects
● ABAP Dictionary Editors [page 59] to develop or edit source-based or form-based ABAP Dictionary
objects
● Other editors, such as:
○ Messages and Message Classes [page 62]
○ Transformation Editor [page 64]
The ABAP source code editor is provided for developing or editing ABAP source code using ABAP Development
Tools.
The ABAP source code editor corresponds to the ABAP editors in SAP GUI, such as the Program Editor
(SE38), Function Builder (SE37), and the source code-based Class Builder (SE24).
The ABAP source code editor is based on the Eclipse standard text editor and its functionalities have been
broadened for programming ABAP source code.
You can open an editor, for example, by double-clicking a development object from the tree in the Project
Explorer or from a search result list.
The following screenshot provides an overview of the UI elements that might be displayed in an ABAP
source code editor:
Related Information
ABAP code templates are structured descriptions of coding patterns that can be used in the ABAP source
code.
Code templates help the developer to reduce the time spent on routine editing activities and improve
consistency when writing code. They allow for quick generation of commonly used ABAP code, as well as easy
customization. ABAP code templates go beyond the functionality of simple code snippets. They include direct
integration with code completion, the ability to use predefined and custom variables, and the ability to improve
style uniformity and validity of ABAP code. When using code snippets, you basically get a shell that you can
insert and edit manually.
ABAP Development Tools provides a number of predefined code templates for ABAP. In addition, you can
create your own templates or edit existing ones.
You can open and display ABAP code templates in the Templates view. To open it, choose Window Show
View Templates from the menu.
You can view, edit, or create new ABAP code templates using the ABAP Development Source Code Editor
Templates preferences page.
A common coding pattern in ABAP is to iterate over the rows of an internal table using a loop that reads the
internal table in a loop, where each row is assigned to a field symbol. By using a template for this pattern, you
can avoid typing in the complete code for the loop. Invoking code assist after typing the word loop will present
you with a list of possible loop templates. Selecting this template will insert the code into the editor and
position your cursor so that you can edit the details.
Inserted code in the ABAP Source Editor when using the loopAtAssign template
Related Information
ABAP code templates can be as simple as a string, but, in general, they contain multiple combinations of string
elements and variables. The variables can insert elements in your code such as the current date and time up to
the name of the system or the logged on user. However, the most useful feature of variables in templates is the
ability to create custom variables. These custom variables act as placeholders in your template for which you
provide the values when you insert the template.
Variable Description
Variable Description
As of SAP NetWeaver AS for ABAP 7.52 SP00, you can create and edit ABAP packages in a form-based
editor in ABAP Development Tools (ADT).
Overview Subtap
The editor is a multi-page editor. It displays the following information in the Overview editor tab by default:
1. The Toolbar contains actions, such as checking the package for all objects, opening packages in another
ABAP project, and sharing ADT links.
2. General Data displays the application component, the responsible system user, and the language version.
As a default, new objects get a language version of the package where they have been created.
Note
To edit the description or to display further general data, open the Properties view.
The package breadcrumb and application component are only provided if your ABAP system is
connected with an SAP HANA database.
Use Accesses
This editor tab displays the package interface(s) that are used for the selected package, nested within the
package hierarchy, or visible in the selected package. Here you will also find details about the severity for each
package interface.
Example of an Use Accesses editor tab where the used package interfaces are listed
From the toolbar in the editor tab, you can add package interfaces at the beginning or end of the list. In
addition, you can delete entries from the list.
For each package interface, you can define the following severity values for the package check:
● No Response
● Error
● Warning
● Information
● Obsolete
If you use the same package interfaces several times within the package hierarchy, the one with the supremely
severity will then be considered.
Package Interfaces
This editor tab displays all package interfaces which have been created for the selected package.
Subpackages
This editor tab lists all subpackages that are added beneath the main packages.
Note
To create a new subpackage, choose New from the context menu of the relevant node in the Project
Explorer.
To display the Package Hierarchy, check the node structure in the Project Explorer.
Related Information
The ABAP Dictionary editors are provided for developing or editing classic objects of ABAP Dictionary in ABAP
Development Tools (ADT).
The following table provides you an overview of the objects, which can be edited in ADT:
Data Elements
SAP NetWeaver 7.5 SP00
Domains
SAP NetWeaver AS for ABAP 7.51 innovation package
SP01
Structures
SAP NetWeaver 7.5 SP00
Table Types
Application Server ABAP 7.54 SP00
Database Tables
SAP NetWeaver AS for ABAP 7.52 SP00
Views
Lock Objects
Application Server ABAP 7.53 SP00
Search Helps
Type Groups
SAP NetWeaver 7.4
Source-based editors
The programming language of the source code is similar to the DDL of ABAP CDS, where metadata is defined
using annotations and technical properties (for example, fields or components) are defined in SQL. The source
code is generated when it is read from the database. When you save or activate a structure or a database table,
the source code is converted to the existing persistence. The source code represents the metadata of the
database table, but it is not a transport object itself.
Underneath the editor saves the definition in ABAP Dictionary. This means that any individual formatting of the
source code is overwritten after saving.
The enhancement marker in the ruler before the define statement informs you that customizing includes
or append structures are included. Hover the marker, to open a popup that displays the enhancements. To
navigate to an enhancement, select the linked object name in the popup.
Database tables are persisted as metadata and represented as source code in the source-based editor. A
database table consists of its name and fields. One or more fields build the table key, which is mandatory.
Database Table Annotations [page 825] are used to provide additional information for the entire table and
individual fields.
Note
To edit technical settings (data class, size category, buffering, and storage type) or to create/edit indexes,
open the integrated SAP GUI.
Form-based editors
Currently, the remaining classic objects in ABAP Dictionary, such as database views, and so on, can be opened
and edited in the integrated SAP GUI.
Related Information
Code templates help you to reduce the time spent on routine editing activities and improve consistency when
writing code.
Since SAP NetWeaver 7.5 SP00, you can add code templates to structures and tables in ABAP Development
Tools (ADT).
As in the ABAP source code editor, you can add code snippets with specific syntax like a development object,
annotation, or component at the current cursor position in the ABAP Dictionary editor. After adding, you need
to adapt the placeholders with variables, elements, lengths, decimals, and so on.
You can add code templates, for example, through code completion ( Ctrl + Space ).
Note
For further details about the variables used in the corresponding code templates, see Related Information.
Related Information
You can create and group messages in message classes in order to inform the user about an error or a status,
or to issue a warning.
Messages
Messages notify a user about unexpected behavior, an error, a status, or a result of an action. An application
will display the message at runtime – for example, in a dialog box or in the status bar.
A message is specified by a unique 3-digit message number, a single-digit language key, text information, and a
message class.
Message Classes
Message classes are created within an ABAP project at the ABAP package level. They are used to group
messages within a development object. So, you can combine related messages and reuse them in other
programs. After creating a message class, you add the individual message(s).
Example
The message with the number 045 contains the placeholder for a parameter. The placeholder "&" stands for
the value of the parameter "carrid". In ABAP programs, messages are called using the MESSAGE statement.
This example of MESSAGE statement MESSAGE i045(SABAP_DOCU) WITH carrid contains the following
elements:
A message type determines how program execution is handled after the message has been raised.
S Status The program continues nor Status line of the next screen
mally after the MESSAGE
statement.
Related Information
The development objects created there are called simple transformations (ST) and XSL transformations. They
are stored in the Repository, and linked to the Transport Organizer. ST is an SAP programming language used
for describing transformations between ABAP data and XML formats. XSL transformations transform XML to
XML.
The Transformation Editor is a tool for defining transformations for XML that are later executed on the
application server. They are displayed and edited in XML format.
As of SAP NetWeaver 7.5 SP00, you can, for example, create and edit transformations in their own source-
based XML editor.
Related Information
Recursive Non-Descent (RND) parsing is used for obtaining a descriptively specified parser for the
programming language ABAP.
In the context of ABAP source code development, the RND parser is used for syntax coloring and code
completion. To this end, the definition of the ABAP language is loaded from the ABAP back end.
To define the RND parser, open the context menu from an ABAP project and choose Properties. From the
Properties page, navigate to the ABAP Development Editors Source Code Editors RND Parser
properties page.
Option Description
Open folder This button is used by kernel developers who want to replace the existing .pad
file directly. After you have restarted the client, the syntax coloring of all opened
editors is performed.
Note
A restart itself is not required.
Reload from backend This button is used whenever new ABAP language features are available, such as
ABAP keywords and so on, or if the syntax coloring has changed. In this case, you
need to reload the configuration from the back end.
Reload from client This button is only used in the context of kernel development.
3.10 Activation
A development object (repository object) can exist as an inactive and an active version. When you create a
new development object, it is always available first as an inactive version.
In its inactive form, the development object is saved as a database object and is thus part of the ABAP
Repository of a system. With the activation process you create an active version of a development object, thus
The inactive versions of development objects provide the developers with a separate local view of the
repository and they form the basis for a "local runtime system". Changes to development objects can be
tested within this local system without disturbing the wider development environment.
The main advantage of this is that the development process becomes seamless. For example, it makes it
possible for you to change the interface of a function module without the changes immediately becoming
visible in programs that call it. The changes are only visible system-wide once the development object has been
activated.
When working with ABAP projects, you can apply the activation to:
All inactive objects that belong to an ABAP project are listed in the Worklist of Inactive Objects. This worklist
allows you to create a selection of objects you wish to activate in one single step.
The activation status of development objects affects the following operations and activities:
Operation Description
Run / Execute Executes the runtime object (active version). A runtime ob
ject can only be generated from a syntactically correct active
version.
Related Information
ABAP Unit is a unit-testing framework that is integrated into the ABAP language.
In unit testing, a developer ensures that the correct behavior of the smallest testable units – such as the
methods of classes – of his or her code is verifiable. Unit testing makes it easier to verify quality, to refactor
code, to perform regression testing, and to write tests according to the test-driven development model.
The most important features for writing ABAP unit tests are the following:
● ABAP Unit tests are written in ABAP. You do not have to learn an additional scripting language for testing.
● You write tests with the standard ABAP Development Tools (ADT). You do not have to use additional tools
for developing tests.
● ABAP Unit tests are transported with the ABAP repository objects that they test. They are therefore
available in all of the systems of your development and testing landscape.
The most important features of ABAP Unit for running and evaluating unit tests are these:
● You can run ABAP Unit tests as you develop code. You can launch tests, for example, directly from the
ABAP editor in the ADT.
● Code coverage measurement is integrated into ABAP Unit testing, so that you can verify the thoroughness
of your unit testing and easily find untested code.
● ABAP Unit testing can be automated and is part of mass quality testing.
● Test results are displayed in the ABAP Unit view for easy evaluation and analysis.
● ABAP Unit test methods have no parameters. No special knowledge or test framework is required to run
ABAP tests; they can be run by anyone, and not just by the developer.
● ABAP Unit tests cannot be executed in productively used ABAP systems.
Related Information
The ABAP Test Cockpit (ATC) is the main ABAP tool for quality assurance.
Using the ATC, you can check your ABAP development objects for many types of problems, including syntax
errors, potential problems in performance, sub-optimal or potentially faulty programming, adherence to
standards, errors in ABAP Unit testing, and many others.
Here are the main features of the ATC for developers working in the ABAP Development Tools (ADT):
● Local quality check of your ABAP development objects directly in your development environment, starting
from Project Explorer or the ABAP source editor
● Display of ATC findings, finding-specific details, and help directly in the ATC Problems view
● Notification of high-priority ATC findings from central ATC quality checks through an ABAP feed
● Display of complete central ATC results originating from mass regression check runs in your quality system
in a specific ATC Result Browser view
● Tool integration for handling exemptions for ATC findings.
The ATC reports problems as findings, messages that describe the problem. Findings have a priority, whereby
errors and warnings usually indicate a serious problem that needs to be corrected quickly. All findings offer
context-sensitive help, which includes details of each finding that may not appear in the finding messages
themselves.
In ADT, you can use the ATC to check your development objects as you work, directly from the Project Explorer
or the ABAP source editor. In this case, the findings are for your own use.
Your quality manager can use the ATC to run central "official" quality checks, usually in your integration or
consolidation system. You can see your errors and warnings from the active central ATC runs with an ABAP
feed.
You usually need to clear central ATC findings by correcting your objects with ADT in your development system,
and then transporting the changes to the integration and consolidation systems, or wherever central ATC
testing takes place. Should you not be able to clear an "official" ATC finding, you can request an ATC exemption
that has to be approved by the quality manager. An exemption suppresses an ATC finding either temporarily or
permanently.
The ATC Result Browser view is provided for requesting exemptions and for working with the complete set of
ATC findings in central ATC runs. Quality managers can set up the ATC so that findings from central runs are
replicated to development systems. The ATC can also be set up to let you request central exemptions from the
ATC Result Browser in your development system.
When ABAP encounters an active breakpoint, ABAP Development Tools (ADT) opens the Debug perspective in
the IDE. Depending on how you have adjusted the IDE, the Debug perspective may automatically start, or you
may be asked to confirm the start.
This section gives you a quick orientation to the Debug perspective, so that you know what you are seeing.
● The navigation toolbar on top of the Debug perspective lets you control execution in the debugger, stepping
through your code, resuming or canceling execution.
The Debug view also shows you the active call stack. You can click on entries in the call stack to open the
code at that level of the stack. You can then inspect active variables, set breakpoints, or edit your code.
● Variables and Breakpoints on different tabs.
Double-clicking a variable in the source code editor shows you the value and attributes of the variable in
the Variables view.
In the Breakpoints view, you can see the list of active and inactive breakpoints.
Double-click on a breakpoint to jump to its locations in the source code. Mark or unmark a breakpoint to
activate or deactivate it. Any such changes are effective immediately in the current debugging session.
Tip
SAP recommends to restart the debug session after activating changes in the currently executed code.
To do so, terminate or disconnect the debugger and then restart your program.
● The ABAP Internal Table view opens at the bottom of the Debug perspective. Double-clicking on an internal
table opens the table not only in the Variables view but also in the ABAP Internal Table view. You can type an
internal table name directly into the view or find a table in the code that you are debugging.
The ABAP Internal Table view offers you some of the same comfort as the Internal Tables tool of the
ABAP Debugger in SAP GUI. Here and there, you can see and change the content of the internal table, re-
arrange table columns for better display using drag-and-drop, and so on.
Related Information
Breakpoints in the ABAP Development Tools (ADT) are by default external user breakpoints. They are valid:
These breakpoint attributes mean that you can use breakpoints to debug your ABAP code when you start a
program and run it interactively.
You can also use breakpoints to capture in the debugger a program that has been started asynchronously and
without your direct action. You do not necessarily have to run your code interactively from the ADT to debug it.
A program that you want to capture in the debugger does not even have to be started from your current
computer.
For example, you can set a breakpoint in the IDE in ABAP code that handles an HTTP or RFC request. If you
send an HTTP request from an Internet browser to the back end system, then the IDE will open the code in the
debugger when the request processing reaches your breakpoint. It is best to have the code with the breakpoint
open in the IDE editor. But the breakpoint is respected even if you do not have the program with the breakpoint
open in the editor.
You can set a static breakpoint at a particular line of code. The breakpoint sticks to the code line; if you add or
delete code above the line, then the breakpoint relocates along with the code line.
You can also set dynamic breakpoints. These are breakpoints that are triggered when the program that you are
running reaches a particular ABAP statement or exception class.
Dynamic breakpoints take effect for any program that runs under your user. But you can limit their scope to the
scope of the debugger debugger in order to avoid stopping at all different kind of programs that are executed
along the way.
Related Information
3.13.2 Watchpoints
A watchpoint is a conditional breakpoint that is only defined in the ABAP Debugger during a running debug
session. It is one of the runtime utilities provided to stop and debug ABAP programs. When debugging ABAP
code, you can use watchpoints to track the value of individual ABAP variables. The ABAP debugger stops as
soon as the value of a watched variable has changed. Watchpoints help ABAP developers monitor the contents
of specified variables and the change of their values during runtime processing.
● Watchpoints can be created while ABAP Debugger is on and are removed automatically when that debug
session is terminated.
● Logical conditions may be specified for watchpoints. A watchpoint is provided with a relational operator
and comparison field to specify the conditions for interrupting.
● Like Breakpoints, watchpoints may be deleted as needed.
● Once a watchpoint is reached, it is indicated on the program statement and a corresponding alert is given.
Note
Because a watchpoint creates a clone of the specified object, it can negatively impact performance and
memory, especially with large size data objects like internal tables. Watchpoints are ideal for variables of
less size that are active during runtime, but only for a short duration.
You as an ABAP developer might experience a “restricted” debug mode during ABAP debugging. This
restricted mode is called non-exclusive debugging. By default, every new debug session runs in exclusive mode.
Exclusive Mode
Exclusive means that the application that is being analyzed exclusively allocates one work process on the AS
ABAP for a debug session. The allocated work process cannot then be used for other sessions. To ensure that
the server is not completely blocked, there is a limit to how many exclusive debug sessions are possible at the
same time. By default, the limit is half the number of available dialog work processes. On a server with 50
dialog work processes, for example, up to 25 of these can be used for exclusive debugging at the same time.
Tip
To check the maximum number of exclusive debug sessions that can be used in parallel in your ABAP
system, call transaction RZ11 and check profile parameter rdisp/wpdbug_max_no. By default, the value
for this should be half the number of dialog work processes: (max(1, $(rdisp/wp_no_dia)/2)).
Remember
Once the limit is reached, older versions of ADT are not able to start new debug sessions at all. The current
version of the ADT can provide non-exclusive debug sessions in this kind of scenario however. Since non-
exclusive debug sessions do not require an exclusive server work process, their number is theoretically
unlimited.
Non-Exclusive Mode
In non-exclusive debug mode, the system requests a roll-in/roll-out in the application after each debugger
interaction. Therefore, every debug step performs an implicit database commit.
Due to the implicit database commit, you must consider the following effects when debugging in non-exclusive
mode:
● Since implicit commits are changing operations caused by the debugger, only users with debug-change-
authorization can use the non-exclusive debug mode.
Note
For this reason, the non-exclusive mode is not enabled in productive systems. If you experience non-
exclusive debug mode in such systems, ABAP server you are using might be configured incorrectly.
● It is not possible to step through SELECT and ENDSELECT loops because the database cursor needs to be
closed when using an implicit database COMMIT statement. In cases like this, program execution is
terminated by a DBIF_RSQL_INVALID_CURSOR short dump.
● It is not possible to debug Open Cursor or Fetch commands, since the cursor is closed after implicit
database commit.
Note
The non-exclusive debugging mode that is known from the SAP GUI debugger is only available as of SAP
NetWeaver 7.68 / SAP NetWeaver AS for ABAP 7.51 innovation package SP00 or higher.
The ABAP Debugger always tries to open an exclusive debug session. The number of exclusive debugging work
processes is limited however, as otherwise the application server would not respond at all (in case all work
processes were allocated for exclusive debugging).
When you start to debug in ADT, and your session is non-exclusive, you will receive a notification in the form of
a flyer (see figure below). You can ignore this notification however, and just continue working. The flyer will
disappear automatically after a few seconds.
In addition, the description text <Non-exclusive mode: each step results in DB commit> is
displayed for the corresponding debug session in the Debug view.
Text that informs you about the non-exclusive debug mode in the Debug view
You will be informed through a notification flyer in some other situations in the context of non-exclusive debug
mode (and in the case of missing debug authorization):
Non-Exclusive Debug Mode Without Debugging Change Privilege for the Current User
The ABAP Debugger in ABAP Development Tools can satisfy most of your debugging requirements. And it adds
comfort and features to the debugging functionality that you may know from the ABAP Debugger in the back
end ABAP System.
Legend:
Use Case ABAP Debugger in ABAP Development Tools ABAP Debugger in SAP GUI
Setting breakpoints
By default ABAP breakpoints in ABAP Devel
opment Tools are external user breakpoints,
valid across back end servers and valid for RFC
and HTTP requests to the ABAP back end. The
ADT supports both static (line of code) and dy
namic breakpoints.
Setting watchpoints
and conditional
breakpoints
Stepping through
code
Activating layer-
Use the ABAP Debugger in the back end
based debugging
system to define software layers and activate
layer-based debugging. ADT Step Filters can be
used only with Java coding.
Displaying values of
variables
Displaying structures
Display of structures by field is supported,
but the capabilities for customizing the data dis
play of the Structure tool in the back end debug
ger are not offered. Use the back end debugger
if you need to apply a layout to the display of a
structure.
Displaying objects
Structured display of object contents is sup
ported, but the capabilities for customizing the
data display of the Objects tool in the back end
debugger are not offered. Use the back end de
bugger if you need to apply a layout to the dis
play of a structure.
Analyzing memory
Use the ABAP Debugger in the back end
use
system if you need to examine the memory use
of objects in the debugger.
Debugger scripting
Use the ABAP Debugger in the back end
system if you need to automate debugging
tasks with debugger scripts. JavaScript break
point scripts in cannot be used in ABAP coding.
Activating traces
After You may switch on/off the ABAP Pro
filer at defined breakpoints when debugging
your program. More on this: Starting and Stop
ping the ABAP Profiler in the Debugger [page
703]
Perform a database
commit or rollback
Data Preview retrieves, sorts, and filters records available in the ABAP Data Dictionary tables, Views, external
Views, and ABAP DDL sources. Data Preview constructs and executes ABAP SQL queries to perform the
operations listed below:
● Provide a result-set size in the Data Preview tool, which represents the records that the tool can retrieve
from ABAP Dictionary. The default value is 100 and the maximum value is 5000.
● Configure columns to view.
● Sort records in ascending or descending order.
● Set filter criteria. You can set filter criteria for multiple columns.
● Remove filters applied to a column or delete a filter.
● Set local filters to view specific data. Local filters filter the data from the result-set fetched from the ABAP
Dictionary.
Restriction
Data preview does not render properly if you use the dark theme.
Related Information
Logpoints indicate to the ABAP runtime that an ABAP program is to execute a custom action at a certain point
within the program.
When the logpoint is reached during program execution, the logpoint is evaluated. The logpoint evaluation first
checks the condition. If the condition is fulfilled, a log entry is written according to the specified logpoint
parameters.
You can define logpoints by writing the LOG-POINT statement in an ABAP program (static logpoint) or by
setting a dynamic logpoint at a certain location in the source code, without having to modify your source code.
Dynamic logpoints have been introduced in order to support logging in quality or productive systems where the
source code cannot be changed. For example, you have found a location in the source code for which you need
additional monitoring details, or you may be facing a poorly localizable error situation that happens from time
to time in a batch job and cannot be debugged.
● To store variable values in the context of a defined ABAP program line if a certain condition is fulfilled.
● To analyze execution of an individual ABAP SQL statement that you found in SQL Monitor in the context
where a certain condition is fulfilled.
● To view the call stack for a specific ABAP program line where a certain condition is fulfilled.
● To activate SQL tracing for an individual ABAP SQL statement in order to be able to analyze performance
issues in detail.
● To activate table buffer tracing for memory consumption analysis at a dedicated ABAP SQL statement.
● Active logpoints - When an active logpoint is reached during program execution, the logpoint is evaluated.
● Inactive logpoints - Inactive logpoints are ignored during program execution.
Related Information
You can set dynamic logpoints at any source code line that contains an executable ABAP statement. Along with
the dynamic logpoint definition, you can specify logpoint properties such as condition, key definition, and
field values.
The key definition and the field values in dynamic logpoints are quite similar to the SUBKEY and FIELDS
addition of the LOG-POINT ABAP statement (static logpoints). When an active dynamic logpoint has been set
at a certain ABAP source code position, the ABAP runtime evaluates the logpoint whenever the source line is
processed. Logpoint evaluation always takes place before execution of the first ABAP statement in that line.
During evaluation of a logpoint, the ABAP runtime first evaluates the logpoint condition. If the condition is not
fulfilled (value = false), the ABAP runtime skips further evaluation of the logpoint and continues to execute the
ABAP statement. If the logpoint condition is true, then - as a log event - a log entry is written.
Much like with static logpoints, log entries are aggregated by the values found for the key definition.
For example, if the key definition contains the variable <SY-UNAME>, there will be only one log entry for each
user as a result, regardless of how often the individual user requests ran through the logpoint’s source code
location.
During a log event, the content of the variables specified for field values are logged. Aggregated log entries
always contain the variable content of the last log event.
Related Information
Your ABAP system contains source code-based repository objects of the standard SAP software. These objects
can be enhanced by implementing source code plug-ins at predefined positions referred to as enhancement
options. Using these options you change the behavior of a repository object without editing the object itself.
Note
Only the source code plug-ins are covered here. Other enhancement technologies like BAdIs, class
enhancements, or function group enhancements are currently not supported in ADT.
In ABAP Development Tools, the enhancement implementations are displayed in the Project Explorer.
In SAP NetWeaver 7.4 SP5 as well as SAP NetWeaver 7.3 EHP1 SP11 or higher, the following ABAP repository
objects and subobjects can be displayed in ADT:
● Classes
● Class includes
● Programs
● Includes
● Function group main includes
● Function group includes
● Function modules
If the source code is enhanced, this is indicated by the source code plug-in marker . The source code plug-
ins are not directly displayed in the original source code.
Enhancement implementations of the source code plug-in technology can be edited in ADT since AS ABAP
7.53. In earlier releases, the source code plug-ins can be opened in the SAP GUI.
Since AS ABAP 7.54 you can create enhancement implementations and enhancement implementation
elements in the ABAP Development Tools.
Related Information
Use
In ABAP Development Tools (ADT), use the Feeds view to display and read feeds from ABAP Repository or
other native feeds. You can also add or delete a feed.
By default, runtime errors and system messages are displayed in the Feeds view. In addition, feeds from other
components, such as SAP Gateway can be displayed here.
Overview
You can also subscribe to any native feed that is published in Atom or RSS format. In this case however, you
only have to specify the URL that you get from the feed provider.
Once you have subscribed to a feed, ADT refreshs it periodically. You can change the default refresh interval
when you subscribe to the feed.
Related Information
The Outline view displays the internal structure of an ABAP class, interface, or program that is currently
opened in the ABAP source code editor.
In a tree, structuring elements like attributes, data types, methods, and so on are displayed in the order of their
occurrence in the open source code-based development object.
When you select one of the structural elements, the cursor navigates to its relevant source code position. In
addition, you can also filter the display in order to hide:
Related Information
● Particularly for development objects with a more complex structure, the outline provides a good overview
of the internal object structure. Here, you can also avail of the filter functions with which you can display or
hide certain elements in order to achieve a better overview.
● The outline is synchronized with the contents of the source editor. Therefore, when you select an element
in the Outline view, you can navigate quickly to the corresponding position in the ABAP source code.
Note
The outline is synchronized with the contents of the editor, even if the latter are not yet saved. If you
add a new attribute in the class editor, for example, it is immediately shown in the Outline view (without
the editor contents having been saved beforehand).
Main Icons
Icon Description
ABAP class
ABAP interface
Method (public)
Method (protected)
Method (private)
Attribute (public)
Attribute (protected)
Attribute (private)
Type (public)
Type (protected)
Type (private)
Event (public)
Event (protected)
Event (private)
Friend
ABAP program
ABAP include
Subroutine
Global variable
Type
Macro
Function group
Function module
Type group
Decorators
Decorator Description
Static member
Final member
Abstract member
Redefinition
Read-only
c Constant
Constructor
Receiving event
Sending event
Related Information
Quick assists help you to change ABAP source code in a semi-automated way.
ABAP Development Tools (ADT) provides a set of quick assists that can be divided into the following categories:
● ABAP Refactorings [page 86] for changing the structure of source code without changing its behavior
● ABAP Quick Fixes [page 90] for resolving errors and warnings
Various quick assists are neither refactorings nor quick fixes. These are, for example, generating constructors
or creation of text symbols.
All supported transformations are available through the quick fix menu that can be triggered from the Source
menu or through the Ctrl 1 shortcut. As an alternative the Quick Assist view provides a permanent view on
the available quick assists.
The proposals are context-sensitive. This means that, depending on your current source code position,
appropriate proposals are provided.
Many of the quick assist options can be triggered on identifiers from the following types:
Related Information
Refactoring is the structural improvement of source code. The functional behavior of source code is retained.
Your wish to minimize the effort required for error analysis and the need to improve the following items may
prompt you to refactor source code:
● readability
● understandability
● maintenance
● enhancement possibilities
Related Information
In the source code editor of a development object, you can substitute literals with constants. This enables you
to replace a specific, unchanging value that is used several times and to improve the readability of ABAP source
code. However, literals should only be extracted if the abstraction results in a compliant solution.
Note
Example
String Template |Hello { name }!| hello String 'Hello ' or '!'
You can extract constants from a literal using the following refactoring functions:
● Extract a local constant from a literal that is used only in the current method. The new constant definition
is created in the current method. Here all occurrences of the literal are replaced. Extract a member
constant from a literal to define it in the private section of the current ABAP class. Here all occurrences of
the literal are replaced.
● Use an existing constant with the same value as the literal.
Results
When you extract a constant in the source code of a development object, the definition CONSTANTS 'your
name' TYPE <type> VALUE <value> is added. Also, in the development object the corresponding literal is
replaced with the constant.
The name of the generated constant is derived from the literal and automatically generated. These are the
rules for the creation of the constant name:
Finally a pragma (##NO_TEXT) is added in the declaration. Therefore, no translation warnings will be issued by
the ABAP Compiler syntax check.)
Limitations
Related Information
In the source code editor of a development object, you can substitute literals with variables. This enables you to
replace a specific, unchanging value that is used several times or to improve the readability of ABAP source
code. However, literals should only be extracted if the abstraction results in a compliant solution.
Note
Example
'Hello Planet !' 'Hello Planet !' hello_planet String 'Hello Planet !'
String Template |Hello { name }!| hello String 'Hello ' or '!'
Limitations
Functionalities
You can extract variables from a literal using the following refactoring functions:
● Extract a local variable from a literal that is used only in the current method. The new variable definition is
created in the current method. Here all occurrences of the literal are replaced.
Results
When you extract a variable in the source code of a development object, the definition DATA 'your name' TYPE
<type> VALUE <value> is added. Also, in the development object the corresponding literal is replaced with the
variable.
The name of the generated variable is derived from the literal and automatically generated. The following
limitations exist for the creation of the variable name:
Finally, a pragma (##NO_TEXT) is added in the declaration. Therefore, no translation warnings will be issued by
the ABAP Compiler syntax check.
Related Information
Quick fixes enable you to resolve errors and warnings in the ABAP source code through the corresponding
functionality that is provided in the Quick Fix popup.
Related Information
The Quick Assist view supports you when executing refactorings and ABAP quick fixes, or when generating
ABAP source code.
It interacts directly with the ABAP source code editor. At every position where a quick assist can be applied, the
content of the Quick Assist view is therefore automatically updated according to the selection made.
As an alternative to the Quick Fix (Ctrl 1) menu, the Quick Assist view (Ctrl Shift 1) provides a
permanent view of the available quick assists.
The layout of the Quick Assist view is divided into the following areas:
● Proposal overview. This provides a list of possible quick assists at the current cursor position in the source
code editor.
● Description per proposal This provides details about the operating steps of the quick assist that you can
do next.
Note
The display depends on the entry that you have selected in the Proposal overview.
● Previous Result Displaying the changes performed by the recently applied quick assist. If the quick assist
cannot be applied, an error message is displayed.
Note
To open the Quick Assist view, choose Window Show view Other... from the menu. In the Show view
dialog, select Quick Assist from the ABAP tree.
Example
Before Execution
You get an error message as the method drive is not implemented yet. When you select the method name,
the possible quick assists are displayed in the Proposals area. If you select one of these, additional information
is displayed in the area below.
After Execution
After double-clicking the proposal or selecting Apply Proposal from the context menu, the method definition is
moved to the private section of the ABAP class.
The tree in the Proposals area is updated to the quick assists that are now available at the selected cursor
position.
If the quick assist is applied without any errors, the Previous Result area is highlighted in green for two seconds.
Here, also the status with the last execution date and the insertion result of the performed changes are now
displayed. You can navigate from here directly to the positions where changes have been performed in the
source code editor.
Related Information
In ABAP Development Tools, you can apply the following refactoring options or ABAP quick fix at the following
positions:
Note
Related Information
3.19.4.1 Methods
Function Description
Extracting Methods from Statements [page Creating a new method in the current class. The selected code is moved
407] into the body of the new method and replaced with a call to the new
method. Further occurrences of similar code are not replaced.
Extracting Methods from Expressions [page Creating a new method in the implementation of an ABAP class that re
410] turns the result of a selected expression. The selected expression is re
placed with the call to the new method. Further occurrences of similar ex
pressions are not replaced.
Creating Method Implementations from the Creating an empty method implementation from an existing declaration in
Method Definition [page 468] an ABAP class.
Creating Method Definitions from Implemen Creating empty method implementations of the methods defined in an im
tation Parts [page 470] plemented ABAP interface and of other unimplemented methods within an
ABAP class.
Creating Implementation Parts for Unimple Promoting the implementation part of methods that are defined in an
mented Methods [page 472] ABAP interface as well as method stubs of other unimplemented methods.
Creating Methods from Method Calls [page Creating a method from the method call. The signature is derived from the
478] existing method call.
Generating Class Constructor Methods [page Creating an empty class constructor method in the public section
487] of the current ABAP class.
Generating Constructor Methods [page 488] Creating a constructor in the public section of the current ABAP class.
Note
If the class has attributes, a dialog is opened where you can select the
attributes that should be instantiated by the constructor.
Generating Factory Methods [page 489] Creating a static create method in the public section of the current
ABAP class.
Note
If the class has attributes, a dialog is opened where you can select the
attributes that should be instantiated by the factory method.
3.19.4.2 Constants
Function Description
Extracting Constants from Literals [page 413] Creating a constant with the value of the literal and replacing all occur
rences.
Reusing Existing Constants [page 415] Replacing a literal with an existing constant. All other occurrences of the
same literals are not changed.
Converting Locals to Class Members [page Converting a local constant, local variable, or local type to a class member
420] such as a member constant, attribute, or member type.
3.19.4.3 Variables
Function Description
Extracting Local Variables from Expressions Assigning the selected expression to a new local variable. The selected ex
[page 418] pression is replaced with the new local variable.
Assigning a Statement to a New Variable Assigning the value of the selected statement to a new local variable or at
[page 424] tribute.
Converting Locals to Class Members [page Converting a local constant, local variable, or local type to a class member
420] such as a member constant, attribute, or member type of the current
class.
Converting Local Variables to Parameters In a certain method, converting an existing local variable to a new parame
[page 422] ter.
Declaring Variables from Usage [page 428] Creating a declaration for an attribute within a method.
Declaring Inline Variables Explicitly [page 426] In the method signature, converting an existing inline declaration of a local
variable to an explicit declaration.
Using Similar Variables [page 430] You have following possibilities for using similar variables:
Deleting Unused Variables [page 436] Supported deletion of unused data declarations and variables.
3.19.4.4 Members
Function Description
Changing Visibility of Members [page 439] Changing the visibility of a member by moving it into the public, protected,
or private section.
Converting Locals to Class Members [page Converting a local constant, local variable, or local type to a class member
420] such as a member constant, attribute, or member type of the current
class.
Pull-up Members to Superclass [page 442] Removing member definitions from a subclass and adding it to the super
class.
Pull-up Members to Interface [page 444] Removing member definitions and adding them to the implemented inter
face. Additionally, aliases are declared to avoid invalidation of existing
usages.
Function Description
Creating a Text Symbol in the Text Pool [page Creating a text symbol in the text pool of an ABAP program.
496]
Editing Text Symbols [page 499] Changing a text symbol in the text pool of an ABAP program.
Correcting Inconsistencies Within Text Sym Balancing mismatches between source code and text pool.
bols [page 500]
Switching Notations [page 501] Adopting text changes of an existing text symbol in the text pool or the
source code and vice versa.
The exception(s) are added to the signature of the calling method or surrounded with a TRY CATCH block.
Function Description
Propagating All Exceptions [page 447] Adding the unhandled exceptions of the selected block to the sig
nature of the calling method in order to propagate them.
Surrounding with TRY CATCH [page 451] Single catches: Surrounding the selected block of statements
with a try catch statement to handle raised exception(s). Each ex
ception is handled in a seperate catch block
The statement(s) are surrounded by a TRY CATCH block in order to handle the exceptions.
Function Description
Extracting a Catch Variable [page 455] Adding a local variable and adding the INTO clause to an existing
catch block.
Extending a TRY CATCH Statement [page 459] Adding a new catch block to an existing try catch statement.
Removing a TRY CATCH Statement [page 463] Removing the entire try catch statement.
Splitting a MULTI CATCH Block [page 461] Replacing the existing multi catch block by individual catch blocks
per exception.
Function Description
Propagating an Exception [page 449] Adding an exception class to the signature of a method signature
that is based on an existing RAISE EXCEPTION statement.
Extracting an Exception Variable from a RAISE State Adding a variable declaration for the exception and source code to
ment [page 457] instantiate the exception before raising it.
Lists all the supported quick assist proposals for context specific source code generation in ABAP unit test
classes.
Lists all the supported quick assist proposals for context specific source code generation while writing ABAP
unit tests for a CDS entity.
Functions Description
Create all the CDS test fixture methods Create all the CDS test fixture methods for the given CDS
entity under test along with the corresponding method defi-
nition. It generates three fixture methods - class_setup,
setup, and class_teardown.
Create CDS test class_setup fixture method Creating a new fixture method class_setup to set up the
test environment including creation of required Doubles
and Clone(s). If all the three methods are available, then
this proposal is not be visible at all. Also, if this fixture
method definition already exists, then the system does not
display any proposals.
Create CDS test setup fixture method Creating a new fixture method setup to clear the test data
for all the Doubles used in the test method before execut
ing each test method. If this fixture method definition al
ready exists, the system does not display any proposals.
Create CDS test class_teardown fixture method Creating a new fixture method class_teardown to de
lete the generated database entities (Doubles and
Clones) at the end of test class execution. If this fixture
method definition already exists, the system does not dis
play any proposals.
Prepare test data Generating the boiler plate code for getting the test double
from the CDS test environment for a given dependency of
the CDS Entity under test. It also sets the test data into the
test double framework. This proposal must be used for each
row of test data and each dependency separately. This pro
posal is displayed only with in the methods inside an ABAP
test class.
Create a new Test Method and prepare test data Creates a new test method inside the Test Class. It creates
doubles from the CDS test environment for the given de
pendency of the CDS Entity under test using wizard. Test
data can also be set to the selected dependencies as a sec
ond step of the code generation.
Prepare test data (Using wizard) This proposal is displayed inside the existing test method
only. Allows to set data to the selected dependencies using
wizard and generates the code accordingly. Test method
name is prefilled for this proposal.
Related Information
Writing a Test for a CDS Entity Using Quick Assist Proposals [page 587]
3.19.4.8 Others
Classes and Inter Creating ABAP Classes or ABAP Inter Starting the creation wizard of a global ABAP class or inter
faces faces from Usage [page 481] face directly from the name of the missing repository object.
Classes Generating Class Constructor Methods Creating an empty class constructor method in the
[page 487] public section of the current ABAP class.
Generating Constructor Methods [page Creating a constructor in the public section of the current
488] ABAP class.
Note
If the class has attributes, a dialog is opened where you
can select the attributes that should be instantiated by
the constructor.
Generating Factory Methods [page Creating a static create method in the public section of
489] the current ABAP class.
Note
If the class has attributes, a dialog is opened where you
can select the attributes that should be instantiated by
the factory method.
Function Modules Creating ABAP Function Modules from Starting the creation wizard of an ABAP function module
Usage [page 484] from the name of the missing repository object.
Includes Creating ABAP Includes from Usage Starting the creation wizard of an ABAP include from the
[page 485] name of the missing repository object.
Text Symbols Creating and Editing Text Symbols Creating a text symbol in the text pool of an ABAP program.
(Quick Assists) [page 495]
Editing Text Symbols [page 499] Changing a text symbol in the text pool of an ABAP program.
Correcting Inconsistencies Within Text Balancing mismatches between source code and text pool.
Symbols [page 500]
Notations Switching Notations [page 501] Adopting text changes of an existing text symbol in the text
pool or the source code and vice versa.
A software component defines a delivery and product unit of a SAP software product. It comprises a set of
packages that are delivered in a single unit.
ABAP Platform
Use
As an ABAP developer, you always assign development objects implicitly to a software component by assigning
the package containing these objects. This even makes it possible to move development objects from one
software component to another after a release upgrade. A software component is released in successive
releases with new functions. In addition, you can import patches into each software component separately.
Additional Properties
● The customer receives changes to products relating to further development (upgrades) or collected
corrections (Support Packages) for one or more software components.
Related Information
The API state of a development object defines whether a development object can be used for custom
development.
API States
Remember
In general, the API state is set by SAP for delivered development objects. But as a developer on
customer-site, you can use the Use System-Internally (C1) release contract to to make custom
development objects available for use in key user apps. The other release contracts are only relevant for
SAP development.
Objects can be released as APIs for different purposes. Depending on the underlying release contract, released
objects need to adhere to different stability criteria. The API State tab is visible only for types of objects which
can be released as APIs. You have the following release contracts available:
● Add Custom Fields via Key User App (C0) [page 101]
● Use System-Internally (C1) [page 101]
● Use as Remote API (C2) [page 102]
● Deprecation [page 102]
Related Information
This API state ensures stability at dedicated extension points in APIs. These extension points must only be
used for adding custom fields using app Custom Fields and Logic or when adding custom fields to web dynpro
applications with the help of web dynpro configuration.
In addition, SAP development can define extension points in the types of objects listed below. These extension
points are available exclusively in the context of the app Custom Fields and Logic:
This API state ensures a technically stable public interface for use in extension items created using key user
apps like Custom CDS Views or Custom Analytical Queries, or with means of the ABAP Development Tools.
Compatibility of the public interface includes all its existing parameters, elements, associations to released
targets, and their technical data types. Further optional parameters, elements, or associations might be added
later, but existing parameters, elements, or associations must not be changed or removed. Alphanumeric
elements can be prolonged, but must not be shortened.
● Authorization Fields
● Authorization Objects
● BAdI Definitions
● Behavior Definitions
● CDS Views
● Classes
● Data Elements
● Domains
● Function Modules
● Interfaces
● Message Classes
Note
This API state is set by SAP for delivered remote APIs and not intended for custom development objects .
This contract ensures a technically stable public interface for use as remote API. Like Use System-Internally,
compatibility of the public interface includes all its existing parameters, elements, associations to released
targets, and their technical data types. Further optional parameters, elements, or associations might be added
later, but existing parameters, elements, or associations must not be changed or removed. Furthermore, to
ensure that external consumers of the API do not need to be adjusted after an upgrade, the prolongation of its
elements and parameters is not allowed.
● CDS Views
● Service Bindings
3.21.4 Deprecation
Delivered development objects can be deprecated by SAP. These development objects are then no more
displayed for example in code completion. Where a deprecated development object is used, a syntax warning is
displayed indicating a succesor. It is recommended to switch to the successor as soon as possible.
As a customer, you can mark a released custom development object as deprecated, if you have defined an
improved successor that is to be used instead.
Additionally, you can mark single elements or public associations within a CDS entity as deprecated and
specify their successors. This takes effect only once the CDS view itself was released as stable API.
Note
You must define a released successor for every deprecated development object and every deprecated
element or public association of a released CDS entity.
● CDS entities
● ABAP classes
● Data elements
● Domains
● Function modules
● ABAP interfaces
● Structures
● Table types
Related Information
The Transport Organizer in ABAP Development Tools (ADT) contains the basic transport functions of
workbench. The requests record changes made to the ABAP workbench objects.
Overview
The key feature of the Transport Organizer view is the option to display the assignment of objects to the tasks
and transport requests in a folder structure. Also, to perform some basic actions.
The display depends on the logged-on user. For example, you can display the most important information
relating to the transport of change requests of a user without leaving the development environment. A request
or task has an editor to view and edit the properties and objects.
The Transport Organizer view displays for each ABAP project the following columns:
● Transport Request:
1 Name of the ABAP project, cli Details of connection of an ABAP project to an ABAP system
ent, user name, and logon lan
guage
2 Workbench Transport requests of the SAP GUI-based workbench that have re
corded changes made to ABAP objects.
Note
Here you can only open and edit modifiable transport re
quests, create or delete tasks, or edit ABAP objects.
3 Transport Groups A transport domain can consist of one or more transport groups
that share the same transport directory of one or more ABAP sys
tems.
Note
These changes are transported only within SAP´s system or
customer systems.
4 CTS Project Development work and customizing activities can be grouped into
project structure.
5 Modifiable Unreleased transport requests and tasks that can be edited in ad
dition to the objects that have been released
Note
The Modifiable subfolder is displayed for all transport groups
and in the Local Change Request folder.
Note
Objects that are assigned directly to a transport request as
well as tasks and the corresponding objects that are already
released are displayed at the same folder level as unreleased
tasks.
5 Released All transport requests, tasks, and objects that have been released
within the last two weeks
Note
The Released subfolder is displayed for all transport groups
and in the Local Change Request folder.
● Owner: User who has created or been assigned to the corresponding transport requests and tasks
● Type: Type of ABAP objects that are assigned to the transport request or task
Transport Organizer view allows you to perform few of the common actions irrespective of the level using the
context menu option:
● Copy
● Copy Request Number
● Refresh
● Run as..
Note
You will find further background information in the help documentation of the SAP GUI- based Transport
Organizer.
Related Information
The transport layer defines the transport behavior of ABAP packages. Since packages are used as transport
units, each individual package determines the transport behavior of all development objects contained therein
– that is, whether and how a package and all its development objects are transported.
The assignment of a package to a transport layer ensures that all its development objects are connected to the
Change and Transport System (CTS), thereby defining the integration and consolidation system for its
development objects.
● Whether the development objects of a package are assigned to a local (objects are kept only locally in a
development system) or transportable change request
● The SAP system in which development objects are developed and changed
● Whether these objects are transported into a discrete system sequence or – through a well-defined path –
into a consolidation system.
Related Information
A transport request collects development objects and categories for export to your local computer or to an
SAP transport system.
When you create a development object (ABAP repository object) in a non-temporary ABAP package, you must
always assign the object to a transport request.
Dialog for Selection of Transport Request
You can create transport request from the transport organizer view. For more information, see Creating a
Transport Request [page 503].
Changes to development objects from non-temporary packages are organized in tasks and take place in
transport requests. A transport request records all changes to development objects. The assignment of a
package to a transport layer ensures that the package is connected to the Change and Transport System,
thereby defining the integration and consolidation system for its development objects.
With regard to the transport behavior of development objects, we have to distinguish between these three
cases:
● Transportable objects – development objects from packages that can be transported within a system
landscape.
Transportable packages are assigned to both a software component and a transport layer. So-called
"HOME objects" represent a special case. They can be transported within a system landscape, but are not
designated for external delivery (customer delivery). Packages of this type are assigned to a transport layer
and the specific software component HOME. All changes to transportable development objects are
recorded in transport requests.
● Local objects – development objects from local packages (TEST_ ..., $TMP ...) Local packages are assigned
to software component LOCAL, but are not assigned to a transport layer. Thus, they cannot be transported
in other systems. Objects from local packages are not generally designed for productive purposes but
solely for local developments, especially as part of prototyping or testing. All changes to development
objects of this type are only recorded in local transport requests, if the recording option for the relevant
package is activated.
● Temporary objects – special case of local objects. Temporary objects belong to temporary packages,
which are, in turn, a subset of local packages. Names of temporary packages always start with the $ sign
(example: $TMP). Changes to temporary packages are NOT recorded in transport requests.
The following decorators are used to display transport requests, tasks, and objects in the Transport Organizer:
Deco
rator Description
Unreleased tasks
Released tasks
Note
Only the transport request owner can add users to this type of request.
Note
Objects that can be edited are displayed with the same icon as they are represented in the Source Library
folder.
Reassign Task
Change Owner
The Request Editor allows you to manage the content of an individual change request. Access the Request
Editor by double-clicking a request in the tree structure of the change requests from the Transport Organizer
View.
Request Editor
Overview
● Properties:
Attributes
This tab allows you to edit and modify the attributes which define the change request. They are mainly used for
analysis of a request.
Transport Logs
This tab allows you to view the logs of a released Transport Request.
This tab is available only for the Transport Requests that are released.
Related Information
The Task Editor allows you to manage the content of an individual task under a modifiable request. Access the
Task Editor by double-clicking a task in the tree structure of the change requests from the Transport Organizer
View.
Task Editor
The Task Editor has sections similar to the Request Editor, you can modify the properties and documentation of
a task here.
Unlike Request Editor, the Task Editor does not include the attributes section as attributes are specific to a
change request.
Related Information
Accessibility at SAP refers to the possibility for everyone, including and especially people with disabilities, to
access and use technology and information products.
ABAP Development Tools (ADT) supports following possibilities to utilize accessibility features:
● By using Tools like screen readers that read text from the user interface and transfer it into audible voice.
So, you can hear the context of the current position.
Note
ADT is integrated into the Eclipse application framework. General information about the accessibility
functionalities in Eclipse can be found here:
SAP ensures the accessibility of the products through the Product Standard Accessibility .
For more information how to use and set accessibility features in ADT see the Related Information below.
Related Information
Context
The general idea of ABAP Development Tools (ADT) is to provide one Eclipse client that is installed on the
developer's PC and can connect to several ABAP back-end systems of different releases. The connection
between the client and the back end is achieved through the HTTP/RFC protocol.
The development paradigm is still server-based. This means that the development objects are stored solely in
the ABAP repository of the back end (no local copies via check-in and check-out), and services such as syntax
check, search, and where-used run on the back end.
The client part of ABAP Development Tools (ADT) provides a set of standard development tools such as the
Project Explorer for system browsing and a variety of creation wizards, search, and other views. In addition,
there are specific editors available for ABAP development object types, such as ABAP classes.
The ADT provides the well-known ABAP capabilities (transport, activation, version management, where-used
list, and others) combined with an Eclipse-based state-of-the-art UI and user interaction capabilities in a new
integrated development environment.
Related Information
Context
ABAP projects form the starting point for the ABAP developer's work in the Eclipse-based IDE. An ABAP
project mediates between an ABAP backend system and the Eclipse-based IDE, and it provides a framework for
the creation, processing, and testing of development objects.
In this part of the documentation you will find detailed descriptions of the elementary activities in the area of
ABAP projects. These will be important to you, particularly during the introductory phase.
Related Information
An ABAP project is used to manage the system connection and also serves on the front end as a container for
all ABAP development objects that are located in the back-end system.
Context
Before you start with ABAP development in the Eclipse-based IDE, you first need to create an ABAP project.
● Using a Predefined System Connection from the SAP Logon [page 116]: if the corresponding ABAP system
is already connected in your SAP Logon and you want to use the predefined settings.
Related Information
Prerequisites
● You need to specify the connection data for the ABAP back-end system you want to work with.
● This functionality is provided for all SAP NetWeaver releases that support ABAP Development Tools (ADT).
Recommendation
For security reasons, check whether the Secure Network Communication (SNC) is enabled for the
selected system connection. If it is not SAP recommends that you enable SNC first using the SAP Logon.
For the sake of convenience and again for security reasons, also use the single sign-on (SSO) option for
system authentication.
Context
You want to connect your Eclipse-based IDE using the standard settings of a system connection that is already
configured in the SAP Logon.
Procedure
The System Connections page is opened. Here all the available system connections of the SAP Logon are
listed in a table.
Tip
You can search in all entries of the table by entering a filter text. Then, only the matching entries are
automatically displayed.
Note
If the relevant system connection does not reflect the configurations from the SAP Logon pad, see
Using System Connections from the SAP Logon Pad [page 119] for more information.
Tip
The Connection Settings page with the Connection Parameters and Secure Network Settings areas is
opened.
4. To continue, you have now the following two options:
○ Click Next to adopt the existing connection settings without any changes.
○ Modify the corresponding fields, checkboxes, or entries. To do this, continue as described in Defining a
Manual System Connection [page 120]
Note
If you modify any settings, the link to the previously selected SAP Logon entry is cut and a new
independent system connection is defined. Afterwards, possible changes to the SAP Logon entry
no longer have an impact on your new ABAP project.
Whenever you select an item from a dropdown list box, the subsequent entries may or may not be
editable.
Note
The default language predefines the original language of the new development objects that will be
created in the corresponding ABAP system. Consequently, all new development objects will
automatically be created in this language. But your ABAP project may contain development objects in
different original languages if, for example, you copy development objects from other systems.
Tip
Note
A working set enables you to keep a clear structure and partition in the Project Explorer if, for example,
you are also working with Java projects in your Eclipse installation. You will find further information
about working sets in the Eclipse help.
10. [Optional:] If you want to change the project name, enter a new Project Name.
Note
When you create the project, you already have the option of including individual packages in your
Favorites list. In the standard version, the temporary package $TMP is provided as a default for this
purpose. If you wish to add a further package, choose Add... and enter the name of the package in the
corresponding input field. Keep in mind that this package must be available in the system.
The ABAP project is created and added in the Project Explorer. To check the results of the procedure, expand
the first level of the project structure. Verify that the project structure already includes the following nodes:
● Favorite Packages contains the packages that you have added to your favorites list (temporary package
$TMP by default).
● System Library contains all system packages.
Depending on whether you have modified the existing system connection, the following project variants are
created:
1. If you have used the existing system connection: The project references a system connection in the SAP
Logon. A decorator is then added to the project icon that reflects the connection to the SAP Logon.
2. If you have modified the existing system connection: The project is independent from the SAP Logon. It
is added without a decorator .
Related Information
ABAP Development Tools (ADT) tries to detect the configuration files for the system connections from the SAP
Logon pad automatically.
In some cases, for example, in Citrix environments, detection of the file locations might not work as expected.
You can then override the detection of the relevant file locations using the System Connection preference page.
To do this, open the ABAP Development System Connection preference page and choose one of the
following options:
● Detect automatically to define that ADT chooses the relevant file format and file location
● Define manually to force the usage of specific Landscape XML file(s)
Note
The former SAPLOGON.ini file format is no longer supported. Because, as of SAP GUI 7.60 this file format
is not supported anymore as well.
Related Information
Using a Predefined System Connection from the SAP Logon [page 116]
Prerequisites
This functionality is provided for all SAP NetWeaver releases that support ABAP Development Tools (ADT).
Context
You want to define the connection of your Eclipse-based IDE to an ABAP system directly without usingSAP
Logon. This enables you to define individual properties like connection types, message servers, instance
numbers, and so on.
Note
Whenever you select an item from a dropdown list box, the subsequent entries may or may not be editable.
Example
Procedure
1. From the menu, choose File New Project... to launch the project creation wizard.
2. Select the project type ABAP ABAP Project and choose Next.
The empty Connection Settings page with the Connection Parameters and Secure Network Settings areas is
opened.
Note
4. In the Connection Parameters area, you can define the following items:
a. In the System ID field, enter the ID of the ABAP system that you want to connect to.
b. Choose one Connection Type from the dropdown list box:
○ Custom Application Server to log-on an Application Server ABAP explicitly
You can then define the ...
○ Application Server*
○ Instance Number*
○ RFC Gateway Server
○ RFC Gateway Server Port
○ SAProuter String Elements
○ Group Selection to log on to an Application Server ABAP based on a log-on group
You can then define the ...
○ Message Server*
○ Group*
○ Message Server Port
○ SAProuter String
Note
In accordance to your selection, the subsequent input fields will become available or unavailable.
c. In the Message Server* input field, enter the name or the IP address of the message server that is part
of the instance.
d. In the Group* input field, enter the name of the load balancing group that you are using to log on.
e. [Optional:] In the Message Server Port input field, add the number of a message server port.
f. Enter the host name of the Application Server* you want to connect to.
g. Specify the Instance Number* you want to connect to.
h. [Optional:] In some cases, the host name of the Application Server ABAP cannot be resolved in the
network. You can then use the following input fields to establish a TCP connection to the RFC gateway
of the target system:
○ RFC Gateway Server to specify the TCP connection to the RFC Gateway of the target system.
○ RFC Gateway Server Port to specify the port of the RFC Gateway Server.
i. [Optional:] If you are accessing the application server through the SAP router program, enter the
routing entry in the SAProuter String input field.
5. In the Secure Network Settings area, you can define the following items:
a. To log on to the selected system using Single Sign-On, select the Activate Secure Network
Communication (SNC) checkbox.
When you make your selection, the security level is set by the security product used. The
authentication is secure in any case. Encryption and integrity protection of application data is used
if the security product provides these functions.
For security reasons, check whether the Secure Network Communication (SNC) is enabled for the
selected system connection. If it is not, enable SNC.
b. From the SNC Level dropdown list box, select one of the following items:
○ User agent authentication ensured: The system verifies the identity of the communication
partners. This is the minimum protection level offered by SNC.
○ Integrity ensured (signed content): The system also detects any changes or manipulation of data
that may have occurred between the two end points of a communication.
○ Encryption ensured: The system encrypts the messages being transferred, which makes
eavesdropping impossible. Privacy protection also includes integrity protection of the data. This is
the maximum level of protection provided by SNC.
○ Highest available security level: The highest security level provided by the security product you are
using is selected automatically for your connection.
c. [Optional:] In the SNC Name field, specify the target name of the communication partner.
d. From the Single Sign-On (SSO) dropdown list box you can choose:
○ Enabled for SNC Logon with Single Sign-On to enable secure points of access to your systems in
open environments, such as the internet.
○ Disabled for SNC Logon without Single Sign-On to log on to the selected SAP system using
username and password.
6. Choose Next.
Note
The default language predefines the original language of the new development objects that will be
created in the corresponding ABAP system. Consequently, all new development objects will
automatically be created in this language. Note that your ABAP project may contain development
objects in different original languages if, for example, you copy development objects from other
systems.
Tip
9. Choose Next to select your favorite packages or Finish to start the creation.
10. [Optional:] If you want to limit the number of displayed elements in the Project Explorer to one or more
working sets, select the Add project to working sets checkbox. Then choose the corresponding working
set(s) using the Select button.
A working set enables you to keep a clear structure and partition within the Project Explorer if, for
example, you are also working with Java projects in your Eclipse installation. You will find more
information about working sets in the Eclipse help.
11. [Optional:] If you want to change the project name, enter a new Project Name.
Note
When you create the project, you already have the option of including individual packages in your
Favorites list. In the standard version, the temporary package $TMP is provided as a default for this
purpose. If you wish to add another package, choose Add... and enter the name of the package in the
corresponding input field. Note that this package must be available in the system.
Results
To check the results of the procedure, switch to the Project Explorer and expand the first level of the project
structure. Verify that the project structure already includes the following nodes:
● Favorite Packages contains the packages that you have added to Favorites (temporary package $TMP by
default).
● System Library contains all system packages.
Context
You can create a new ABAP project and reuse the connection data of an existing project.
Procedure
1. In the Project Explorer, select the project whose connection data you want to reuse.
2. In the context menu, select Duplicate.
The creation wizard is opened. The data of the existing project is provided in the input and selection fields..
3. Adopt your changes and choose Next.
Note
See the description from the values of the input fields and selections fields here Defining a Manual
System Connection [page 120].
4. [Optional:] Change the logon data, such as Client, User, Password (not required for SSO system
connection).
5. Choose Next to define the project name and to select your Favorite Packages.
6. In the Project Name field, enter the name of your new project.
Note
ADT automatically proposes a name of the base project, plus the suffix of the original language and a
consecutive number.
7. [Optional:] You can add and remove Favorite Packages or use Working Sets to enrich your project.
Note
ABAP Development Tools automatically proposes all existing favorite packages of the source project. If
you do not want to reuse them, select the Remove button.
Results
To check the results of the procedure, switch to the Project Explorer and expand the first level of the project
structure. Verify that the project structure already includes the following nodes:
● Favorite Packages contains the packages that you have added to Favorites (temporary package $TMP by
default).
● System Library contains all system packages.
Related Information
In the System tab of the Properties view, you can display the system information of an ABAP project. This
enables you to find out if, for example, the requirements of a certain functionality are fullfilled.
Prerequisites
In the SAP Logon pad and in ABAP Development Tools, the following system and status information is
displayed:
● Database details such as the release, schema, library, and other information
● Operating System where the Application Server ABAP is installed
● Server setup and connection details such as the IP address, node name, and other information
● Kernel details such as the release, patch level, and other information
● The following details of the software component are provided:
○ Names of the Software Components that are installed on the AS ABAP
○ Release version
○ Technical name of the Support Package version
○ Support Package Level of the corresponding support package
○ Description
Procedure
Results
Related Information
Use
You can use theProject Explorer to browse through a project in order to locate, edit, or display development
objects of the ABAP Repository.
Overview
In the Project Explorer, the objects are structured hierarchically, basically grouped by packages and object
types.
The structured listing of ABAP packages enables you to access development objects by continually expanding
the tree structure.
But there are more comfortable ways to find a specific development object. You can, for example,
When the relevant development object is found and then opened, the corresponding position within the
expanded tree is highlighted and the object is opened in the active editor.
The Link with Editor functionality enables you to synchronize the cursor position within the Project Explorer in
accordance to the selected object within the ABAP source code editor. This means, when opening another
object from the editor, the cursor position within the Project Explorer is adopted in accordance. The relevant
tree is then expanded.
Link with Editor is activated by default and effects all projects. You can turn it off at every time and reactivate it
again choosing the Link with Editor icon from the toolbar. This enables you, for example, to freeze the Project
Explorer while navigating within source code.
When using the Link with Editor functionality, ABAP Development Tools (ADT) only opens the relevant package
and lists (possible) subpackages. Only the package of the relevant object is expanded with all of its objects. The
relevant object is selected in the Project Explorer.
Example
As a result, ADT opens the corresponding ABAP project in the Project Explorer as follows.
Display of the expanded folder with its trees and containing objects
Note
To display the hidden objects of a partly loaded folder, select the relevant one and choose Load Full Content
from the context menu or press F5 .
Related Information
Context
It can happen when you have multiple projects that you do not wish to process a certain ABAP project. In this
case, you could (temporarily) close this project. The consequence of this is that the corresponding project tree
is not longer visible. In addition, a closed ABAP project is no longer taken into consideration for the object
search.
Procedure
1. In the Project Explorer, select the root node of the relevant ABAP project.
2. Open the context menu and choose Close Project.
Results
The project node is still visible in the Project Explorer so that you are able to re-open the project whenever you
need it.
Context
You can delete an ABAP project if you are entirely sure that you will no longer need it.
Procedure
1. In the Project Explorer, select the root node of the ABAP project in question.
2. Open the context menu and choose Delete.
3. In the dialog window that now appears, check the option Delete project content on disk....
4. Confirm with OK.
Related Information
You use ABAP packages to group development objects in a self-contained unit in the ABAP repository. In
addition, you define transport properties and administrative information, such as application component and
the responsible user.
In this part of the documentation, you will find detailed descriptions of the elementary activities in the ABAP
package area.
You create an ABAP package to encapsulate ABAP repository objects in a self-contained unit. This enables you
to combine several packages in a software component.
Prerequisites
● If you create a main or a development package as a subpackage, its superpackage must already exist in the
relevant system. The superpackage serves as the anchor for adding new packages to the package
hierarchy.
● This feature is supported as of SAP NetWeaver AS for ABAP 7.52 SP00.
● To create or change a:
○ Structure package, you need authorization for the activity 02 ('Change') in the authorization object
S_PACKSTRU.
○ Main package, you need authorization for the activity L0 ('All Functions') in the authorization object
S_DEVELOP.
○ Development package, you need authorization for the activity 02 ('Change') and object type DEVC in
the authorization object S_DEVELOP.
● To specify the transport layer of the package to be created, you need the corresponding CTS
authorization (authorization object S_CTS_ADMI or S_CTS_SADM).
Context
Tip
When editing an input field, you can use the content assist functionality by choosing Ctrl + Space .
Note
To create a subpackage, navigate to the relevant superpackage node and select it.
Note
For detailed information about the naming conventions, see the Related Information.
Note
When you create a subpackage, ADT automatically proposes the transport properties of the
superpackage on the next wizard page.
6. To classify your package, choose one of the following entries from the Package Type drop-down menu:
○ Structure to define the highest level of package hierarchy in order to organize applications and
software components.
○ Main to define the highest level of package hierarchy that contains a structure package.
○ Development to define subpackages
( except $TMP local packages for further development)
Note
7. Choose Next.
Note
Packages that should not be shipped to customers must be assigned to the HOME software
component.
9. Enter the Application Component to define the development area to which the containing packages or
development objects belong.
10. Enter the Transport Layer to define the transport behavior of the package.
11. [Optional:] To define translation of the containing text elements, such as UI texts, messages, or F1 help
texts into the required language(s), select one of the following entries from the Translation Relevance drop-
down menu:
○ Administration Tools to provide text for system administrators in four standard language versions:
English, German, French, and Japanese
○ End User - Translation into all Supported Languages to provide text for business end users in all
supported languages
○ End User - Reduced Translation Scope to provide text for business end users in a set of predefined
languages only. This set is defined by the translation coordinator (SLS Account Manager).
Note
You cannot change translation relevance anymore. Consider your selection briefly.
The input field Translation Relevance is SAP-internal classifications only. This field is only displayed in
systems of system type 'SAP'.
Results
The back-end creates the package that is stored in the repository and opens the package in form-based editor.
In the Project Explorer, the new package is added to the corresponding package node. In the Properties View,
additional package details are displayed.
● Structure package, you can now continue building your package hierarchy.
● Main package, you can now, for example, create another main package or add further main packages and
development packages.
● Development package, you can now start developing and creating ABAP repository objects.
Related Information
Prerequisites
After creating a package for your company, you as a customer want to adopt the package-specific properties.
Note
In the Overview editor tab, you can adopt the following checkboxes:
Note
○ Encapsulated to enclose the development objects of a package. When selected, only the development
elements exposed in package interfaces of the package are visible to the outside. Possible client
packages need use access to those package interfaces that contain the development elements used.
Otherwise errors might occur.
Note
If a package is encapsulated, you must define at least one package interface to provide
development objects for other packages. If the package is not encapsulated, all development
objects will be available for other packages.
In the Use Accesses editor tab, you can add or adopt the package interfaces. To do this, add a line at the
corresponding position or select the relevant entry. In the Package Interface column, enter the name. In the
Error Severity column, select the relevant entry from the dropdown menu. Note that you cannot edit the
package. It will be derived from the package interface.
In the Package Interfaces editor tab, you can only display the relevant names and descriptions.
In the Subpackages editor tab, you can only display the relevant names and descriptions.
To adopt the package description, open the Properties view and enter your new Description.
Related Information
Prerequisites
In ABAP projects, you can only add packages (not other types of development objects) to your favorites list.
Context
You, as an ABAP developer, will generally work with a limited selection of ABAP packages. Therefore, it is
appropriate to include those ABAP packages that are relevant for your work in your favorites list. The packages
remain assigned to the ABAP project on a permanent basis.
To add a package to your favorite list, select a package in the Project Explorer. From the context menu, select
Add to Favorite Packages.
You can also remove packages from the favorite list, using context menu option Remove from Favorite
Packages.
Related Information
Context
To add a package to your favorites list using the Favorite Packages node, proceed as follows:
Procedure
1. In the Project Explorer, expand the first level of your ABAP project.
2. Select the Favorite Packages node, open the context menu and choose Add a Package....
3. In the dialog box that appears, enter a valid name of a package and confirm with OK.
When entering the name of the package, you can benefit from the content assist functionality by
editing the first letters and then pressing Ctrl + Space .
Related Information
Context
To add a package to your favorites list starting from the System Library node, proceed as follows:
Procedure
1. In the Project Explorer, expand the navigation tree of the System Library node until you find the package
you wish to work with.
Tip
For the package search, you can also use CTRL + Shift + A in connection with the activated Link
with Editor. The node of the package found is then displayed at the corresponding position within the
expanded project tree.
2. Select the package node, open the context menu, and choose Add to Favorites.
Related Information
Context
Procedure
Results
The package is removed from the favorites list but not deleted in the ABAP Repository.
Related Information
ABAP repository trees enable you to display your favorite development objects of an ABAP repository in the
Project Explorer.
Related Information
You create an ABAP repository tree to display a defined selection of development objects in the Project
Explorer.
Prerequisites
ABAP repository trees and folders are supported since SAP NetWeaver AS for ABAP 7.51 innovation package
SP00. In addition, your ABAP system needs to be connected with a SAP HANA database.
Context
The following procedure describes the possibility to create a tree on base of a template.
For further information about the other possibilities, see the Related Information section from below.
Procedure
1. In the Project Explorer, choose New ABAP Repository Tree... from the context menu of the relevant
ABAP project where you want to create a tree.
ABAP Development Tools (ADT) provides templates that contain a predefined filter set and structure.
System Library - ABAP packages and object This template contains all
type packages of the entire
ABAP system. It does not
contain any filters.
It is structured by ABAP
packages and object type.
It is structured by applica
tion component, package
and object type.
Package Collection Package Packages and object type This template contains a
collection of packages.
It is structured by object
type.
My Objects User ABAP packages and object This template filters for all
type development objects of the
currently logged on user
where he/she is assigned to
and/or responsible for.
Released Objects API ABAP packages and object This template filters for all
type APIs those release state is
set on Released.
Deprecated Objects API API state and object type This template filters for all
APIs those release state is
set on Deprecated.
Core Data Services Object type Object type and ABAP pack This template filters all de
ages velopment objects in the
context of Core Data Serv
ices (CDS) such as data def
initions, access controls,
metadata extensions, and
CDS entities.
Note
This template is just an
example. You can define
such a setup also for
other object types.
Exception Classes Object type and object ABAP packages This template filters all ex
name pattern ception classes (starting
with the CX_ prefix).
Note
Exception classes with
namespaces are not
considered.
The second wizard page is opened and displays the filter possibilities in accordance to your selection.
For further information, see Adjusting the Name, Property Filter, and Structure of an ABAP Repository Tree
[page 143].
a. In the Tree Presentation area, enter the name of the tree to be created.
b. In the Object Selection area, restrict the number of displayed development objects manually.
c. In the Tree Structure (based on Properties) area, you can edit the structure of a tree.
5. To trigger creation, choose Finish.
Results
The tree is added to the selected ABAP project in the Project Browser. From here, you can, for example,
collapse the tree and navigate to the relevant development object.
Related Information
Deriving an ABAP Repository Tree from an ABAP Repository Folder [page 142]
Adjusting the Name, Property Filter, and Structure of an ABAP Repository Tree [page 143]
Adapting an ABAP Repository Tree [page 146]
Duplicating ABAP Repository Trees [page 149]
Getting Support from the Content Assist [page 325]
Setting the API Release State [page 530]
In addition to duplicating ABAP repository trees, you can also create an ABAP repository tree based on an
existing configuration from an ABAP repository folder. This enables you to create a new tree based on a
subtree.
Prerequisites
ABAP repository trees and folders are supported since SAP NetWeaver AS for ABAP 7.51 innovation package
SP00. In addition, your ABAP system needs to be connected with a SAP HANA database.
1. In the Project Explorer, select the ABAP repository folder from which you want to derive the configuration
and choose Derive New Tree... from the context menu.
The Derive Tree Configuration wizard is opened and displays the existing object selection and tree
structure.
2. Adapt the tree configuration according your development needs.
For more information how to adopt the selection, see the Related Information below.
3. To trigger deriving, choose Finish.
Results
If you do not change the name in the configuration wizard, the same name as from the derived folder is used.
You can now, for example, collapse the tree to navigate to the relevant development object.
Related Information
Adjusting the Name, Property Filter, and Structure of an ABAP Repository Tree [page 143]
You can adjust the name, property filters, and structure of an ABAP Repository Tree when you, for example,
create or adapt ABAP repository trees.
Prerequisites
ABAP repository trees and folders are supported since SAP NetWeaver AS for ABAP 7.51 innovation package
SP00. In addition, your ABAP system needs to be connected with a SAP HANA database.
The ABAP Repository Tree Configuration wizard is opened and displays the existing object selection.
Example
You can also combine filters, such as api:released type:clas, owner:test package:basis.
Note
Use the content assist functionality ( Ctrl + Space ) to add predefined filter criteria. Then, the
completion list is opened from where you can select the relevant filter criteria.
○ Object Name Pattern to enter and limit for object names or name patterns.
Note
Example
4. In the Tree Structure (based on Properties) area, you can adopt the structure of a tree. To do this, drag and
drop the relevant tree level from the Available Tree Levels section to the Selected Tree Levels (preview)
section.
Note
The hierarchy of a tree level is created in accordance to the way you drag and drop them.
In the Selected Tree Levels (preview) section, the hierarchy of the tree levels is automatically adopted.
Related Information
You can adapt an existing ABAP repository tree to adjust it to your current development needs.
Prerequisites
ABAP repository trees and folders have been supported since SAP NetWeaver AS for ABAP 7.51 innovation
package SP00. In addition, your ABAP system needs to be connected with a SAP HANA database.
1. In the Project Explorer, choose Configure ABAP Repository Tree... from the context menu of the relevant
tree you want to adapt.
The ABAP Repository Tree Configuration wizard is opened and displays the existing object selection.
2. In the Object Selection area, restrict the number of displayed development objects manually.
For more information how to adapt the selection, see the Related Information section from below.
3. To add your adaptions, choose Finish.
Results
The tree is updated and the relevant content is displayed in the Project Browser.
Related Information
Adjusting the Name, Property Filter, and Structure of an ABAP Repository Tree [page 143]
You configure how to display the structure of the development objects beneath the ABAP project in the Project
Explorer.
Prerequisites
This functionality is provided for SAP NetWeaver AS for ABAP 7.52 SP00 and higher.
Context
1. Select one of the first levels directly under the ABAP project and choose Expand Tree by... from the context
menu.
You can choose one of the following radio buttons to sort the development objects in the relevant folders as
follows:
○ Owner (default): Name of the users who have created the development objects
○ Application Component: Application development of the ABAP package where the development
objects belong
○ Package: ABAP package where the objects are grouped in a self-contained development unit
○ Object Type: Types of development object, such as clas for ABAP classes
○ API State: State whether a development object is intended for public usage or for internal SAP usage
○ Creation Year: Year when the development objects were created
○ Original Language: Language in which the development objects were originally created
○ Source System: Name of the ABAP system to which the development objects belong
○ Show development objects directly: To show an alphabetical sorted plain list with all development
objects
Results
In the Project Explorer, the relevant sublevel is reloaded and adopted in accordance to your selection.
Depending on the number of development objects, creating and sorting might take a few seconds.
You can now navigate to the relevant development object manually or using Ctrl + Shift + A to open it.
You can create an ABAP repository tree by duplicating an existing one and copying its configuration.
Prerequisites
ABAP repository trees and folders are supported since SAP NetWeaver AS for ABAP 7.51 innovation package
SP00.
Procedure
1. In the Project Explorer, select the tree that you want to duplicate and choose Duplicate ABAP Repository
Tree... from the context menu.
The ABAP Repository Tree Configuration wizard is opened and displays the existing object selection and
tree structure.
2. Adopt the tree configuration according your development needs.
For more information how to adopt the selection, see the Related Information below.
3. To trigger duplication, choose Finish.
Results
The tree is added to the selected ABAP project in the Project Browser. The number 2 is added to the existing
name. Alternatively, you can rename the duplicated tree.
You can now, for example, collapse the tree to navigate to the relevant development object.
Related Information
Adjusting the Name, Property Filter, and Structure of an ABAP Repository Tree [page 143]
You can visualize the apportionment of the content from an ABAP repository tree in a diagram.
Prerequisites
ABAP repository trees and folders are supported since SAP NetWeaver AS for ABAP 7.51 innovation package
SP00. In addition, your ABAP system needs to be connected with a SAP HANA database.
Context
Example
1. In the Project Explorer, select the tree for which you want to generate the chart.
2. In the Properties view, select the Chart subtab.
Results
To redefine your selection for another tree level, choose the relevant entry through the Group objects by button
from the toolbar.
You can customize the preferences of ABAP repository trees in order to define their behavior for all ABAP
projects of your Eclipse-based IDE.
To define the ABAP Development Project Explorer preferences, the following options are provided:
Checkbox / Input
field Description
Display short descrip Checkbox to hide/display the relevant short description after each development object (as well as
tions its subobjects) and ABAP package in italic.
To predefine its color, choose the Change color... link and define the Decoration color.
Display object coun Checkbox to hide/display the number of the containing objects in brackets after each tree and
ters folder label
To predefine its color, choose the Change color... link and define the Counter color.
Collect directly as Checkbox to display development objects – that are not assigned to a subpackage – in an artificial
signed objects in extra subpackage node.
'..' package
When selected, ADT will create an artificial subpackage node under the selected package and col
lect all directly assigned development objects in this subpackage node. Its folder name is derived
from the selected package plus two dots as prefix.
When deselecting the checkbox, the subpackage is dissolved and all objects are no more collected
in it.
Related Information
Context
In the new Eclipse-based IDE, packages form the basic organizational units for ABAP projects. Each of the
package nodes can, in turn, contain subpackages or ABAP development objects as subnodes. The
development objects are the individual parts that are used to build an ABAP application.
In this part of the documentation you will find detailed descriptions of the elementary activities concerning the
ABAP development objects as such.
Context
Using the ABAP project as a starting point, you can create any arbitrary development object for the ABAP
Repository. The procedures to create development objects depend on the object type to be created.
The deeper the selected node, the less information you have to fill in later.
2. From the context menu, select an entry, for example, New ABAP Test Class or New Other ABAP
Repository Object , if the object is not in the list.
The context menu and the information you enter in the input fields of the creation wizard depend on
the location of the selection.
In the following example, the selected node is a DDL source. In the wizard, the name of the project, the
package, the original language, and the CDS entity to test are already filled in.
Form Editor
If you edit an object in the form editor and refer to an object that does not exist, you can use a quick fix to
create it by clicking the label left from the input field.
Related Information
Context
As soon as you start to edit a development object with ABAP Development Tools (ADT), the corresponding
editor is locked so that contents cannot simultaneously be changed by other users.
The status is displayed as "locked", with a decorator, both in the Project Explorer and on the editor tab:
UI Description
This kind of editor lock is lifted implicitly for the respective object as soon as you have closed the editor.
In certain use cases, however, it can happen that you would like to explicitly remove the existing lock in the
editor for the object concerned in order to allow changes by another user for a short time, for example.
Procedure
Alternatively, you can use the toolbar Edit Unlock from the menu or choose the Unlock function in
the Project Explorer.
Results
The locked decorator is removed from the editor tab and the corresponding item in the Project Explorer.
Related Information
1. Choose Navigate Open ABAP Development Object ... from the menu bar or Ctrl + Shift + A .
For more information, look here 'Open ABAP Development Object' Dialog [page 157]
You have the following standard navigation capabilities to open a development object from an editor:
● From a usage, press F3 or Ctrl + click on the left mouse button on the name of the corresponding
development object.
You can open a development object from a view, that is displayed, for example, from a test or search result list.
Further Possibilities
If you have already opened a specific development object, you can also open it:
Related Information
● Ctrl + Shift + A
In the dialog, enter the name of a development object or its prefix in the search field.
● Using Wildcards
○ "*" for any string
○ "?" for any character
○ Ending with "<" to suppress automatic prefix matching
● Using Filter Criteria
Filter criteria allow you to restrict the result to a certain object type, ABAP package, user name, and so on.
You can use the content assist functionality ( Ctrl + Space ) to limit your search for:
○ Types, packages, and users
Supported since SAP NetWeaver 7.4 SP05.
○ API states
Supported since SAP NetWeaver 7.5 SP00.
Example
You can combine search strings and filters, such as *abc?test< type:clas, dtel package:basis.
Configuring Preferences
In the dropdown list, you can configure search preferences and how the search results are displayed. For more
configuration options, select Open Preferences... from the list.
● Use as initial search pattern to enter an initial search pattern in the input field, for example type:class.
● Use pattern from previous search to display and reuse the last entered search string.
Additionally, you can configure whether the search pattern is selected and you can overwrite it or the cursor is
placed at the end of the search pattern. Therefore, select or deselect Place cursor at the end of the search
pattern.
Sometimes it is not sufficient to get the search results as a simple list (even if the entries are decorated with
description and package).
Therefore, you can store any search permanently as ABAP Repository Tree that gives you the following
advantages:
To create a tree, select the Create ABAP Repository Tree... entry from the dropdown list.
Related Information
Prerequisites
The same development object has to exist in the system in which you want to open it.
The shortcuts are only provided in SAP NetWeaver 7.4 SP09 and higher.
Procedure
Tip
Alternatively, you can use the Ctrl + Alt + P shortcut to open the submenu with the project list
directly.
3. Select the project in which you want to open the development object.
Note
If the project does not exist, you can create a new one by selecting New Project...
Alternatively, you can also use the Ctrl + Alt + P shortcut. ABAP Development Tools (ADT) then
automatically opens the development object in the project you opened previously. Thus, you can easily
toggle between both projects.
Related Information
Native integrated development objects like ABAP classes, DDLs, Web Dynpro components, and so on, have
their own editor and can be opened in ABAP Development Tools (ADT).
Development objects, that are not yet integrated in ADT are displayed in the Project Explorer with the icon.
For these objects, the conventional GUI-based tools of the ABAP Workbench are opened in the editor area
where ABAP programming is taking place. For each additional development object that is opened in the SAP
GUI, a separate editor tab is provided.
With this GUI-based tool, you have complete access to the functionality of the traditional ABAP Workbench. For
example, you can start any application you want by entering a transaction code or OK code. This is already the
case whenever you have to release your Workbench requests in the Transport Organizer or whenever you use
the traditional Dictionary tools – in order to create or process database tables or structures, for example.
These tools are made available in ABAP Development Tools through the SAP GUI, which is installed locally
together with the Eclipse-based client. The tight integration of the SAP GUI involves seamless navigation to all
development objects and applications within ABAP Development Tools (ADT).
Use Case 1
You want to open a development object from the Project Explorer in the assigned editor.
If the selected development object is not supported with its own Eclipse-based editor, the appropriate SAP GUI
transaction opens in the editor area.
Use Case 2
You want to open a development object that is supported by an Eclipse-based editor in the SAP GUI in order to
use a function that is not provided in ADT.
To do this, open the context menu for the corresponding development object in the Project Explorer and select
Open with SAP GUI.
The selected development object opens with the appropriate transaction of the SAP GUI in the editor area.
Use Case 3
You want to start the SAP GUI completely independently of the development object selection. For example, you
want to change user settings or you want to be able to access random functions within the SAP system. For
this purpose, the IDE provides the GUI Launcher.
To open the SAP GUI using the SAP GUI Launcher from the SAP GUI Launcher proceed as follows:
SAP Software Change Registration (SSCR) is a procedure for registering developers and manual changes to
SAP source code and dictionary objects in an ABAP-based system.
This results in the following registrations for the purpose of accessing a customer system in order to:
Developer Registration
You have to register with a 20-digit access key if you want to create, edit, or delete a development object in an
ABAP-based SAP system for the first time. For this purpose, a dialog is opened where you have to enter the
Access key. The developer registration has to be performed only once in a given system.
You need a 20-digit access key to create, edit, and delete a development object in the SAP namespace. For this
purpose, a dialog is opened where you have to enter the Access key. The object registration is required only
once per SAP object and relates to the subsequent modifications of a specific SAP object.
You add a development object to a transport request to transfer it to another ABAP system. Then, in the target
system the same object is used.
Context
You want to create a new or to edit an existing development object. For this, you create a new or assign an
existing transport request for/to it.
Note
Not required for objects in $ and LOCAL ABAP packages, for which the changes are NOT going to be
recorded in the Transport Organizer.
If you edit a development object that is already edited by another developer, a transport request might
already be assigned to this object.
Procedure
In the creation wizard, choose one of following radio button on the Selection of Transport Request page:
○ Select the Choose from requests in which I am involved to pick an already existing transport request.
○ Select the Create a new request to generate a new transport request. In the Request description field, type
further information.
○ Select the Enter a request number to add your class to an existing request. Choose the Browse... button if
you want to select a request that has already been created by a certain user.
Context
If you are dealing with a support request, pre-correction, or similar, you need to create, edit, or delete SAP
objects.
In the current version of your Eclipse installation, you can modify the following SAP objects using ABAP
Development Tools (ADT):
Note
The modifications are overwritten every time a new release or support package is implemented. They can,
however, be retained by comparing and adjusting the versions of the object in transaction SPAU. If you have
to carry out modifications, use Modification Assistant wherever possible .
You can modify all types of objects without Modification Assistant. Examples of object types supported by
Modification Assistant are programs, classes, and function groups.
Related Information
Context
If you need to modify development objects, use Modification Assistant wherever possible. Typically, there are
three types of brackets that are ready for input: REPLACE, DELETE, and INSERT.
Example
The figures below show you different types of modification in ADT. The code that cannot be modified is greyed
out.
Carry out your modifications within the brackets in the white area.
● Replacing
The original IF i_speed > 200 condition is replaced with a new IF i_speed > 250 condition.
● Deletion
● Insertion
Restriction
You can only carry out modifications within the existing brackets provided in SAP GUI. It is not currently
possible to create new modifications in ADT.
Tip
● You can enable modification annotations as follows: Window Preferences General Editors
Text Editors Annotations . If enabled, a modification annotation appears in the overview ruler on the
right pane of ABAP Editor. Click the annotations to navigate to the modifications in the code.
● You can change the background color of the non-modifiable source code as follows: Window
Preferences General Appearance Colors and Fonts Unchangeable Source Code .
Related Information
If you edit an ABAP class in the SAP namespace and the object has not been modified with Modification
Assistant, the Limited modification support window opens.
Here you can choose the environment you want to work with:
● Edit in SAP GUI (recommended): Wherever possible use Modification Assistant, which is enabled in SAP
GUI. New modifications can currently be created in SAP GUI only. The modifications that you carry out with
Modification Assistant are recorded in the transaction SPAU.
● Edit in Eclipse (no ModAss): If you carry out modifications in Eclipse, Modification Assistant is disabled for
all modified development artifacts.
This means the following:
○ In programs, as soon as you modify and save the program, Modification Assistant is disabled for the
complete include.
○ In classes, as soon as you modify and save the class, Modification Assistant is disabled only for the
modified parts of the class, such as single method implementations.
Related Information
Context
You can display and edit the local development objects from other users. This enables you to reuse a section of
code for your own development activities.
Tip
When editing the User Name, you can benefit from the content assist functionality by pressing Ctrl +
Space .
Results
The last activated local objects from the chosen user are added to the Favorite Packages.
Related Information
You can share a specific development object or a highlighted part of the ABAP source code with other ABAP
developers if you wish to communicate a programming improvement or similar.
Prerequisites
You need access permissions for the corresponding ABAP system and at least the read permissions for the
linked development object.
Context
ABAP Development Tools (ADT) provides the option of creating hyperlinks to development objects. The
receiver can then open the corresponding source code in another Eclipse-based IDE as well as in a Web
browser.
● Linking to Open Development Objects in Another ADT Installation [page 170]: You create a hyperlink to
open a development object directly in the referenced ABAP project within another ADT installation.
● Linking for Displaying ABAP Source Code in a Web Browser [page 171]: You create a hyperlink to render a
development object in a Web browser.
● Linking to Selected Parts of ABAP Source Code [page 173]: You create a hyperlink to highlight a specific
section of ABAP source code. The link can be opened in a Web browser or in the same ABAP system of
another ADT installation where the section is marked.
● Opening ADT Links [page 175]: You can open an ADT link, for example, from an email or from an MS Word
or Excel file, by clicking it. In addition, you can also enter the URL into a dialog.
Related Information
Context
You can initiate the creation of an ADT link that, as a hyperlink, references a specific development object. The
receiver can then open the referenced development object directly in ABAP Development Tools (ADT) in the
corresponding ABAP project.
Example
Note
ADT links are available for all development objects except trace files, profiler settings, debugger variables,
and so on.
An email is then opened that contains a generated header and the hyperlink.
b. Choose the Copy link to clipboard button to paste the ADT link from the clipboard into any document.
The ADT link path is then saved in temporary storage. If you paste the path into your document or
editor, it will be added as text.
Related Information
Prerequisites
To enable this functionality, http access to your ABAP system needs to be activated.
For more information, see the chapter "Activating ICF Services in Development Systems" in the corresponding
Configuration Guide for Configuring the ABAP Back-end for ABAP. Otherwise, the HTTP Link functionality is
deactivated in the share link dialog.
This functionality is provided in SAP NetWeaver 7.4 SP08 and higher as well as in SAP NetWeaver 7.3 EHP1
SP14 and higher.
Context
You can initiate the creation of a hyperlink that refers to a specific development object. The receiver can then
open the ABAP source code of the development object in a Web browser.
For this purpose, you can generate an email where the hyperlink pat h is added or paste it from the clipboard
manually into any document.
Procedure
1. In the ABAP source code editor, open the development object and select the element or statement that you
want to refer to.
2. In the context menu, select Share Link for Selection....
○ To generate an email from your default email client, Choose Email link.
An email client is opened that contains a generated header and the hyperlink.
○ To paste the link into any document, choose Copy link to clipboard.
The hyperlink path is then saved in temporary storage.
If you paste it, the path is added as text in your document or editor.
Example
The following example displays a hyperlink of a specific ABAP class that is opened in a specific ABAP
system:
https://app.server:12345/sap/bc/abc/oo/classes/cl_test_class/source/main
Note
● In order to display the ABAP source code of the linked development object in HTML, you need to install
a Web browser or a text editor.
● A hyperlink handler defines the application that is launched when a hyperlink is opened. This means
you have to define a Web browser application where you want to open the development object.
● It might be necessary to make the pasted hyperlink click-sensitive. To do this, edit the hyperlink
reference.
Related Information
Context
In a source code-based development object, you can initiate the creation of a hyperlink that refers to a specific
element or statement. The receiver can then open the referenced message directly in ABAP Development Tools
(ADT) in the corresponding ABAP project or in a Web browser.
For this purpose, you can generate an email where the hyperlink path is added or paste it from the clipboard
manually into any document.
1. In the ABAP source code editor, open the development object and select the element or statement that you
want to refer to.
2. In the context menu, select the Share Link for Selection... entry.
○ To generate an email from your default email client, choose Email link.
An email client is opened that contains a generated header and the hyperlink.
○ To paste the link into any document, choose Copy link to clipboard.
The hyperlink path is then saved in temporary storage.
If you paste it, the path is added as text in your document or editor.
Results
Example
The following example displays an ADT hyperlink that includes the position details from the selection within
a specific ABAP class:
Note
To make a hyperlink click-sensitive, the receiver needs to define the application that is launched when
opening a hyperlink.
Related Information
You have two options for opening an ADT link: You can either click an ADT link that has been sent to you, for
example, in an Email, or one that is provided, for example, in an MS Word file. You can also enter its URL into a
dialog.
Prerequisites
ADT link handling needs to be enabled in advance. To do this, open the Window Preferences General
Link Handlers preferences page and select the checkbox for the adt scheme.
Context
Procedure
Results
Related Information
Context
● ABAP class
● ABAP interface
● ABAP programs (require SAP NetWeaver 7.4 SP5 / 7.31 SP11 or higher)
● Data definitions, metadata extensions, and access controls (require SAP NetWeaver AS for ABAP 7.51
innovation package SP00 or higher)
● Copying Source Development Objects [page 176] to copy and paste the exact same entity into another
ABAP package of your choice.
● Duplicating Development Objects [page 177] to create exact same entity in a selected ABAP package.
Note
You can only copy and paste as well as duplicate within the same ABAP system.
Related Information
Context
Note
Procedure
1. Select the relevant node for the development object in the Project Explorer.
Results
In the Project Explorer, a new and inactive development object is created and opened in the corresponding
editor.
Note
If you copy ABAP classes or interfaces, existing references are automatically changed in the source code to
the name of the new development object.
Related Information
Procedure
1. Select the relevant node for the development object in the Project Explorer.
2. Open the context menu and choose Duplicate.
3. In the Creation wizard, enter the required data corresponding to the development object.
4. Select the package where you want to add the to be created development object by choosing the Browse...
button.
5. Choose Next.
6. Assign a transport request and start the creation process with Finish.
Results
In the Source Library folder, a new and inactive development object is created and opened in the corresponding
editor.
If you duplicate ABAP classes or interfaces, existing references are automatically changed in the source
code to the name of the new development object.
Related Information
You can pin the content in the Project Explorer, Properties, Outline, and ABAP Element Info view. The content
can then no longer be adapted in accordance with the current selection in the ABAP source code editor.
Context
You pin content, for example, to arrange several views beside in order to compare their content.
Procedure
If you select another element within the source code, the content or selection of the active view remains.
2. To unlock pinning, choose the same icon again.
In the Properties view, you can display details, such as the owner, creation date, original language, and so on, of
a source code-based development object.
Context
Note
You can change the object description of your own development objects in the Properties view. For this
purpose, the Description field is provided. It is an editable field if the logon language (project language)
does not differ from the original language of the object. Otherwise, this field is not editable and is labeled
with a warning decorator.
Note
To display the properties of development objects that can only be opened in the SAP GUI-based editor,
double-click the respective node in the Project Explorer. The assigned editor is then opened and here you
can find the properties at the appropriate position.
Procedure
1. Open the relevant development object in the ABAP source code editor.
Alternatively, you can open the context menu of the editor and choose Show in Properties .
Results
● General: Details that are the same for all development objects of this type
● Specific: Details that are individual for this type of development object
Note
To edit the description field, put the cursor in the ABAP Editor area.
Related Information
Context
In SAP NetWeaver 7.4 as well as 7.31 SP11 or higher, you can display or edit text elements of an:
● ABAP class
This enables you to add language-dependent messages that have to be translated. For this, a SAP GUI is
opened in a separate tab beside the source code editor.
Note
The master language of the text element is the same as the master language. You can only change the
content of a text element that has been created in the master language.
Note
If you want to create or edit single text symbols (without SAP GUI), you can use Quick Assists. For more
information, see Creating and Editing Text Symbols (Quick Assists) [page 495].
Procedure
1. Open an ABAP class, ABAP program, ABAP function module, or ABAP include in the source code editor.
2. In the context menu, choose Open Others Text Elements to open the SAP GUI-based text editor in a
separate tab.
3. Enter or edit the text element.
4. Save your changes.
Results
The text element is created. You can now add the code for the text element in the source code.
Related Information
Context
The ABAP syntax check enables you to verify code-based development objects before activating them. You can
run the syntax check by:
If syntax errors occur, these are issued to the Problems view and displayed as an ABAP Problem. In addition,
the code line with the error is labeled with a decorator in the ABAP source editor.
If errors occur during the syntax check, these will be issued to the Problems view and displayed there as ABAP
Problem. In addition, the code line with the error is labeled with a decorator in the ABAP source editor.
Note
In SAP NetWeaver 7.4 as well as SAP NetWeaver 7.3 EHP1 SP11 or higher, you can enable the package check
during the syntax check.
The package check during the syntax check allows you to check whether you access objects that are visible
in your object. In order to activate this functionality for an ABAP system, select the following option from
the menu bar: Project Properties ABAP Development Editors Do package check during syntax
check
Related Information
Prerequisites
The syntax check always is executed solely for the ABAP source code in the editor currently opened.
Context
You can run the ABAP syntax check directly through a toolbar icon in the main window of the ABAP
perspective.
Procedure
2. Click the icon (Check the ABAP Development Object) in the toolbar. Alternatively, you can use the
keyboard shortcut Ctrl + F2.
Related Information
Working with Automatic ABAP Syntax Check While Programming [page 183]
Working with Manual ABAP Syntax Check [page 183]
Prerequisites
The syntax check always is executed solely for the ABAP source code in the editor currently opened.
By default, the ABAP source code editor automatically checks the syntax of a development object you are
currently working on.
Note
● The automatic syntax check is executed 500 ms after you have stopped typing.
● The automatic syntax check is activated by default. Use the Window Preferences ABAP
Development Editors Source Code Editor pages to deactivate the Automatic syntax check on all
open ABAP source editors checkbox.
● The syntax check is always only executed for the ABAP source code of the currently opened editor.
When you save a development object, all other opened source code editors are also checked.
Related Information
Context
You use this activation function to activate one or all of your inactive development object(s) in your ABAP
project, any selected objects, or just subobjects of a main object (methods in classes).
Note
Make sure that the development object you wish to activate is syntactically correct. Before an object is
activated, the system performs a syntax check of the entire object (main program, function group, class,
and so on). However, you can also activate development objects even if they contain syntax errors.
Note
You can run the activation of one or more development objects in the background. This enables you to
continue working on other development objects while the activation process is being continued. For this
purpose, select the Run in Background button while the activation is running.
1. To activate the development object that is currently opened in the ABAP source editor, click the icon
(Activate the ABAP Development Object) in the toolbar.
2. To activate a selection of development objects:
a. Multi-select (single selection is also possible) the relevant object's nodes in the Project Explorer.
b. Open the context menu and choose Activate.
3. To activate development objects using the inactive objects worklist for the ABAP project:
a. Open the ABAP source editor for a single development object of the project.
b. Open the list to the right of the activation icon in the toolbar and choose Activate Inactive ABAP
Development Objects....
The worklist with entries for all inactive objects appears in the Activate inactive ABAP development
objects dialog. Here, the inactive objects are automatically sorted upwards according to the names of
the transport tasks.
To sort for the name of the inactive objects, deselect the Group object list by transport request
checkbox.
c. In the Worklist window, select the relevant objects and choose Activate.
Results
If no error exists, activation will be completed. Otherwise, an error message is displayed. In this case, SAP
recommends that you select the No button to solve the error in the Problems view. If you select the Yes button,
the development objects will be activated with errors.
Related Information
Troubleshooting for Activation Errors in the Context of ABAP Dictionary Objects [page 187]
Troubleshooting for ABAP Syntax Errors and Warnings [page 186]
ABAP Development Objects [page 19]
Creating ABAP Projects [page 115]
Adding a Favorite Package [page 136]
Browsing Development Objects in the Project Explorer [page 127]
Closing ABAP Projects [page 129]
Deleting ABAP Projects [page 130]
In case of activation errors, it can be of advantage for you, to get more information about the diagnosis and
troubleshooting.
Whenever a long-text help for a ABAP syntax error is available in the corresponding ABAP back-end system,
you can access it in the Problems view. To do so, open the context menu for the respective error item in the
Problems view and choose the option Show ABAP Problem Help. The long-text help is then displayed in the
ABAP Problems Documentation view.
A long-text help for a syntax error is available in the system, you can access it using the context menu in the Problems view.
Related Information
The activation of ABAP Dictionary objects or other ABAP objects, which in turn reference ABAP Dictionary
objects (such as data types), can cause errors. This can, for example, occur if for a data element neither a
domain nor a data type is defined in the ABAP Dictionary.
In such a case, you can examine the ABAP Dictionary log for further troubleshooting. To view it for an error item
in the Problems view, select the corresponding function in the context menu.
Use the context menu of an error item in Problems view to open the activation log
Related Information
Context
In ABAP Development Tools, you have following possibilities to run or open executable development objects in
SAP GUI.
Related Information
You can run a development object throuhg an icon in the toolbar or a shortcut.
Context
Note
Every time you run an executable object, such as an ABAP program, the editor opens a new SAP GUI
window by default.
If you want to have it be opened in the same view, use the SAP GUI Integration preference option.
1. Open the Window Preferences ABAP Development SAP GUI Integration page.
2. Select the relevant option where you want to run the application:
○ Reuse SAP GUI window when running applications for in the same view
Procedure
Tip
Results
The ABAP Development Tools runs the selected object or opens the corresponding test environment within the
integrated SAP GUI.
Context
Procedure
Results
The ABAP Development Tools runs the selected object or opens the corresponding test environment within the
integrated SAP GUI.
Context
You can open a development object from the context menu in the Project Explorer.
Procedure
1. Select the relevant object node in the ABAP project in the Project Explorer.
Results
The ABAP Development Tools runs the selected object or opens the corresponding test environment within the
integrated SAP GUI.
Prerequisites
Context
You have, for example, created an ABAP class in an ABAP package and you want to ship it with the productive
ABAP source code to other systems.
Note
This functionality is provided for all development objects that are directly assigned to an ABAP package.
Procedure
1. Open the context menu from the corresponding development object in the Project Explorer or ABAP source
code editor.
2. Choose Change Package Assignment.
The Change Package Assignment wizard is opened.
3. In the New package entry field of the Choose Package page, enter the name of the ABAP package you want
to move the object to.
Note
To display the list of the available ABAP packages, choose Ctrl + Space . A list is then opened where
you can select the relevant entry.
You can also use wildcards like the asterisk ('*') to limit the display of relevant entries.
If you select $TMP package, the user field displays your user name by default. If you want to move your
object to the local package of another user, enter the corresponding user name in the entry field that is
displayed in addition.
4. Choose Next.
The Choose Transport page is opened. In the Affected objects list, the objects that are assigned to the new
package are displayed.
Results
The development object is moved to the selected ABAP package and the content of the Project Explorer is
refreshed.
Related Information
The preview shows whether an individual object can be deleted. If the object can be deleted, the checkbox
next to the object is selected. If not, the checkbox is deselected and you can see the error description in the
Issues column. Objects that cannot be deleted are grayed out.
On each object, you can trigger the context menu.
In some cases, you get a warning message in the Issues column. For example, if the object is used by
another object, or you are currently editing the object. However, you can delete the objects.
If you get an error message in the Issues column, you cannot delete the object. For example, if you try to
delete an ABAP Dictionary object that is used by another ABAP Dictionary object.
Deletion of ABAP Dictionary objects being used by other ABAP Dictionary objects
Note
ABAP Packages containing development objects are a special case. To delete the entire package with its
content, do the following:
An ABAP class is a repository object that contains ABAP source code and describes a real project.
Related Information
Context
You can create local or global ABAP classes to build a template for objects.
The following procedure is for all development objects that you can create completely using the Eclipse-
based wizards. ABAP interfaces and executable programs are created in a similar manner.
Procedure
2. Open the context menu and choose New ABAP Class to launch the creation wizard.
3. Specify the Project and Package properties of the ABAP class to be created.
4. Enter the Name and Description for the class to be created and choose Next.
Note
5. [OPTIONAL:] Enter the name of the Superclass in case the new class has to be inherited from a specific
superclass.
Tip
When editing the superclass, you can avail of the content assist functionality by pressing Ctrl +
Space .
Note
7. Choose Next.
Results
The back-end system creates an inactive version of a class pool in the selected package that is stored in the
class library of the repository. In the Project Explorer, the new class is added to the Source Library of the
corresponding package node. In the source code editor, the initially generated source code is displayed and
ready for editing.
After you have created an ABAP class, the following tabs are available in the class editor:
Tab Description
Global Class Class that is stored in the class library of the central ABAP
Repository
Class-Relevant Local Types Contains local definitions that are referenced in the private
section of the global class
Note
When these local definitions are changed, all subclasses
and friends of the global class must be recompiled be
cause they might depend on these definitions.
Local Types Contains local definitions that are NOT referenced by the
global class
Test Classes Contains ABAP Unit test classes that enable automated
tests during the development phase
Macros Allows you to add macro definitions for the given global class
Caution
Macros are regarded as obsolete technology and should
no longer be used in ABAP classes.
Related Information
Context
You create an exception class to build a template for objects that is the basis for catchable exceptions.
Note
An ABAP exception class is automatically created whenever one of the following superclasses is added to
an ABAP class:
● CX_STATIC_CHECK
● CX_DYNAMIC_CHECK
Note
In SAP NetWeaver 7.5 SP00 and higher, the exception class implements the system interface
IF_T100_DYN_MSG. It extends and covers all functionality of the system interface IF_T100_MESSAGE that
is implemented in the previous SAP NetWeaver releases.
The system IF_T100_MESSAGE is used to statically assign specific messages to an exception class that
defines the semantics of the exception. The system interface IF_T100_DYN_MSG allows you to assign
arbitrary messages of message classes to the exception by using the statement RAISE EXCEPTION ...
MESSAGE ... at runtime.
Procedure
2. Open the context menu and choose New ABAP Class to launch the creation wizard.
3. Specify the Project and Package properties of the class to be created.
4. Enter the Name and Description for the class to be created and choose Next.
Note
○ CX_STATIC_CHECK
○ CX_DYNAMIC_CHECK
○ CX_NO_CHECK
When editing the superclass, you can use the content assist functionality by pressing Ctrl + Space .
Results
The exception class is created just like a regular ABAP class. Therefore, the back-end system creates an
inactive version of a class pool in the selected package that is stored in the class library of the repository. In the
Project Explorer, the new class is added to the Source Library of the corresponding package node.
In the source code editor, the initially generated source code is displayed and ready for editing.
Here, the constructor method of the superclass that is declared in the public section is added. It contains
generated code that reflects the current state of the class hierarchy. Any further changes to the superclass
constructor or the class itself will not trigger automatic adaptation of the constructor code in the exception
class. This behavior is ensured by the ##ADT_SUPPRESS_GENERATION pragma that is added where the
implementation of the constructor method begins.
The constructor code can be only regenerated by executing the cleanup utility in the back end. As a result, your
own code in the constructor method will be lost in ADT after the cleanup.
Note
In the exception class, you can add a code template to the definition part. This enables you to reuse source
code in order to display a specific T100 message.
Context
In the source code editor of an ABAP exception class, you can add the code template
textIdExceptionClass. This code template contains the constant definitions for assigning the message
number and attributes of a message class that are to be displayed.
Procedure
1. In the private section of the ABAP exception class, type textID and open the code completion window.
2. Sample Code
EXAMPLE
In the following example, you see the code snippet of an ABAP exception class referring to a message in the
message class BC_DATAMODEL_SERVICE.
As a result, the exception message is displayed as 'Number of booked places 242 exceeds flight
capacity 200'.
Sample Code
CONSTANTS:
BEGIN OF CX_MY_EXCEPTION_CLASS,
msgid TYPE symsgid VALUE 'BC_DATAMODEL_SERVICE',
msgno TYPE symsgno VALUE '118',
attr1 TYPE scx_attrname VALUE 'BOOKED_SEATS',
attr2 TYPE scx_attrname VALUE 'SEATS',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF CX_MY_EXCEPTION_CLASS.
Related Information
A class consists of several subobjects, such as a public section, method implementation, or local class
includes. Each subobject can be assigned separately to a transport request.
Prerequisites
Context
If you want to edit an ABAP class where the changes have already been assigned to a transport request by
another user, you can assign your changes to a different transport request.
Related Information
Context
If you want to edit an ABAP class where the changes have already been assigned to a transport request by
another user, you can decide whether you want to assign your changes
● to a transport request to which parts of the current class are already assigned
● to a different transport request.
The source code editor will then use and assign all of your changes to the selected transport request.
Note
Only one developer at a time can edit a class. The class is then locked for other users.
Example of a dialog where you select the assignment of the transport request
3. Here you have following options:
○ Select the Link up with selected transport button to combine your changes with the most relevant
transport request that is already being used for this class.
Note
The list of displayed transport requests is automatically preselected by ABAP Development Tools.
○ Select the Select other transport at save button to assign your changes to another existing transport
request from your ABAP system or create a new transport request.
The dialog is closed and you can start editing.
4. Add your changes to the source code.
Note
If you are changing the same subobject that has already been assigned to another transport request,
you will not be able to save your changes. In this case, you will need to select the transport request to
which the subobject is assigned. The reason for this is because changes that depend on each other
must be assigned to the same transport request. Otherwise the functionality may not work.
In order to determine the relevant subobjects, set the Show Transport Request Information for ABAP
Class preference. An icon is displayed afterwards in the marker bar where the changes that are not yet
released are added. For further information, see Displaying the Assignment of Class Artifacts to
Transport Requests [page 204]
Note
If you have selected the Select other transport at save button in step 3, a dialog is opened where you
can select an existing transport request or create a new one.
Note
If you have split the changes amongst several transport requests, an activation or confirmation dialog
is opened. Here you select the transport requests or objects you want to activate.
Results
Your changes are stored, assigned to the selected transport request, and can now be transported to
subsequent systems through your releasing the transport request.
Context
In the marker bar of the ABAP source code editor, you can display the following icons that highlight the
subobjects of the ABAP class to which the changes are assigned
When you hoverover the icon, a popup is opened that displays the:
● Transport number of the assigned transport request and the task number in brackets
● Name of the relevant class
● Name of the user who is owner of the transport request
● Changed subobject(s)
If you wish that ABAP Development Tools (ADT) displays the icon, you will need to activate the following setting
in the Preferences page:
Window Preferences ABAP Development Editors Source Code Editors Show Transport Request
Information for ABAP Class
You can execute an ABAP class directly in ABAP Development Tools (ADT).
Prerequisites
This functionality is provided for SAP NetWeaver AS for ABAP 7.51 innovation package SP01 and higher.
Context
You want to display any kind of text and/or content of internal tables into the Console view in ADT.
You want to execute an ABAP class without launching the integrated SAP GUI.
Procedure
Example
METHOD if_oo_adt_classrun~main.
SELECT * FROM snwd_bpa INTO TABLE @DATA(lt_data).
out->write(
EXPORTING
data = lt_data
name = 'Output Title'
).
ENDMETHOD.
To define the output, the name of the output title and an internal table are added as exporting
parameters.
Here, to add a title to the console view, an export parameter is used in the out->write statement.
Alternatively, you can launch the ABAP class from the corresponding context menu in the Project Explorer.
Results
The main method of the class is executed and the text output is written to the Console view that is opened.
You can now check the text output, or copy and paste it, for example, to a text file.
Related Information
An ABAP program is a repository object that contains ABAP source code and has a program type.
Related Information
Context
Procedure
2. Open the context menu and choose New ABAP Program to launch the creation wizard.
3. Specify the Project and Package properties of the ABAP class to be created.
4. Enter the Name and Description for the class to be created and choose Next.
5. Assign a transport request.
6. Start the creation with Finish.
Results
The back-end system creates an inactive version of a program in the selected package that is stored in the
repository. In the Project Explorer, the new program is added to the Source Library of the corresponding
package node. In the source code editor, the initially generated source code is displayed and ready for editing.
To enable certain functions (for example, ABAP syntax check, navigation, and so on) in the ABAP source code
editor, you need to select a main program for the include.
Prerequisites
This functionality is provided in SAP NetWeaver 7.4 SP08 and higher as well as in 7.31 SP14 and higher.
Typically, an ABAP include is used by exactly one main program. This main program is then automatically
selected by ABAP Development Tools (ADT).
If an include is used in several main programs, you need to select a specific main program in order for the
functionality to be executed.
Procedure
1. Open an include that is used in several main programs by double-clicking, for example, from the Project
Exploreror a search result list, or by pressing Cltr + Shift + A.
A dialog is opened for selecting a main program. If possible, ADT already preselects the most relevant main
program.
Results
1. If you have selected a main program, all the functions that are now executed in the ABAP source code
editor will take the selected main program into consideration.
2. If you have not selected any main program and you are executing an operation such as syntax checking,
activating, and so on, an error message will be displayed in the status bar. You can then select a main
program from the Properties view, as described below, and repeat your operation. Otherwise, you can only
continue working with functionalities that are independent of the main program.
The selection is valid until you close the include editor. Alternatively, without closing the include editor, you can
select another main program by opening the Properties view. In the Specific tab, your previous selection is
displayed. Here, you can also select a main program from the dropdown list.
Related Information
You want to execute an ABAP program without launching the integrated SAP GUI and display its result in the
Console view directly.
Prerequisites
This functionality is provided for SAP NetWeaver AS for ABAP 7.52 SP00 and higher.
Context
Note
In the source-based editor, choose Run ABAP Application (Console) from the context menu of the
relevant ABAP program.
Alternatively, you can launch the ABAP program from the corresponding context menu in the Project Explorer
or press F9 .
Results
Example of the content to be displayed in the Console view after launching an ABAP program
● Creation date
● Object description
● Pagination
● Program result
Related Information
Function modules allow you to encapsulate and reuse global functions in an ABAP system.
Related Information
Context
You create an ABAP Function Group in order to group function modules and includes with similar or
complementary functions.
Procedure
1. In your ABAP project, select the relevant Package node in the Project Explorer.
2. Open the context menu and select New Other Repository Objects .
3. Expand the Source Library folder and select ABAP Function Group.
4. Choose Next.
5. In the following dialog, enter a unique name for the new function group in the Name field.
Note
Note
The Original Language is already predefined by the default language of the ABAP project.
7. Choose Next.
8. Assign a Transport Request.
9. Choose Finish.
10. Activate the new ABAP Function Group.
The ABAP repository creates a new function group in the selected package and adds it in the Project Explorer to
the Source Library folder.
The function group automatically contains a TOP include and a UXX include.
Display of created includes as new folder level in the Project Browser and source code in the definition part
Related Information
Prerequisites
You have created a function group in which you want to add the function module.
Context
You can create an ABAP Function Module for which you provide reusable functions.
Procedure
1. In your ABAP project, select the relevant Package node in the Project Explorer.
2. Expand the Source Library folder and select the relevant Function Group.
3. Open the context menu and select New ABAP Function Module .
4. In the following dialog, enter a unique name for the new function group in the Name field.
Note
The Original Language will automatically be assigned with the same language as defined in the function
group.
Note
The Original Language is already predefined by the default language of the ABAP project.
7. [Optional] Choose the Browser... button if you want to add the function module to another Function Group.
8. Choose Next.
9. Assign a Transport Request.
10. Choose Finish.
Results
The function module is assigned to the function group selected in the function module folder of the Source
Library.
In the next step, you can enter the definition part and implementation part of the function module.
Related Information
Context
Procedure
Note
Caution
Do not add any comments to parameters in the definition part. Otherwise they will be deleted after
saving and activating the function module.
Tip
You can use the following template in the definition part of your function module:
IMPORTING
IM_PARAM1 TYPE ANY
IM_PARAM2 TYPE REF TO <ref_type>
EXPORTING
EX_PARAM_1 TYPE ANY
EX_PARAM_2 TYPE REF TO <ref_type>
CHANGING
CH_PARAM TYPE ANY
TABLES
TAB_PARAM TYPE STANDARD TABLE
EXCEPTIONS
EXCEPTIONS_VALUE.
Caution
Do not start your own comments with *" or *"--- as these are reserved for the parameter block in the
function editor of the back end. Start your comments for each line with * or ".
Prerequisites
You create an ABAP Function Group Include to separate and modularize functionality.
Context
You can create an ABAP Function Module to which you provide reusable functions.
Procedure
1. In your ABAP project, select the relevant Package node in the Project Explorer.
2. Expand the Source Library folder and select the relevant Function Group.
3. Open the context menu and select New ABAP Function Group Include .
4. In the following dialog the Name will automatically be entered.
Note
The name will be constructed using the following convention: [/name space/] [L<Name of the
function group>ID of the include suffix]. L stands for the standard prefix for ABAP
function group includes.
Note
The Original Language will automatically be assigned with the same language as defined in the function
group.
6. [Optional] Click the button Browser... if you want to add the function module to another Function Group.
7. Enter the Suffix for the include.
Note
Results
The include will be created on the relevant function group in the Project Browser. It will also be added with the
statement INCLUDE <Include Name> into the main program.
Display of the created group include in the Project Browser and in the editor of the main program
Related Information
Context
You can add following suffixes to the ABAP function group includes:
Note
$nn, Unn, Vnn, Cnn, T01 - T98 are reserved suffixes. They cannot be used.
Related Information
Context
ABAP Development Tools (ADT) provides you with tools for comparing source code. You can see how code has
changed over time. You can also compare code versions across ABAP projects (ABAP systems).
You can compare non-code objects, such as Data Dictionary data elements, using the SAP GUI tools in the
back-end system.
Differences are displayed in the compare editor. Here, you can edit and merge changes. This enables you to
take over single or all adoptions from one system to another or from previous to the inactive version of the
object. For more information, look here Merging changes in the compare editor . Additionally, you can unlock
objects or open them in their default editor through the context menu.
Note
You can compare non-code objects, such as Data Dictionary data elements, using the SAP GUI tools in
the back-end system.
Related Information
Context
For finely detailed analysis of recent changes to source code, use the local version history. The local version
history lets you examine changes between saves in the ADT, showing changes in the code as stored in the local
workspace.
Procedure
Results
The Compare Editor is opened. It shows the currently open code in the Local: view. The saved code version is
shown with its time stamp in an adjacent view.
Changes are highlighted in the two windows. Locations or changes are shown as icons at the right edge of the
saved code version.
Related Information
At the next level of granularity, you can compare changes from one transport of source code to another.
Context
You usually transport ABAP code much less frequently than you save it in the ADT. Therefore, comparing
transported code versions shows changes over a much longer period of time than the local version history
does.
Procedure
1. From the context menu of an object in the Project Explorer or in the source code editor, choose Compare
With Revision History
In the ABAP editor, the comparison automatically appears with the open code. If you are comparing an
ABAP class and start from the Project Explorer), you can choose the section of code you wish to compare.
For example, you can compare 'global class' code or 'ABAP Unit test code' versions.
2. Double-click the active version or one of the transported versions of the code.
Results
The Compare Editor is opened. It shows the currently open code in the Local: view. The saved code version is
shown with its time stamp in an adjacent view.
Changes are highlighted in the two windows. Locations or changes are shown as icons at the right edge of the
saved code version.
Related Information
Context
You can also compare the newest version of a program in each of two ABAP projects. You can use this
comparison to check code levels in separate ABAP back end systems. (Comparing projects within a single
system always shows you the same code version, since ABAP code is independent of clients within a system.)
For example, you can check whether a correction in the development system has already been transported into
the consolidation system.
Procedure
From the context menu of an object in the Project Explorer or in the source code editor, choose Compare
With ABAP project , where ABAP project is one of the ABAP projects defined in your ADT.
Results
A new editor window opens, showing the currently open code in the Local: view. The saved code version is
shown with its time stamp in an adjacent view.
Changes are highlighted in the two windows. Locations or changes are shown as icons at the right edge of the
saved code version.
Note
You can use the Alt Shift C shortcut. Then, ADT identifies the changes between the same development
object between the current and the last used ABAP system. The differences are displayed in a popup.
Related Information
Context
Note
You can compare non-code objects, such as Data Dictionary structures or tables, using the SAP GUI tools
in the back end system.
Related Information
You can use code folding to hide or display a block of code in order to get a better overview and to improve
readability.
Context
You can use code folding to hide or display coherent parts of source code blocks such as:
● A class itself,
● A class definition and/or implementation part,
● Methods,
● If clauses,
● Loops,
● Test seams,
● A list of several coherent CDS annotations or comments,
● And so on
1. To define the general behavior for a development object, choose one of the following entries from the
context menu of the ruler in the source editor:
Results
When the block is expanded, the sign is displayed and a vertical line from the first to the last row of the fold
indicates its range.
When the block is collapsed, the sign and only the first row of the fold is displayed. The remaining code of the
block disappears from the source editor. The latter is indicated by the indicator. The row numbering remains
as before execution. Note that the hidden source code is not deleted and is still available for your development
object.
Example
By default, the complete source code is displayed without any code folding.
When hovering over the sign, a popup will display the hidden code.
Context
Note
The following procedure is for all development objects that you can create completely using the Eclipse-
based wizards. ABAP classes and executable programs are created in a similar manner.
Procedure
2. Open the context menu and choose New ABAP Interface to launch the creation wizard.
3. Specify the Project and Package properties of the ABAP interface to be created.
4. Enter the Name and Description for the interface to be created and choose Next.
Note
5. [OPTIONAL:] Choose Add... to search and select one or more interfaces to be implemented in the interface
you want to create.
6. Choose Next.
Results
In this part of the documentation you will find detailed descriptions of the elementary activities concerning
classic objects in ABAP Dictionary as such.
The ABAP IDE provides a number of functions and utilities for efficiently editing the following ABAP Dictionary
objects:
● Working with Domains [page 226]Working with Data Elements [page 231]
● Working with Structures [page 238]
● Working with Database Tables [page 243]
Related Information
You can create and work with domains in ABAP Development Tools (ADT) using the Domain Editor.
The functionality is available as of SAP NetWeaver AS for ABAP 7.51 innovation package SP01.
Related Information
A domain specifies the technical characteristics and the allowed values of a field.
Prerequisites
● This functionality is provided as of SAP NetWeaver AS for ABAP 7.51 innovation package SP01.
● You have identified the ABAP package in which the development object is going to be created.
Tip
If you have not yet already done so, add this package to the Favorites of your ABAP project. See also:
Adding a Favorite Package [page 136]
Procedure
Results
The inactive version of a domain is created and stored in ABAP Dictionary. In the Project Explorer, the new
domain is added to the Dictionary folder of the corresponding package.
You now need to define the data type format of this domain.
Related Information
Prerequisites
● You can create an append domain only on the basis of an existing domain.
Context
You create an append to add further fixed values to an existing domain without modification.
Procedure
1. In the Project Explorer, choose New Append Domain from the context menu of the base domain.
Note
3. Choose Next.
4. Assign a transport request.
5. Start the creation with Finish.
Results
The inactive version of an append domain is created and stored in ABAP Dictionary. In the Project Explorer, the
new append domain is added to the Dictionary folder of the corresponding package.
The ABAP Dictionary editor is opened. Here you define the fixed values that you want to add to the base
domain.
Related Information
Prerequisites
This functionality is provided as of SAP NetWeaver AS for ABAP 7.51 innovation package SP01.
Context
1. Toolbar containing actions, such as opening the object in another project, sharing link, opening the context
help
2. Format for defining the technical attributes, such as the predefined type, its length, and decimal places
3. Output Characteristics for output-relevant semantic attributes, such as output length, conversion routine,
sign, and case-sensitivity
4. Fixed Values with buttons for defining, editing, sorting, and deleting values or intervals of values as well as
for adding a value table
Tip
To get support from the content assist, choose Ctrl + Space . Then, the relevant proposals are
displayed for selection.
b. In accordance to the selected data type, enter the Length* and Decimals* to define the number of
decimal places.
3. In the Output Characteristics section, you can maintain the semantic output attributes.
The Open ABAP Development Object dialog is opened and lists the conversion function modules.
c. Select the relevant function module and confirm with OK.
The conversion ID (consisting of five characters) from the name of the selected function module is
added in the input field.
d. Depending on the selected data type, you can maintain additional information such as Numeric Sign,
Case-sensitive, AM/PM time format supported, and so on.
4. In the Fixed Values section, you can enter the possible values for this domain and assign a value table.
a. Define a value in the Fixed Value column and provide a Description for it.
b. [Optional] To define a value range with lower and upper limits, select the Intervals checkbox.
Tip
To get support from the content assist, choose Ctrl + Space . Then, the relevant proposals are
displayed for selection.
5. Choose to save.
6. Choose to activate.
Related Information
You can create and work with data elements in ABAP Development Tools (ADT) using the Data Element Editor.
You create and edit data elements to define an elementary data type or a reference type.
Note
You can only create and edit data elements in a form-based editor if your IDE is connected with SAP
NetWeaver 7.5 SP00.
Related Information
Prerequisites
● You have identified the ABAP package in which the development object is going to be created.
Tip
If you have not yet already done so, add this package to the Favorites of your ABAP project. See also:
Adding a Favorite Package [page 136]
● Your Eclipse-based IDE is connected with SAP NetWeaver 7.5 SP00 or higher.
Procedure
Results
The inactive version of a data element is created and stored in ABAP Dictionary. In the Project Explorer, the new
data element is added to the Dictionary folder of the corresponding package.
The Data Element Editor is opened. Here you can edit the data element.
Related Information
Prerequisites
Your Eclipse-based IDE is connected with SAP NetWeaver 7.5 SP00 or higher.
Context
1. Toolbar containing actions, such as opening the object in another project [page 160], sharing link [page
169], and opening the context help
2. Data Type Information for defining the type of the data element based on a predefined type, a domain, and
so on.
Select the relevant Category from the dropdown listbox.
The subsequent options are available to you.
When entering, a name in an entry field, for example, you can benefit from the content assist
functionality. Edit its first letters. Then, choose Ctrl + Space to display and select relevant
proposals.
○ If the data element needs to have the type attributes of a domain, select Domain.
In this case, enter the name of a domain in the Type Name field.
You can also define a new domain. To create it, enter the name of the new domain in the Type Name
field and then double-click it.
○ If you choose Predefined Type, you can define the data type, length, and the number of decimal places
of the data element using the direct type in the Type Name field.
○ If the data element needs to describe a reference type, choose one of the following Reference To types
to define the data type, length, and number of decimal places of the data element:
○ Reference to Predefined Type to map to a predefined type in ABAP Dictionary and its fundamental
technical attributes
○ Reference to Dictionary Type to map to a data type of the ABAP Dictionary
○ Reference to Class/Interface to map to an ABAP class or interface of the repository
3. Field Labels for defining the relevant UI text and its maximum length as well as to add supplementary
documentation.
You can use short, medium, and long field labels, and the title. Each label is an input template. It represents
entry fields that refer to this data element.
To open the Change Data Element screen in the SAP GUI for creating a text that describes the contents
of the data element, choose the button Open Documentation with SAP GUI. This content is displayed
for the F1 help in all screen fields that refer to this data element.
Note
You should only leave out this step if the data element does not appear on a screen. In this case, you
must set the documentation status appropriately.
4. Additional Properties for adding search helps or defining the reading direction of UI text and so on.
In this section, you have the following options:
○ In the Search Help area, choose the link on the Name label or enter the name of a new search help
object in order to reference or create a new search help object. In addition, you can define a Parameter.
You can assign a search help to the data element that is displayed in all the screen fields referring to
this data element when the input help ( F4 help) is called. Assign the search help by specifying the
name of the search help in the Name field and an export parameter in the Parameter field.
The data element of the parameter is automatically copied from the selection method. The data
element defines the output attributes as well as the F1 help of the parameter in the hit list and in the
dialog box for value selection.
○ Enter a Parameter ID to associate a data element with an SPA/GPA parameter.
A field can be filled with default values from the SAP memory using a parameter ID. A screen field is
automatically filled with the value stored under the parameter ID of the data element only if this was
explicitly permitted in the Screen Painter.
Example
If a user only has authorization for company code 001, this company code can be stored in the
memory under the corresponding parameter ID at the beginning of a transaction. Fields that refer
○ Enter a Component Name to structure the reference of components or table fields to the entered data
element.
You can store a proposal for the name of the table fields or structure components that refer to a data
element. This results in a more unified assignment of field and component names. Assign the default
component in the Component Name field.
Tip
Always use this default name for components in BAPI structures (structures with a fixed interface).
○ Select the checkbox Change Document Logging to log changes to fields in database tables defined with
reference to this data element.
The data of a business-oriented object can be distributed to several tables. To trace changes to a
business object, these tables can be combined in a change document object. Function modules that
can be integrated in the corresponding application programs and that log these changes are generated
from such an object.
○ Select the checkbox Input History to activate or deactivate the SAP GUI history for dynpro fields
defined with direct or indirect reference to the data element.
If this checkbox is set, the mechanism for handling the input history of a screen input field is switched
off. This option is used mostly for fields containing sensitive data, such as account numbers. Deselect
the Input history checkbox to turn off logging input history.
○ Select the checkbox Bidirectional Option to define the behavior of dynpro fields or Web Dynpro
fields in order to handle bidirectional fonts.
You can find information about the activation flow in the activation log. To display it, open the ABAP Log view. If
errors occurred, the activation log is automatically displayed.
Note
The usability of the editor in ABAP Development Tools (ADT) is similar to transaction SE11 in the back
end.
Related Information
The documentation status is a subobject of a data element. It specifies whether documentation has already
been written or whether it is required.
Context
Procedure
1. In the toolbar of the Field Labels section, choose the Documentation Status button.
Note
If you choose a status that does not explicitly require documentation for a data element, the existing
documentation will be deleted.
3. To assign the changes you made to the subobject to an existing transport request or a new transport
request, choose Next.
4. Confirm with Finish.
Results
The documentation relevance of the data element is adopted according to your selection.
Related Information
You can provide additional supplement documentation for each data element.
Prerequisites
Context
You create supplementary documentation for a data element in order to provide individual program-specific
and dynpro-specific field help.
Procedure
1. In the toolbar of the Field Labels section, choose the Supplement Documentation button.
2. In the dropdown listbox, choose New... to create new supplementary documentation.
The documentation editor is opened in the integrated SAP GUI. Here you can add your individual
documentation.
Results
Note
To display your supplementary documentation on a dynpro field, you must assign the supplement ID to the
corresponding dynpro field in the THLPF database table.
You can create and work with structures in ABAP Development Tools (ADT) using the Structure Editor.
Note
You can only create and edit structures in a source-based editor if your IDE is connected with SAP
NetWeaver 7.5 SP00.
Related Information
Prerequisites
Tip
If you have not yet already done so, add this package to the Favorites of your ABAP project. See also:
Adding a Favorite Package [page 136]
Context
You create structures to define a structured type that contains other data types as components.
Results
The inactive version of a structure is created and stored in ABAP Dictionary. In the Project Explorer, the new
structure is added to the Dictionary folder of the corresponding package.
The Structure Editor is opened. Here, the initially generated source code is displayed and ready for editing.
Related Information
Prerequisites
● You can create an append structure only on the basis of the existing structure.
● This functionality is provided since SAP NetWeaver 7.5 SP00.
You create append structures to add components or component extensions to an existing structure without
modifying the latter:
Procedure
Note
○ By opening the context menu on the base structure in the Project Explorer: Then, select New
Append Structure.
○ By opening the base structure in its ABAP Dictionary editor: Then, in its define type statement,
get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or
by using the Quick Assist view. Apply Create append structure for.
○ By adding a code template: To do this, select the complete source code of the base structure and
add the appendStructure code template. Note that you rename the append structure after
adding the code template. Otherwise, a syntax error is displayed when you save.
Note
3. Choose Next.
4. Assign a transport request.
5. Start the creation with Finish.
Results
The inactive version of an append structure is created and stored in ABAP Dictionary. In the Project Explorer,
the new append structure is added to the Dictionary folder of the corresponding package.
The source-based ABAP Dictionary editor is opened. Here, the initially generated source code is displayed and
ready for editing.
The append structure is introduced with the structure annotations of the base structure, followed by the
extend type ... with keywords. Within the curly brackets, you can add the components that you want to
add on to the base structure.
In the ABAP Dictionary editor for structures, you can use most of the functions you are already used to for
development objects.
Context
Example of functionalities that are provided in a source code editor for structures
Standard
Editing [page 325]
Convenience
Navigation F3
Others
Version History [page 219]
Context-sensitive syntax F1
documentation
Related Information
You can create and work with database tables in ABAP Development Tools (ADT) using the Database Table
Editor.
Note
The functionality is provided since SAP NetWeaver AS for ABAP 7.52 SP00.
Related Information
A database table represents the display format for data in a relational database.
Prerequisites
Tip
If you have not yet already done so, add this package to the Favorites of your ABAP project. See also:
Adding a Favorite Package [page 136]
Context
Procedure
2. Open the context menu and choose New Other ABAP Repository Object Dictionary .
3. Select Database Table to launch the creation wizard.
Results
The inactive version of a database table is created and stored in ABAP Dictionary. In the Project Explorer, the
new database table is added to the Dictionary folder of the corresponding package.
When the table is created in the database, the technical settings of the table are created automatically with the
default values. In the Project Explorer, you can find technical setting in the Technical Table Settings folder below
the database table.
You now need to continue, for example, defining the annotations, adding fields. To do this, you can benefit from
the content assist ( Ctrl + Space ).
To edit the technical settings of the table open the Technical Table Settings Editor.
Note
To edit technical settings (data class, size category, buffering, and storage type) or to create/edit
indexes, open the integrated SAP GUI.
Related Information
Context
In the following figure, you see an editor for database tables in ADT.
Standard
Editing [page 325]
Convenience
Navigation F3
Others
Version History [page 219]
Context-sensitive syntax F1
documentation
You can edit technical settings of the database table using the Technical Settings Editor:
1. Toolbar
The toolbar contains actions such as opening the dictionary log, opening the object in another project, sharing
ADT link, and opening documentation.
2. General Settings
In this section you can define the Data Class, Size Category, Storage Type, and Sharing Type of the table.
3. Buffering
In the buffering section you can specify whether the table is buffered and how. From the dropdown menu of the
State field, select one of the following buffering states.
If the buffering is allowed or switched on, specify the buffering type. From the dropdown menu of the Type field
select one of the following types.
4. Data Changes
Enable or disable the Log Changes checkbox to specify whether changes to the table's records are logged.
Related Information
Context
Related Information
Context
Procedure
2. Open the context menu and select New Other ABAP Repository Object Dictionary Table Type .
3. Specify the Project and Package.
4. Enter the Name and Description for the table type you want to create.
You can edit the existing table type in the Table Type Editor.
1. Toolbar
The toolbar contains actions such as opening the dictionary log, opening the object in another project, sharing
ADT link, and opening documentation.
2. Row Type
In this section, you can define the data type of a row in the internal table.
● Dictionary type
● Predefined type
● Reference to predefined type
● Reference to dictionary type
● Reference to class/interface
● Range table on predefined type
● Range table on data element
In the field Type Name, select the type. For example, if you chose dictionary type as a category, enter a
dictionary object, such as a database table, view, or data element in the field. You can use functionalitys or use
the Browse button to search for the type.
For Range Table on Data Element, you can create a data element by clicking the link Type Name and a new
range structure by clicking the link Range Structure or select the existing objects using the Browse button.
Tip
You can navigate to the type or to the range structure by clicking the Type Name or Range Structure link.
In this section, you can define the initial number of rows and options for accessing the data in the internal table.
Select the access mode in the dropdown list of the Access field.
In this section, you can define primary and secondary keys and specify key attributes.
Select the key on the left side in the Key Overview section to specify the attributes on the right side in the Key
Details section.
You can add secondary keys as follows:
In the section Key Details on the right side, you can specify a key definition and key category for the primary
key. For the secondary key, you can specify a name, description, key definition, and key access.
Related Information
You can create and work with lock objects in ABAP Development Tools (ADT) using the Lock Object Editor.
Note
Related Information
You can create lock objects in ABAP Development Tools (ADT) using the creation wizard.
Note
6. Select Next.
7. Assign a transport request.
8. Select Finish.
Result
The inactive version of the lock object is created. In the Project Explorer, the new lock object is added to the
Dictionary folder.
The lock object editor is open and ready for editing now.
Related Information
1. Toolbar
The toolbar contains actions such as opening the dictionary log, opening the object in another project, sharing
ADT link, opening documentation.
2. Primary Table
The primary table, which you selected in the creation wizard is automatically inserted. If needed, you can
change the table. Navigate to the selected table by clicking the link Table:.
3. Lock Modules
You can enable or disable accessing the lock modules from other systems with Allow RFC checkbox. The lock
modules are automatically generated and inserted in the Lock, Unlock fields after activating the lock object.
You can maintain the secondary tables, which have a foreign key relation to the primary table. Use and
5. Lock Parameters
Primary keys of the selected tables are displayed here. You can switch off the lock parameters by clicking the
checkboxes in the Active column. If the parameter names of the primary and secondary tables coincide,
rename the corresponding entries.
Related Information
When you change a database table in the ABAP Dictionary, the database table needs to be adjusted
accordingly.
This can be caused by direct changes in the database table or indirect changes in domains, data elements, or
structures that are used by the database table.
Direct Changes
If you change the type of the table field directly in the database editor, the modified field type in the editor does
not match the field type in the database. Apply a quickfix to adjust and activate the database table with data
conversion or data deletion.
If you change the type of the table field indirectly, for example in the data element or domain editor, you cannot
activate the object due to a mismatch of the field type in the dependent table. In the Problems view, select the
error with a quick fix and type Ctrl + 1 . In the opened dialog, select a quickfix to adjust the table and to
activate the objects.
You can create and edit Number Range Objects in Number Range Object Editor.
Related Information
Context
You can create number range objects in ABAP Development Tools (ADT) using the creation wizard.
Procedure
1. You can start the creation wizard from the main menu, toolbar, Project Explorer, or using a shortcut. For
more information, see Creating Development Objects [page 153].
2. In the creation wizard, fill in the project and package, if not already filled.
3. Enter the name and description of a range number object.
Note
A new number range object is created and opened in the Number Range Object Editor.
Related Information
Context
1. Section header includes Header Data Information for defining the Number Range Object. description
can be changed in the Properties view. masterLanguage and abapLanguageVersion are information
only and can’t be changed.
2. In section interval, define the properties of intervals of the number range object. For
numberLengthDomain add an own data element of your component. If needed change value
percentWarning. It’s a percentage of numbers remaining in a number range, upon reaching which in
number assignment a warning is given. Assuming an interval from 1 to 1000 and a percentage of 10 (%) is
used a notification will be triggered if number 900 has been reached.
Add for a data element if the number range intervals should distinguish between further subobjects.
Set untilYear to true if the number range intervals are distinguished according to To-fiscals.
Set rolling to false to prevent the number range object intervals from automatically starting from the
beginning at the upper limit.
If prefix is set to true determined numbers consist of the prefix (name of subobject) and the numbers.
3. Section configuration defines properties of the number range object.
Related Information
You can document development objects in the Knowledge Transfer Document Editor.
Related Information
4. Select Next.
5. Assign a transport request.
6. Select Finish.
Result
A knowledge transfer document is opened in the Knowledge Transfer Document Editor. You can now document
the object and its element.
1. Toolbar
In the toolbar, you can perform actions, such as opening an object in another project, sharing the link, or
opening the help.
2. Object Structure
In this section, the object is displayed with its elements structured hierarchically as a tree.
The number in brackets next to an element describes the number of characters in the corresponding
documentation and thus indicates that the element has already been documented. This number also gives
you an impression about the amount of documentation provided.
From the context menu on each element, you can either open the element in its editor or copy the element
name.
You can toggle a search field using Ctrl + F . Press Ctrl + F or Esc to hide the field again.
3. Documentation
This is where you can document the object and its elements using markdown syntax. Content assist
functionality Ctrl + Space proposes available such as bold, italics, lists and links.
4. You can display an HTML preview of the documentation by selecting Preview tab.
Unassigned Texts
If a documented element was renamed or deleted, the documentation for the element is displayed under the
Unassigned Texts node. From there, you can consider to copy the documentation to another element or to
delete it using the context menu.
In the Knowledge Transfer Document Editor, you can link to development objects and their elements. Use
content assist functionality to complete the link as shown below.
Related Information
In this section you find information how to define BAdIs and how to implement BAdIs using an existing
enhancement spot.
Related Information
You can create BAdI Enhancement Spots and define BAdIs in the BAdI Enhancement Spot Editor.
Related Information
Context
BAdI definitions are defined in BAdI Enhancement Spots. You can create BAdI Enhancement Spots in ABAP
Development Tools (ADT) using the creation wizard.
Procedure
1. To create a BAdI Enhancement Spot, start the creation wizard from the main menu, toolbar, Project
Explorer, or using a shortcut. For more information, see Creating Development Objects [page 153].
2. In the creation wizard, fill in the project and package, if not already filled. Fill in the name and description of
the BAdI Enhancement Spot.
Results
BAdI Enhancement Spot is created and opened in the BAdI Enhancement Spot Editor. In the editor, you can
create new BAdI definitions.
Related Information
You can edit BAdI spots in the BAdI Enhancement Spot Editor.
1. Toolbar
In the toolbar, you can perform actions, such as opening an object in another project, sharing links, or
opening the help menu.
2. BAdI Definitions
In this section, you can add BAdI definitions using the Add BAdI... button.
To add a filter, use the Add Filter... button in the BAdI Definitions section. After specifying the name for the
filter, the Filter Details section is opened in the editor. Fill in the description and select the filter type.
To specify a constant filter value when using GET BADI, select the checkbox Only constant filter values.
Related Information
To implement an existing BAdI Enhanacement Spot, create a BAdI implementation and edit it in the BAdI
Implementation Editor.
Related Information
Context
To create a BAdI implementation, you need to create a BAdI enhancement implementation first, where you can
add BAdI implementations.
Procedure
1. To create a BAdI Enhancement Implementation, start the creation wizard from the main menu, toolbar,
Project Explorer, or using a shortcut. For more information, see Creating Development Objects [page 153].
2. In the creation wizard, fill in the project and package, if necessary. Enter the name and description of an
enhancement implementation. Select an enhancement spot you want to enhance using the Browse button.
6. In the BAdI Implementations section of the editor, add a BAdI implementation using the button.
Results
You can now edit the implementation using the BAdI Enhanacement Implementation Editor.
Related Information
You can edit BAdI implementations in the BAdI Enhancement Implementation Editor.
1. Toolbar
In the toolbar, you can perform actions, such as opening an object in another project, sharing links, or
opening the help menu.
2. General Information
This is where you can find information about the name of the enhancement spot and whether a switch is
assigned.
3. BAdI Implementations
This section contains a list of BAdI implementations and the filters with their values. Here you can add or
remove implementations and filter values.
To add filter combinations, select the Add Filter Combinations button. The Filter Details section is opened in
the editor. Select a comparator from the drop-down list and fill in the filter value.
You can add more complex conditions from the context menu of the filter value.
4. BAdI Implementation Details
The BAdI Implementation details provide the name and description of the BAdI implementation, the BAdI
definition, and the implementing class.
You can configure a BAdI implementation as follows:
○ Default implementation
A default implementation is called at runtime. However, it can be overridden by an implementation that
is not marked as default.
○ Example implementation
An example implementation serves as an example for an implementation and is not executed itself.
○ Customizing supported
If the checkbox Customizing supported is selected, the activation status of the BAdI implementation
can be overridden in IMG.
5. Runtime Behavior
If you select the Active Implementation checkbox, the implementation is executed, assuming the filter
conditions are fulfilled.
Related Information
In SAP NetWeaver 7.4 SP 5 as well as 7.31 SP11 or higher, you can display the source code plug-ins in the source
code editor of a class, program, or function group. The source code plug-ins of the available enhancement
implementations are displayed in the enhancement popup.
Since AS ABAP 7.53 you can edit source code plug-ins in the enhancement implementation editor.
Since AS ABAP 7.54 you can create enhancement implementations and enhancement implementation
elements in the ABAP Development Tools.
Related Information
In SAP NetWeaver 7.4 SP 5 as well as 7.31 SP11 or higher, you can display the source code plug-ins in the source
code editor of a class, program, function group, or type group.
The available plug-ins are indicated by the source code plug-in marker . If you hover the cursor over the
marker, the source code plug-ins are displayed in the popup.
In the top line or the upper part of the enhancement popup, the following information can be displayed:
If there are multiple enhancement implementations available, the hierarchy of the source code plug-ins is
displayed in the popup. You can select which implementation you want to be displayed.
The following enhancement popup is displayed if there are multiple enhancement implementations.
Note
● Select F2 or click the enhancement popup to set the focus. Now you can navigate within the
enhancement popup.
● You can navigate to the enhancement implementation editor by clicking the name of the source code
plug-in in the popup.
● You can highlight the lines in the source code where the source code plug-ins are indicated by the
marker as follows: Window Preferences General Editors Text Editors Annotations
ABAP Enhancements Text as ...
Related Information
As of AS ABAP 7.54, you can create enhancement implementations to implement available enhancement
options.
Context
2. From the context menu of the ABAP Editor, select Source Code Show Enhancement Options .
Enhancement options that already contain an implementation are displayed with the following marker .
Enhancement options without implementations are displayed with the following marker .
3. Right-click the marker of the relevant option and select Create Enhancement Implementation....
4. In the wizard that opens, select an appropriate option.
9. Select Finish.
Results
The enhancement implementation element is added and opened in the Enhancement Implementation Editor.
Related Information
Since AS ABAP 7.53 you can edit source code plug-ins in the enhancement implementation editor.
Context
The editor for source code plug-ins supports the following functionalities:
Standard
Editing [page 325]
Convenience
Navigation F3
Others
Version History [page 219]
Note
* These features are available only for enhancement implementations that are executed at runtime.
Therefore the switched off enhancement implementations are not considered.
Related Information
You can create and edit transformations to convert common data structures, such as structures, table types,
and classes (if the IF_SERALIZABLE interface is implemented) into XML format.
Related Information
You can create a simple transformation or an XSLT program to describe transformations between ABAP data
and XML data.
Prerequisites
This functionality has been available since SAP NetWeaver 7.5 SP00.
Procedure
2. Open the context menu and select New Other ABAP Repository Object Transformations
Transformation to launch the creation wizard.
3. Project and Package are automatically inserted. You can change Package if needed.
4. Enter the Name and Description.
5. Select one of the following Templates:
○ XSLT program to convert an XML document to another XML document
○ Simple transformation to convert the ABAP objects structures and table types into XML data
Results
The back-end system creates an inactive version of a transformation on the basis of the selected template in
the selected package. In the Project Explorer, the new transformation is added to the corresponding package
node. In the source code editor, the initially generated XML source code is displayed and ready for editing.
Simple Transformation
If you have created a simple transformation, the following content is generated and added as source text:
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="ROOT"/>
<tt:template>
</tt:template>
</tt:transform>
XSLT Transformation
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sap="http://www.sap.com/sapxsl"
>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
</xsl:template>
</xsl:transform>
Related Information
Context
Standard
Editing [page 325]
Convenience
Navigation F3
Others
Version History [page 219]
Context-sensitive syntax
F1
documentation
Related Information
Since The ABAP Debugger supports simple transformation (ST) in ABAP Development Tools (ADT). Hence, you
can debug and test whether a simple transformation converts ABAP source code to XML as required.
Prerequisites
For debugging simple transformations, a 745 kernel version, which is provided with SAP NetWeaver 7.5
SP00, is required.
Context
You can call simple transformations, for example, in ABAP classes or programs. To test the behavior of a simple
transformation in advance, proceed as follows:
Procedure
If the execution pointer of the ABAP Debugger points at a CALL TRANSFORMATION statement of a simple
transformation, choose F5 .
5. [Optional:] Confirm possible dialogs whenever you are asked to switch to the Debug perspective with Yes.
The Debug perspective is opened. The ABAP Debugger will stop directly at the breakpoint.
6. [Optional: ] Simple transform template calls are reflected by the ABAP Debugger stack. Therefore, you can
navigate to calling templates or ABAP methods on the ABAP stack. To do this, proceed as follows:
a. In the Debug view, double-click the relevant template or method.
The source code editor displays the corresponding source code and sets the execution pointer at the
calling position. In addition, in the Variables view, the current value of the selected parameters, local
variable, and data nodes are displayed.
7. [Optional: ] To display the current value of variables, parameters, and data nodes of simple
transformations, hover the relevant symbol on the simple transformation source or double-click it.
A popup is opened that displays the current value of the selected element.
You can create and group messages in message classes in order to inform the user about an error or a status,
or to issue a warning.
Context
Note
You have to activate a message class after you have edited or created it.
Related Information
Context
You create a message class to group and reuse messages in a development object.
2. In the context menu of the package, choose New Other ABAP Repository Object .
3. In the New ABAP Repository Object window, select the Message Class folder and expand it.
4. Choose Message Class.
5. Choose Next.
6. In the Name field, enter the Name of the new message class.
Note
Results
In the Project Explorer, the new view is added to the Dictionary folder of the corresponding package node.
As a result of this creation procedure, the editor will be opened. You can now add messages to the message
class.
Related Information
Prerequisites
An appropriate message class to which you want to add a message must exist.
Context
Procedure
Note
Enter a unique 3-digit message number that is not already used in the corresponding message class.
Note
If you edit an existing message, the whole message class is blocked for other users. The blockage is
closed after saving your changes.
6. Enter the message short text.NOTE: You can enter up to 73 digits, maximum.
7. Specify for each message if it is Self Explanatory.
Note
Messages that are marked as self-explanatory need no further explanations. If this checkbox is not
activated a long text has to be added.
The system creates the message in the development object Message Classes It is stored in table T100 and can
be displayed.
Related Information
Prerequisites
Context
If you need to display a message with more than 73 digits, enter a long text for the message.
Note
Long text can be added to every message which is not marked as self-explanatory. If you add long text to a
message, the editor will automatically deactivate the checkbox.
Procedure
Note
You can only add a long text to a message, if the message is not marked as Self Explanatory.
Display of the Workbench editor where you add a long text to a message
7. Save the entries.
8. Activate the message class.
Results
The entered text will be saved in the master language of the ABAP project.
Note
All messages which have been created or changed will be locked until they are saved. So, no other user can
edit them until they are saved.
Prerequisites
● if the ABAP project is opened in the original language. If no translation is available, a standard message is
displayed.
● if the message is not activated as self-explanatory.
Context
In the Long Text Preview window, you can display the long text of a message that was added through the back
end in an ABAP project.
This enables you to obtain the following information without opening the SAP GUI:.
● Header: Message number and short text, so you can check that you have selected the desired message
● Main frame: Long text that was added to the message
Example
Procedure
Results
The Long Text Preview window is opened, displaying the long text that was added to this message in the back
end.
Context
You filter for short texts and message numbers to search for particular messages of a message class. This
functionality helps you to find and reuse messages which already exist. So you can prevent creating the almost
identical message several times.
Note
The message class editor displays per default all messages which are defined in the message class.
Example
You want to check if there are messages which contain the combination 'airline carrier' in the short text.
After you have entered this combination in the filter text field, the editor will automatically display the
corresponding messages.
Procedure
Results
After entering the filter text the editor will automatically display the reduced set of messages.
Tip
Delete the filter text to display all messages of the message class.
Related Information
Context
You can open a message in the message class editor from the source code editor of any source-based objects
such as classes, function modules, or ABAP programs.
In the source code editor, choose Ctrl + left mouse button or F3 on the corresponding message
number.
Results
The message class editor is opened and the number of the selected message is highlighted.
Related Information
Prerequisites
Context
You can initiate the creation of a hyperlink that refers to a specific message of a message class. The receiver
can then open the referenced message directly in ABAP Development Tools (ADT) in the corresponding ABAP
project.
For this purpose, you can generate an email where the hyperlink path is added or paste it from the clipboard
manually into any document.
[Optional:] Choose the Copy link to clipboard button and paste the link into any document.
Results
The hyperlink path is then saved in temporary storage. If you paste it in your document or editor, the path is
added as text.
Example
Note
To make a hyperlink click-sensitive, the receiver needs to define the application that is launched when
opening a hyperlink.
You need to define ADT as the installation to be opened. Note that for an MS Windows operating system,
you can set the handler path on the preferences page: Window Preferences ABAP Development and
activate the ADT Link Handling option. Alternatively, you can select Navigate Open ADT Link from the
menu bar. This functionality enables you to enter the copied URL and open the referenced message directly.
Related Information
Context
In the message class editor, you can provide the where-used list in order to display the usage of a message.
Note
Related Information
ABAP Channels provide event-based communication using messages between application servers and with the
Internet.
This section describes the steps to set up push-messaging between ABAP and UI sessions. The messaging
infrastructure mainly consists of two basic elements:
● A push channel, enabling bi-directional communication with user agents (for example, through the
integration of WebSockets) in the SAP NetWeaver Application Server for ABAP.
● A publish/subscribe infrastructure (messaging channel) for the exchange of messages between different
user sessions residing on different SAP NetWeaver Application Server for ABAP.
Related Information
ABAP Push Channels (APC) enable bi-directional communication with user agents (through the integration of
WebSockets or TCP Sockets) on the AS ABAP.
ABAP Development Tools provides a form-based editor to create and edit APC applications.
Note
This feature is provided as of SAP NetWeaver AS for ABAP 7.51 innovation package SP00
● Implementing a WebSocket Server [page 299] to use the WebSocket protocol to communicate with clients
and servers through all standard Web browers
● Implementing a TCP Socket Server [page 302] to use TCP/IP packets to communicate with clients and
servers that do not support the WebSocket protocol
Related Information
An ABAP Push Channel (APC) is the development object to create an APC application that represents the
coding which is invoked during connection setup and also when receiving a message.
Prerequisites
● The subsequent steps require that an APAP project exists for the relevant back-end system.
● You have identified the package in which the development object is going to be created.
Tip
If you have not yet already done so, add this package to the favorites of your ABAP project. For further
information, see also Adding a Favorite Package [page 136]
Before defining an ABAP Push Channel application, you have to create the ABAP Push Channel itself as base:
Note
For creating ABAP Messaging Channels use the integrated SAP GUI.
Procedure
2. Open the context menu and choose New Other... Connectivity ABAP Push Channel to launch the
creation wizard.
Note
Not required for $ packages and for LOCAL packages, for which the changes are NOT going to be
recorded in the Transport Organizer.
Results
The back-end system creates an inactive version of an ABAP Push Channel in the selected package that is
stored in the repository. In the Project Explorer, the new APC is added to the Connectivity node of the
corresponding package.
In the form-based editor, the initially generated development object is displayed and ready for editing the ABAP
Push Channel application.
Related Information
To implement a stateless or stateful APC server on an Application Server ABAP, specify an APC application and
implement an associated APC handler class.
Prerequisites
You have created and opened an APC (see also: Creating an ABAP Push Channel [page 296]).
Context
You define an APC application to be able to use ABAP Push Channels (as development object) in your project.
This APC application can be called using a WebSocket or TCP/IP connection from any client that supports the
WebSocket or TCP/IP communication.
You then use its coding which is invoked during connection setup and when receiving a message.
Procedure
1. In the Protocol Specification area, click the underlined Class Name:* link to create the ABAP class that
contains the functionality to be performed when specific messages are returned.
The ABAP class is created in the backend and opened in the ABAP source code editor.
3. From the quick fix that is displayed in the first line, add the unimplemented methods.
The ABAP class is created in the backend and the error in the form-based editor disappears.
Related Information
Context
● Implement the APC extension class, e.g. ZCL_APC_WSP_EXT_TEST (for APC WebSocket application
ZWSP_TEST)
● Configure the HTTP/HTTPS ports for WebSocket communication.
As the extension class is inherited from an abstract class to implement the ON_START and ON_MESSAGE
methods, you have to redefine these methods.
● The ON_START method is executed as soon as the WebSocket connection setup phase is accomplished
successfully.
● The ON_MESSAGE method is executed when receiving a message.
Optionally, you can also redefine the methods ON_ACCEPT, ON_CLOSE and ON_ERROR.
● ON_ACCEPT: The application can check whether to accept or reject the connection. This method is
executed before calling ON_START.
● ON_CLOSE: This method will be called before closing a connection. It might be used to clean up resources.
● ON_ERROR: This method will be called when the connection is interrupted due to an error. After successful
execution of ON_ERROR the method ON_CLOSE is executed.
For a basic implementation of the APC WebSocket extension class, e.g. ZCL_APC_WSP_EXT_TEST, the
following steps need to be performed:
Procedure
In the following example the only action which is processed during ON_START execution is to send a text
message to the WebSocket client, after inserting the following code in the method ON_START:
Sample Code
METHOD if_apc_wsp_extension~on_start.
TRY.
" send the message on websocket connection
DATA(lo_message) = i_message_manager->create_message( ).
lo_message->set_text( |{ sy-mandt }/{ sy-uname }: ON_START has been
successfully executed !| ).
i_message_manager->send( lo_message ).
CATCH cx_apc_error INTO DATA(lx_apc_error).
MESSAGE lx_apc_error->get_text( ) TYPE 'E'.
ENDTRY.
ENDMETHOD.
4. Save the method in the editor and leave the ON_START method.
In the ON_MESSAGE method both a message text and the received message are sent to the WebSocket
client, after inserting the following code in the ON_MESSAGE method:
Sample Code
METHOD if_apc_wsp_extension~on_message.
TRY.
" retrieve the text message
DATA(lv_text) = i_message->get_text( ).
" create the message manager and message object
DATA(lo_message) = i_message_manager->create_message( ).
" send 1st message
lo_message->set_text( |{ sy-mandt }/{ sy-uname }: ON_MESSAGE has
been successfully executed !| ).
i_message_manager->send( lo_message ).
" send 2nd message, i.e. echo the incoming message
lo_message->set_text( lv_text ).
i_message_manager->send( lo_message ).
CATCH cx_apc_error INTO DATA(lx_apc_error).
MESSAGE lx_apc_error->get_text( ) TYPE 'E'.
ENDTRY.
ENDMETHOD.
Note
This action launches the Web Dynpro application WDR_TEST_APC_WSP in a browser which supports the
WebSocket protocol (RFC 6455), for example Chrome version 16+, Firefox version 11+, Internet
Explorer version 10+ or Safari on iOS version 6+). In case of any issue you should be double-check if
Note
In the present version of the APC framework, the size of WebSocket messages exchanged between
client and server is limited to ~64 Kbytes.
Context
● Implement the TCP WebSocket extension class, for example ZCL_APC_TCP_EXT_TEST (for APC TCP
Socket application ZTCP_TEST)
● Configure the TCP/TCPS ports for TCP Socket communication.
As the extension class is inherited from an abstract class to implement the ON_CONNECTION_SETUP,
ON_START and ON_MESSAGE methods, you have to redefine these methods:
● The ON_CONNECTION_SETUP method is executed during the TCP Socket connection setup phase. Here,
the application has to specify the frame setting of the messages exchanged on this TCP Socket
connection.
● The ON_START method is executed as soon as the TCP Socket connection setup phase is accomplished
successfully.
● The ON_MESSAGE method is executed when receiving a message.
Optionally, you can also redefine the methods ON_ACCEPT, ON_CLOSE and ON_ERROR.
● ON_ACCEPT: The application can check whether to accept or reject the connection. This method is
executed before calling ON_CONNECTION_SETUP and ON_START.
● ON_CLOSE: This method will be called before closing a connection. It might be used to clean up resources.
● ON_ERROR: This method will be called when the connection interrupts due to an error. After successful
execution of ON_ERROR, the method ON_CLOSE is executed.
Procedure
2. In the Protocol Specification area, click the underlined Class Name:* to open the ABAP source code editor.
Note
In contrast to the WebSocket server application, the TCP Socket application must provide the TCP
frame structure to the APC runtime in the method ON_CONNECTION_SETUP. The main task of frames
is to provide information about the structure of the data to be sent or received over this connection:
when receiving data, it must be possible to split the data into packages which will be delivered to the
application. When sending data, ithere will be a check if the data is valid according to the frame
information provided.
A TCP frame can be of one of the following frame types which has to be specified using the attribute
frame_type in the frame structure (of type APC_TCP_FRAME).
○ Frame type is: IF_APC_TCP_FRAME_TYPES=>CO_FRAME_TYPE_TERMINATOR: The TCP frame
(message) is terminated by one or several bytes, e.g. line feed (LF) or carriage return line feed (CRLF).
The terminator bytes have to be passed as hex code (00-FF) representation, e.g. for LF is this 0A or for
CRLF is this 0D0A, to the terminator attribute of the frame structure.
○ Frame type is IF_APC_TCP_FRAME_TYPES=>CO_FRAME_TYPE_FIXED_LENGTH: The TCP frame
(message) has a constant length in bytes. The frame length in bytes has to be passed to the attribute
fixed_length of the frame structure.
○ Frame type is IF_APC_TCP_FRAME_TYPES=>CO_FRAME_TYPE_LENGTH_FIELD: The frame length in
bytes is part of the frame (message) itself and in a fixed position of the frame, i.e. a length field exists
In the following example, the only action which is processed during ON_CONNECTION_SETUP is to provide
the frame setting for the expected messages on this TCP Socket connection. The application decides the
frame type for the predefined terminator '0A', i.e. line feed (LF):
Sample Code
METHOD if_apc_tcp_server_config~on_connection_setup.
" set the terminator to line feed, i.e. hex code 0A
e_frame-frame_type = if_apc_tcp_frame_types=>co_frame_type_terminator.
e_frame-terminator = '0A'.
ENDMETHOD
Additionally, the action which is processed during ON_START execution is the sending of a text message to
the TCP Socket client, after inserting the following code in the method ON_START::
Sample Code
METHOD if_apc_ws_extension~on_start.
TRY.
" define the terminator byte, e.g. line feed as hex code
DATA: lv_terminator TYPE xstring VALUE '0A'.
" create and send the message on TCP Socket connection
DATA(lo_message) = i_message_manager->create_message( ).
DATA(lv_text_mesage) = |{ sy-mandt }/{ sy-uname }: ON_START has been
successfully executed !|.
" convert the text into UTF8 byte stream
DATA(lv_binary_message) = cl_abap_codepage=>convert_to( source =
lv_text_mesage ).
" append the terminator byte to the message frame bevor sending
CONCATENATE lv_binary_message lv_terminator INTO lv_binary_message
IN BYTE MODE.
In the ON_MESSAGE method both a message text and the received message are sent to the TCP Socket
client, after inserting the following code in the ON_MESSAGE method:
Sample Code
METHOD if_apc_ws_extension~on_message.
TRY.
" define the terminator byte, e.g. line feed as hex code
DATA: lv_terminator TYPE xstring VALUE '0A'.
" retrieve the text message
Note
For TCP Socket applications there is currently no test tool provided in transaction SAPC, as is provided
for APC WebSocket applications.
To accept connections for a TCP Socket application, you have to establish a TCP port. To configure a TCP/
TCPS port, proceed as follows:
9. Create an external alias using transaction SICF, which refers to the developed TCP Socket application. This
alias must contain valid logon data and you have to set the logon procedure to Required with Logon Data.
See also:
10. Configure the TCP port as profile parameter (transaction RZ10 or RZ11) as follows:
For our APC TCP Socket test application the profile parameter will be as follows:icm/server_port_77 =
PORT=1234, PROT=TCP, URL=/ztcp_test
Alternatively, you can configure the TCP port using transaction SMICM: Choose SMICM Goto
Services Service Create to create the corresponding TCP service.
Note
Make sure that the chosen trailing number in the profile parameter has not already been reserved for
other protocols.In the profile parameter, provided query parameters can be accessed by the TCP
Socket application in runtime.
Note
In the present version of the APC framework the size of TCP Socket frames exchanged between client
and server is limited to ~64 Kbytes.
For more information on header field length in the TCP Socket frame, see also SAP Note 2286962 .
Create an AMC application that allows you to send and receive AMC messages.
For message exchange with ABAP Messaging Channels you need to create and configure an AMC application. It
provides a publish/subscribe infrastructure for the exchange of messages between different user sessions
residing on different installations of AS ABAP.
Related Information
An ABAP Mesaging Channel (AMC) is the development object to create an AMC application that represents the
coding when sending or receiving a message.
Prerequisites
Tip
Add this package to the favorites of your ABAP project. See also Adding a Favorite Package [page 136]
Before you can define an AMC application, you have to create it first:
Procedure
2. Open the context menu and choose New ABAP Messaging Channel Application to launch the
creation wizard.
Example
Note
Not required for $ packages and for LOCAL packages, for which the changes are NOT going to be
recorded in the Transport Organizer.
Results
The back end creates an inactive version of an ABAP Messaging Channel in the selected package that is stored
in the repository. In the Project Explorer, the new AMC application is added to the Connectivity node of the
corresponding package.
In the form-based editor, the initially generated development object is displayed and ready for editing.
Related Information
For message exchange with ABAP Messaging Channels you need to define an AMC application. It allows you to
send and receive AMC messages.
Prerequisites
You have created an AMC application (see also: Creating an ABAP Messaging Channel Application [page 308]).
Context
You define or edit an AMC application to be able to use ABAP Messaging Channels (as development object) in
your project.
You then use its coding which is invoked when sending or receiving a message.
Procedure
Example
Note
With the Client channel access scope, the exchange of messages between producer and
consumer sessions can be limited to sessions residing in the same client. Otherwise it is cross-
client.
○ <Message-Type>: A dedicated message type (format) is assigned to each channel. In other words:
only messages of the assigned message type can be transferred over the channel. Thus, the access
APIs are type-safe. Also, the ABAP compiler and Runtime ensure the consistent message transfer.
Choose one of the following from the drop down list:
○ Plain Text Format
○ Binary Format
○ Push Channel Protocol
○ <Virus Scan ID> (incoming messages): Name of the virus scan profile used for scanning the
message transferred via this channel. If this field is initial, no virus scanning is performed, otherwise
the field identifies the virus scan profile that is used. Use transaction VSCANPROFILE to create and edit
virus scan profiles.
Note
You can edit the field <Virus Scan ID> only if you choose a program with <Activity> = C
(Receive via APC WebSocket) in section <Authorized Programs> (see below).
See also: .
○ <Authorized Programs>: The access rights for the channels are realized via code based
authorization. For each channel, and depending on the access role as consumer or producer, a
whitelist of ABAP reports, function groups and/or classes has to be maintained, otherwise the access
will be rejected.
To enter a program name, choose one of these options:
1. select a <Program Name> field and enter the program name manually (if you know it).
2. select a <Program Name> field and start typing the name. Use the code completion function
( Ctrl + Space ) to complete it (in case you know a part of the name).
3. open the browse dialog … of the <Program Name> field and enter a search string to find the
relevant program.
Note
For any of these options, the field <Program Type> is filled automatically (when entering or
saving the name).
Finally, assign an <Activity> to each program entry. Choose one of the following (enter manually or
press ctrl + space):
○ S (Send)
○ R (Receive)
○ C (Receive via APC WebSocket)
Example
As of AS ABAP 7.54 you can explore relations of an object with Relation Explorer.
You have different options to select an object to display its related objects.
You can select the object from the history list, using in the toolbar.
● Using the Other Object Option
Toolbar Features
N
a
Icon Description
m
e
O
t
h
e
r
C
If there are different contexts available for the object, you can switch to another context.
o
n
t
e
x
t
R
e
l
o
a
d
O
b
j
e
You can reload the object relations. c
t
R
e
l
a
t
i
o
n
s
H
i
s
The History list button displays a history of previously displayed entry
t objects.
o
r
y
O
t
h
e
r
You can select another object. O
b
j
e
c
t
L
i
n
k
w
i
You can have the Relation Explorer update automatically to the object
t in the active editor by
enabling the Link with Editor button. h
E
d
i
t
o
r
Related Information
Context
You can create a new instance of the Relation Explorer to work with multiple objects or with the same object in
different contexts at once, instead of switching between them.
1. In the Relation Explorer, from the dropdown list of the view menu , select New Relation Explorer....
○ Empty View
○ [OPTIONAL] Open from History
○ Select another object by clicking the Browse button.
4. Select OK.
Results
Related Information
Context
In addition to the Eclipse search functionalities, the ABAP search provides powerful tools for finding versions of
an ABAP development object in all of the back-end systems you work with.
The following functions enable you to search for ABAP project-specific content:
● Searching Development Objects [page 322] to find a certain ABAP development objects on base of the
object name
● Searching ABAP Source Code [page 319] to find a term that is used within an ABAP project
● Searching Usages (Where-Used) [page 323] to find the usages of development objects and sub-objects
Note
Use the ABAP Search function to find ABAP content. The Eclipse file search results may be incomplete.
Related Information
The 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.
Prerequisites
● Before you switch on this business functions, ensure to have enough free database space for creating an
index file. This index file will consume between 10 to 100 GB depending on the number of sources stored in
the ABAP system. If the database memory is not enough, the ABAP system may become very slow or
unusable. 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.
● You are working with SAP NetWeaver 7.4 SP05 or higher.
● Your SAP administrator has to enable the relevant ABAP system(s). For more information, see
Configuration Guide for Configuring the ABAP Back-end for ABAP Development Tools
Context
You have two options for performing a search in ABAP source code:
1. If you want to search within the entire ABAP system, select Search Search... ABAP Source Search
from the menu or open the shortcut ( Ctrl + H ).
2. 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.
Procedure
1. 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.
2. In the ABAP Source Search tab, enter the text you wish to find in the Search Term field.
Note
If you do not know the qualified name of the ABAP source code to be found, you can enter one or more
operators as placeholder in the Search Term field.
Operator Description
- (minus) To find all matches that do not contain the term immedi
ately following the minus sign are returned
"[SEARCH_TERM]" (quotation marks) To find only exact matches for the entered string are re
turned
You can position an operator at the beginning, between, or at the end of a string.
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.
3. [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 assist functionality by pressing Ctrl
+ Space .
If you want to select several ABAP packages and / or development objects, leave a space between the
entries.
Note
Search filters currently do not support patterns like CL_*. You can only use complete identifiers.
4. [Optional:] Move the Maximum number of results slider to limit the quantity of the results that are
displayed in the Search view.
Note
5. [Optional:] Choose the Browse... button for selecting the Project if you want to search in another ABAP
project.
Note
Results
If the text is found, 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. If your ABAP system uses SAP
HANA, the search term is highlighted in addition.
Tip
In the Search view, you can choose the Open Search Dialog button from the tool bar to redefine the
search.
Related Information
Context
You can search for ABAP development objects either in one particular ABAP project or system-wide across all
of your ABAP projects.
Procedure
1. In the menu bar, choose Search Search... . Alternatively, you can use the shortcut Ctrl H.
2. In the following dialog box, choose the ABAP Object Search tab.
Tip
If the recommended tab is not displayed, choose the Customize... button, to select the corresponding
one.
3. In the ABAP Object Search tab, enter the Object Name you wish to find.
Note
You can only search for main repository objects, such as ABAP classes, ABAP programs, or data
dictionary objects. You cannot search for sub-objects such as methods or form routines.
4. Select Workspace to search in all your ABAP projects that are currently active and usable. Or select one of
your ABAP projects.
You can restrict the search to finding your favorite packages by activating the Restrict Search to
Favorite Packages checkbox.
Results
The repository objects that match the search scope are displayed in the Search view. The result is grouped by
ABAP packages
Note
From the results list, you can use the context menu to open each object in the editor.
Related Information
The improvements in the Where-used view like the general and filter functionalities from the toolbar and
context menu
Prerequisites
This functionality is provided for SAP NetWeaver 7.3 EHP1 SP14 and higher as well as SAP NetWeaver 7.4
SP08 and higher.
Context
You can investigate where a development object or element is used within an ABAP package.
You can execute the where-used search from the following positions:
Example
The following procedure describes how to search for the usage of a development object from the Project
Explorer:
Procedure
2. From the context menu or the toolbar, choose Get Where-Used List....
Results
The Search view is opened, and the relationships and usages of the development object and their elements are
displayed.
Example of a search view that displays the hits and relationships of an ABAP class
To display the number of matches instead of a placeholder, expand the corresponding tree level.
From here you can add an object to the Farvorite Objects, run an ABAP unit test or another where-used search
for a development object or an element.
Related Information
Context
The ABAP IDE provides a number of functions and utilities for efficiently creating, editing, and navigating ABAP
source code. These primarily comprise ABAP keyword completion, the source code templates, and the various
formatting capabilities.
Related Information
In the ABAP source code editor, the content assist proposes valid ABAP keywords and identifiers that are
relevant at the current position. One of these proposals can be inserted to the source code.
Context
You can reduce the time spent on code editing and ensure that you are using the valid source code elements by
using the content assist.
Keyword Completion [page 326] The best matching ABAP keyword is automatically proposed as soon as you start
typing.
Non-Keyword Completion [page 327] The best matching non-keyword, that is available for the corresponding source
code section, is automatically proposed as soon as you start typing.
Code Completion [page 328] A list of all matching keywords, identifiers, components, and templates is dis
played for the position where you have chosen the Ctrl + Space shortcut.
Related Information
In the ABAP source code editor, the best matching ABAP keyword is displayed as soon as you start typing the
keyword. If you choose the tabulator tab, the keyword is inserted at the current position.
Prerequisites
To use this functionality, navigate to the Window Preferences ABAP Development Editors Source
Code Editors Code Completion preference page and select the Typing Suggest keywords option.
Context
Note
Procedure
Results
At the position where you have selected the proposal, the corresponding keyword is added to the source code.
In the ABAP source code editor, the best matching non-keyword, such as an element name or type definition, is
displayed when you start typing.
Prerequisites
To use this functionality, open the ABAP Development Editors Source Code Editors Code Completion
Typing preference page and select the Also suggest non-keywords option.
Context
Note
Procedure
Note
Non-keywords are only proposed if they are already used in the same development object.
2. Adopt the displayed entry into your source code by choosing the tabulator key.
Results
At the position where you have selected the proposal, the corresponding non-keyword is added to the source
code.
In the ABAP source code editor, you can open the code completion list manually at any position or open it
automatically after you have typed a component selector such as -, ~, ->, =>.
Context
Procedure
Note
If the code completion list is not displayed, check whether the related components are correctly
defined in the respective development object.
You can use wildcards like the asterisk (*) to limit the list of relevant entries if you do not know the
qualified name of the keyword or identifier. Note that wildcards are supported as of SAP NetWeaver
7.4 SP02 and SAP NetWeaver 7.3 EHP1 SP11 and higher.
If you use the asterisk, a list is opened that displays the relevant keywords and identifiers after the
cursor position.
Results
The corresponding keyword or identifier is added to the source code at this position.
Related Information
In the ABAP source code editor of a development object, you want to open the code completion list
automatically when you enter a component selector such as -, ~, ->, =>.
Prerequisites
To use this function, open the Window Preferences ABAP Development Editors Source Code Editors
Code Completion preference page and select the Typing Automatic code completion after typing -,~,-
>,=> option.
Context
Note
Procedure
- Fields of structures
~ Components of interfaces
Results
In the ABAP source code editor of a development object, you want to insert the full signature of a method,
function module, or form routine automatically.
Prerequisites
To use this function, open the ABAP Development Editors Source Code Editors Code Completion
Typing preference page and select the Always insert full signature on completion option.
Context
Note
1. In the source code editor, type the name of a method, function module, or form routine.
The code completion list with the available entries and full signature is displayed.
2. Select the relevant entry.
Results
The full signature is inserted in the source code at the current position.
In the ABAP source code editor, you can insert a keyword, identifier, or template from the code completion list
at the current position. Optionally, you can configure the code completion to overwrite the keyword or identifier
at the current position.
Prerequisites
To overwrite the keyword or identifier at the current position, choose the ABAP Development Editors
Source Code Editors Code Completion Content Assist Completion overwrites preference in advance.
Context
Note
Procedure
Note
To toggle beween inserting and overwriting while the content assist is active, choose Ctrl.
Results
The selected keyword, identifier, or template is inserted and replaces the keyword or identifier at the current
cursor position.
You can generate a code snippet for the method implementation and its redefinition in one step.
Prerequisites
This functionality is provided for SAP NetWeaver 7.5 SP04 and higher.
Context
Procedure
1. In the implementation of an ABAP class, you can add the relevant code snippet at the following positions:
List that displays the superclass methods that can be overridden, triggered by code completion
3. Choose the relevant method.
Results
The relevant method implementation, together with its redefinition, is added to your ABAP class. Its visibility is
the same as the corresponding definition of the superclass.
Note
If you want to keep the behavior of the method as it is defined in the superclass, you have to add the
supercall to the corresponding method implementation manually.
Since SAP NetWeaver AS for ABAP 7.51 innovation package SP01, the content assist supports code completion
that is relevant for AMDP methods at the current position in the ABAP source code editor.
ABAP Development Tools (ADT) supports code completion scenarios within AMDP methods.
The following list provides you an overview of the AMDP code completions that are supported by ADT:
Note
This list is an extract of all supported ADMP code completions. Further code completions for different
scenarios are supported.
Related Information
In the AMDP method implementation of an ABAP class, you want to add the name of the matching (database
tables and views) into a SELECT, UPDATE, DELETE, INSERT, UPSERT, and TRUNCATE statement.
Prerequisites
This functionality is provided in SAP NetWeaver AS for ABAP 7.51 innovation package SP01 and higher.
Context
You want to display a proposal list that provides the names of the matching data sources from ABAP Dictionary
you can add to a SELECT, UPDATE, DELETE, INSERT, UPSERT, and TRUNCATE statement.
Procedure
1. In the AMDP method implementation, position the cursor after the SELECT, UPDATE, DELETE, INSERT,
UPSERT, and TRUNCATE statement.
If you know the first letters of the element to be added, you can enter them in order to limit the number of
proposals.
Example
To copy the source code example, click here: Code Example Before Execution [page 338]
Results
The full name of the data source is added to the AMDP method implementation of your ABAP class.
Example
Related Information
In the AMDP method implementation of an ABAP class, you want to add the name of the matching local
(database tables and views) into a SELECT, UPDATE, DELETE, INSERT, UPSERT, and TRUNCATE statement.
Prerequisites
This functionality is provided in SAP NetWeaver AS for ABAP 7.51 innovation package SP01 and higher.
Context
You want to display a proposal list that provides the names of the matching local data source(s) from ABAP
Dictionary you can add to a SELECT, UPDATE, DELETE, INSERT, UPSERT, and TRUNCATE statement.
Procedure
1. In the AMDP method implementation, position the cursor after the SELECT, UPDATE, DELETE, INSERT,
UPSERT, and TRUNCATE statement.
If you know the first letters of the element to be added, you can enter them in order to limit the number of
proposals.
To copy the source code example, click here: Code Example Before Execution [page 341]
Results
The full name of the local is added to the AMDP method implementation of your ABAP class.
Example
Related Information
In the AMDP method implementation of an ABAP class, you want to add the name of the matching column for
the data sources in the FROM clause of a SELECT, UPDATE, DELETE, INSERT, UPSERT, or TRUNCATE statement.
Prerequisites
This functionality is provided in SAP NetWeaver AS for ABAP 7.51 innovation package SP01 and higher.
Context
You want to display a proposal list that provides the names of the matching columns of the specified data
source.
Procedure
1. In the AMDP method implementation, position the cursor after the SELECT, UPDATE, DELETE, INSERT,
UPSERT, and TRUNCATE statement.
Example
To copy the source code example, click here: Code Example Before Execution [page 342]
Results
The full name of the data source is added to the AMDP method implementation of your ABAP class.
Example
In the AMDP method implementation of an ABAP class, you want to add the name of the matching ABAP class
to be used in a CALL statement.
Prerequisites
This functionality is provided in SAP NetWeaver AS for ABAP 7.51 innovation package SP01 and higher.
Context
You want to display a proposal list that provides the names of the matching ABAP classes that can be used in a
CALL statement.
Note
Procedure
1. In the AMDP method implementation, position the cursor after the CALL ABAP keyword.
If you know the first letters of the element to be added, you can enter them in order to limit the number of
proposals.
To copy the source code example, click here: Code Example Before Execution [page 342]
Results
The full name of the class is added to the AMDP method implementation.
Example
In the AMDP method implementation of an ABAP class, you want to add the name of the matching ABAP class
to be used in a CALL statement.
Prerequisites
This functionality is provided in SAP NetWeaver AS for ABAP 7.51 innovation package SP01 and higher.
Context
You want to display a proposal list that provides the names of the matching ABAP methods that can be used in
a CALL statement.
Note
The ABAP classes, where the relevant method is defined and implemented, needs to implement the
if_amdp_marker_hdb interface.
Procedure
1. In the AMDP method implementation, position the cursor directly after the referring class in the CALL
statement.
If you know the first letters of the element to be added, you can enter them in order to limit the number of
proposals.
Example
To copy the source code example, click here: Code Example Before Execution [page 346]
Results
The full name of the method is added to the AMDP method implementation.
Example
In the AMDP method implementation of an ABAP class, you want to add the full signature of an ABAP method
on a method name in a CALL statement.
Prerequisites
This functionality is provided in SAP NetWeaver AS for ABAP 7.51 innovation package SP01 and higher.
Context
You want to display a proposal list which provides the names of the matching methods in a CALL statement.
Procedure
1. In the AMDP method implementation, position the cursor directly after the referring class in the CALL
statement.
If you know the first letters of the element to be added, you can enter them in order to limit the number of
proposals.
2. Enter the name of the relevant class.
Example
To copy the source code example, click here: Code Example Before Execution [page 349]
Results
The full signature of the method is added to the AMDP method implementation.
Example
Related Information
In the AMDP method implementation of an ABAP class, you want to add the name of an ABAP type inside the
brackets of an $ABAP.type(...) construct in a DECLARE or CAST statement.
Prerequisites
This functionality is provided in SAP NetWeaver AS for ABAP 7.51 innovation package SP01 and higher.
Context
You want to display a proposal list that provides the matching names of all ABAP types that can be added
within the brackets of an $ABAP.type(...) construct in a DECLARE or CAST statement.
1. In the AMDP method implementation, add the $ABAP.type(...) construct to the DECLARE or CAST
statement.
If you know the first letters of the element to be added, you can enter them in order to limit the number of
proposals.
Example
To copy the source code example, click here: Inserting the Name of ABAP Types [page 349]
Results
The name of ABAP type is added to the DECLARE or CAST statement in the AMDP method implementation.
Example
In the AMDP method implementation of an ABAP class, you want to add the name of a logical database
schema inside the brackets of an $ABAP.schema(...) construct in a SELECT or CALL statement.
Prerequisites
This functionality is provided in SAP NetWeaver AS for ABAP 7.51 innovation package SP01 and higher.
Context
You want to display a proposal list that provides the matching names of all logical database schemas that can
be added within the brackets of an $ABAP.type(...) construct in a CALL statement.
1. In the AMDP method implementation, add the $ABAP.schema(...) construct to the SELECT or CALL
statement.
If you know the first letters of the element to be added, you can enter them in order to limit the number of
proposals.
Example
To copy the source code example, click here: Code Example Before Execution [page 353]
Results
The name of the logical database schema is added to the SELECT or CALL statement in the AMDP method
implementation.
Example
In the AMDP method implementation of an ABAP class, you want to add the name of the matching SAP HANA
catalog artifact (for example, database schema, database tables, views, procedures) in a FROM clause or CALL
statement.
Prerequisites
This functionality is provided in SAP NetWeaver AS for ABAP 7.52 SP00 and higher.
Context
You want to get a proposal list with the names of the matching SAP HANA catalog artifacts that can be added in
a FROM clause or CALL statement.
1. In the AMDP method implementation, position the cursor after the FROM clause or CALL statement.
If you know the first letters of the element to be added, you can enter them in order to limit the number of
proposals.
Example
To copy the source code example, click here: Code Example Before Execution 1 [page 355]
To add a schema artifact from an SAP HANA database schema, proceed as follows:
To copy the source code example, click here: Code Example Before Execution 2 [page 355]
Note
To add a schema artifact, add a dot directly after the schema name. Then trigger code completion
again.
The full name of the SAP HANA catalog artifact is added to the AMDP method implementation of your ABAP
class.
Example
Here, the name of a database table used in the system database schema is added:
In the AMDP method implementation of an ABAP class, you want to add the name of the matching SAP HANA
catalog artifacts located in a logical database schema. Internally, the logical database schema is resolved to the
physical SAP HANA database schema. You can trigger this in a FROM clause or CALL statement.
Prerequisites
This functionality is provided in SAP NetWeaver AS for ABAP 7.52 SP00 and higher.
Context
You want to get a proposal list with the names of the matching SAP HANA catalog artifacts that can be added in
a FROM clause or CALL statement. Mapping to the physical SAP HANA database schema shall be performed by
code completion automatically.
Procedure
1. In the AMDP method implementation, position the cursor after the FROM clause or CALL statement.
If you know the first letters of the element to be added, you can enter them in order to limit the number of
proposals.
To copy the source code example, click here: Code Example Before Execution 1 [page 355]
Results
The full name of the resolved SAP HANA catalog artifact is added to the AMDP method implementation of your
ABAP class.
Example
Context
Code templates reduce the time spent on routine coding. The new ABAP IDE provides a number of predefined
code templates for ABAP. In addition, you can create further templates for your own use.
Procedure
a. Open the preferences page ABAP Development Source Code Editor Templates from the menu
bar.
2. To use a template...
a. In the source code editor, write the beginning characters of the template.
b. Select Ctrl + Space (code completion).
Tip
Alternatively, you can use the Templates view to insert the template code through Drag & Drop.
Related Information
Context
● ( or { or [
● or a literal such as '', ``, ||,
the relevant closing character will be automatically inserted in the editor automatically directly behind the
cursor, so you do not need to take care of it.
The feature for closing brackets and literals is enabled by default. If you wish to disable it, you have to
switch off the corresponding setting in the preferences page:
Window Preferences ABAP Development Editors Source Code Editors Code Completion
Automatically close brackets and literals
Related Information
You use the ABAP formatter to keep ABAP source code in a correct format and well organized in order to
develop new functions easier.
Context
Formatting is always user-defined for a specific ABAP project. The formatting options are shared between the
ABAP Workbench and ABAP Development Tools (ADT) in the same datasource.
Note
You can do the formatting from the editor of a development object in the following ways:
1. To format the whole ABAP source code, use the Source Code Format context menu or the Shift +
F1 shortcut.
2. To format selected source code blocks, select them and use the Source Code Format Block context
menu or the Ctrl + Shift + F1 shortcut.
Related Information
You can define your own options for formatting ABAP keywords and identifiers from the source-based
development objects of an ABAP project. These formatting options are user-specific and can be defined for
each ABAP project.
Context
You can change these options or define your own formatting options in ABAP Development Tools (ADT) using
the ABAP Formatter preference page.
Procedure
1. Open the ABAP Formatter preferences page using one of the following ways:
○ In the Project Explorer, select the relevant ABAP project and select Properties from the context menu.
○ From the menu bar, choose Window Preferences . From here, open the ABAP Development
Editors Source Code Editors tree and select the ABAP Formatter link. You then have to choose the
relevant ABAP project.
Note
This functionality has been provided since SAP NetWeaver AS for ABAP 7.52 SP00.
○ Select the Custom radio button if you want to define your own formatting options.
If you have chosen the Custom radio button, the Keywords and Identifiers areas become active.
4. In each area, select the relevant radio button to format the relevant source code in upper or lower case.
The example code snippet in the Preview area is formatted in accordance to your selection.
5. Choose OK to confirm.
The formatting option is saved specifically for your user and the selected system connection in the back-end.
This means, the formatting options you have modified in ADT will also be considered when you use the pretty
printer functionality in the ABAP Workbench and vice versa.
Related Information
Context
You can define the color for how text or annotation types are displayed in ABAP source code.
For this, you have to set the corresponding preferences in order to:
Note
The source code editor displays the ABAP source code and annotation types in predefined colors. However,
you can change these default settings to adapt them to your personal needs.
The new color settings become effective as soon as you (re-)open the source code editor.
Related Information
Context
You can define the colors in which the following texts are to be displayed in ABAP source code:
Entry Description
Note
To define colors for individual ABAP keywords, see the
Related Information from below.
Using different colors makes it easier for you to skim through source code in order to distinguish, for example,
between an ABAP keyword and elements.
Procedure
1. Open the
General Appearance Colors and Fonts preference page.
Note
To restore the default color settings, click the Restore Defaults button.
5. To make the new color settings effective, (re-)open the source code editor.
In the source code editor, the corresponding source code parts are displayed or highlighted in the predefined
color settings.
Related Information
Procedure
1. Open the ABAP Development Editors Source Code Editors ABAP Keyword Colors Preferences
page.
The ABAP Keyword Colors preference page is opened. Here you find a list of default configurations that
have already been configured by SAP.
2. To start configuring the highlighting of a new ABAP keyword or sequence, chose the Add button.
An empty entry is added at the end of the list. Its default color is black.
Note
You can use the content assist functionality ( Ctrl + Space ) to open a dialog. It lists all the available
ABAP keywords. From here you can select the relevant one.
You can use the '*' wildcard to search for any string.
4. To configure the color, choose the relevant ABAP keyword or sequence in the list and click the colored
button in the Color section on the right.
Tip
You can group configurations that are used in the same context by using the same color for them.
In the list, your ABAP keyword or sequence is displayed in accordance with your selection.
6. To make your configuration(s) visible in the source code editor, choose OK.
Your color configurations become effective as soon as you (re-)open the source code editor.
Example of an ABAP class where the syntax coloring of single ABAP keywords is configured
7. In addition, you have the following options:
a. To make SAP's default configurations visible in the source code editor, select the relevant
checkbox(es) in the list or choose the Select all button on the right. Then click the Apply button.
SAP's default color configurations become effective as soon as you (re-)open the source code editor.
b. To highlight the style of ABAP keywords and sequences, select the relevant checkbox in the list and
choose one of the following checkboxes on the right:
○ Bold
○ Italic
○ Strikeout
○ Underline
The configuration file is imported and its content is now displayed or the relevant file is exported
accordingly.
e. To take over the configuration of another ABAP keyword or sequence, select the relevant entry in the
list and choose Pick settings from from the context menu.
In the list, your ABAP keyword or sequence is displayed in accordance with your selection.
g. To restore the default color settings, click the Restore Defaults button.
Note
If you perform the restore action, all of your configurations will be deleted.
Context
You can define the coloring of annotation types in the source code. These are, for example:
Procedure
1. Open the
General Editors Text Editors preference page.
2. Select the annotation type you want to change and choose the Color button.
3. Select the color and confirm with OK.
Note
To restore the default color settings, click the Restore Defaults button.
The new color settings become effective as soon as you (re-)open the source code editor.
Related Information
Context
Related Information
You can add, edit, format, as well as import or export ABAP Doc comments to document source code.
Related Information
A single ABAP Doc comment or a block of several ABAP Doc comments is introduced by the character
combination "!.
In the editor, ABAP Doc comments are added one row above the related element in the definition part.
So, the ABAP Doc comment has to start before the element, directly in front of a declarative statement (for
example, data declaration, method definition, class definition). Otherwise a warning will be displayed because
the source code editor verifies the position and the content structure of ABAP Doc comments when you
execute the ABAP syntax check. So, if comments are added at the wrong position or contain incorrect syntax,
a warning is displayed in the Problems view.
Example
In the implementation of a global class, you can document a method. You can use the Add ABAP Doc quick
assist to add the <p class="shorttext synchronized"> tag. Then an ABAP Doc comment block
containing the relevant tag is added.
1. In the definition, position the cursor on the method name for which you want to perform Ctrl + 1 .
The Quick Fix dialog box is opened.
An ABAP Doc comment block is added to your source code, which contains the relevant tag:
Enter the relevant short text before the closing </p> tag.
You can use multiple lines to document source code elements. In this case, you have to add the character
combination "! in front of each line.
Example
If you want to document a block of statements using the ABAP colon comma semantics, the ABAP Doc
comment block must be located in front of the identifier and after the colon.
Example
CONSTANTS:
"! Initial value
co_initial_value TYPE i VALUE 0,
"! Invalid value
co_invalid_value TYPE i VALUE -1.
Related Information
Adding Documentation of Parameters and Exceptions in ABAP Doc Comments [page 370]
Synchronizing ABAP Doc Comments [page 374]
You can document parameters and exceptions for methods, events, functions modules, and subroutines.
Context
This function supports you in listing all undocumented parameters and exceptions that relate to the selected
element.
Note
If you have already added parameters in an ABAP Doc comment and made changes in the meantime, you
can also add the new parameters with this function. Thus, only the new parameters will be added.
Parameters and exceptions that are already documented will not be changed.
In the ABAP Language Help (through F1 in the source editor), you will find further information about using
the syntax of ABAP Doc comments.
Procedure
1. In the source code editor, navigate to the definition part of the element of the relevant code line.
2. [Optional]: If no ABAP Doc comment exists, enter "! to start the comment line.
Example
"!
METHODS method_with_variable.
Note
Choose Enter to add a new row for further comments. The editor will automatically start the new row
with "!
3. Place the cursor on the position where you want to add the missing parameters or exception.
4. In the context menu, choose Quick Fix (Ctrl 1), and select Add missing parameters to documentation to add
the syntax of the missing parameters and exceptions.
The name of the missing parameters are added and introduced by a @. You can describe each parameter
or exception with the corresponding documentation after the |.
Note
Every parameter or exception should occupy a separate line in order to keep the source code readable.
"! @parameter p1 |
METHODS method_with_variable.
Results
The documentation is saved and displayed in the source code editor of the ADT.
Related Information
Context
This enables you to structure and highlight parts of your comments that are rendered, for example, into HTML
files or the ABAP Element Info view.
Paragraph <p>...</p>
Note
In addition, ABAP Development Tools (ADT) analyzes the content of ABAP Doc comments, converting it to
HTML, and displays it appropriately. Consequently, special characters such as ", ', <, > and @ must be
escaped using " , ' , < , > , and @ .
Example
Procedure
1. You can use code completion to add formatting to ABAP doc comments:
a. To do this, position the cursor at the corresponding position within the comment and press Ctrl +
Space .
b. Choose then the relevant shortcut from the popup.
As a result, the selected text is surrounded with the corresponding HTML tag.
Related Information
You can add links to ABAP repository objects or to the components of ABAP repository objects in ABAP Doc
comments.
Prerequisites
This feature is spupported for SAP NetWeaver AS for ABAP 7.52 SP00 or higher.
Context
This enables you to open ABAP Doc comments directly from the Element Information popup and the ABAP
Element Info view. In addition, you can trigger the where-used list from linked object or component names.
You can provide such links for the following repository objects and components:
● Global types, such as ABAP classes, interfaces, database tables, views, structures
● Components, such as methods,
local/public types
● Other objects, requiring a prefix, such as ABAP function groups, domains, XSLT transformations, and so
on.
Procedure
1. Add an ABAP Doc comment before the relevant statement using the "! tags. Alternatively, you can
position the cursor at the relevant position within an ABAP Doc comment.
2. Add the ... {@link [[[kind:]name.]...][kind:]name} ... syntax.
3. Enter the name of the ABAP repository object or its component to be opened.
Related Information
You can synchronize ABAP Doc Comments with the short descriptions.
Prerequisites
● ABAP classes or ABAP interfaces must contain short descriptions to synchronize short descriptions with
ABAP Doc Comments.
● You can only import and synchronize in the original language.
Recommendation
In accordance with SAP programming guidelines, you should write program comments in English. So
you should be logged on in English as your ABAP project language.
● If ABAP Doc contains special characters such as @ " ! < > - >, you need to replace them by its ACSCII code.
Otherwise, these special characters are not imported.
● Short texts may not contain more than 60 characters.
This enables you to keep the documentation of the ABAP source code between ADT and the ABAP Workbench
consistent.
You have the following possibilities to synchronize changes of ABAP Doc comments in ADT with the Class
Builder in the back end:
● You can surround an ABAP Doc comment with the <p class="short text synchronized"> tag in the
ABAP source code editor.
Then, ABAP Doc comments are directly synchronized when you save the corresponding object in ADT.
Note
When documenting methods in the definition of ABAP classes, you can use the Add ABAP Doc quick
assist for adding the relevant tag as ABAP Doc comment block. For further information, see the Related
Information below.
Example
Example for providing a short text to be synchronized with the back end in the ABAP source code editor:
Related Information
In ABAP Development Tools (ADT), you can import descriptions of ABAP classes or ABAP interfaces (including
their attributes, methods, parameters, and so on) that are entered in the form-based editor of the Class
Builder. This enables you, to add, edit, or display them also in ABAP Development Tools (ADT).
Prerequisites
● The descriptions of components for ABAP classes or ABAP interfaces are entered in the form-based Class
Builder of the ABAP Workbench.
● You can only import and synchronize in the original language.
Recommendation
In accordance with the SAP programming guidelines, you should write program comments in English.
So, you should be logged on in English as your ABAP project language.
● If ABAP Doc contains special characters such as @ “ ! < > - >, you need to replace them by its ACSCII code.
Otherwise these special characters are not imported.
● Short texts may not contain more than 60 characters.
Context
Note
You can import them only once when you edit them at the first time in ADT.
The source code editor does not overwrite existing ABAP Doc comments for class or interface components
that are already documented with ABAP Doc.
Example
In the source code editor of ADT, the definition of the cl_demo_importing_description ABAP class is
displayed as follows:
PUBLIC SECTION.
PROTECTED SECTION.
PRIVATE SECTION.
DATA: myself TYPE REF TO cl_demo_importing_description.
DATA any_string1 TYPE c.
METHODS method_with_variable.
ENDCLASS.
Procedure
1. In ADT, open the context menu in the source code editor of a class or interface.
Results
The source code editor imports all descriptions of the class or interface components from the Class Builder
and inserts them as ABAP Doc comments at the appropriate position in the source code editor of ADT.
If you import descriptions in SAP NetWeaver 7.5 SP00 or higher, the corresponding ABAP Doc comments are
surrounded with a <p class="shorttext synchronized"> tag. This tag defines possible changes are
directly synchronized in the back-end when you save the object.
Example
In the source code of the cl_demo_importing_description ABAP class, the imported descriptions of
the components are added as ABAP Doc comments:
PUBLIC SECTION.
PROTECTED SECTION.
PRIVATE SECTION.
"! <p class="shorttext synchronized" lang="en">Imported attribute description</p>
DATA: myself TYPE REF TO cl_demo_importing_description.
"! <p class="shorttext synchronized" lang="en">Imported attribute description</p>
DATA any_string1 TYPE c.
"! <p class="shorttext synchronized" lang="en">Imported method description from the Class
Builder</p>
METHODS method_with_variable.
ENDCLASS.
You can export source code documentation of ABAP classes and ABAP interfaces, for example, in order to
create a backup of this information for audits.
Context
For each class or interface you can create an HTML file as follows:
Procedure
○ In the Project Explorer, open the context menu in any ABAP project, package, class, or interface and
choose Export.
Note that you can also select several packages, classes, and interfaces.
○ Choose File Export from the menu bar.
The Export wizard is opened.
Tip
When editing the project, you can avail of the content assistant functionality by pressing Ctrl +
Space.
Note
The maximum number of objects for one export job is 4000. If the maximum number is exceeded, no
ABAP Doc comments are exported and an error is displayed in the export log.
6. To define the set of members to be exported for classes, select one option in the Visibility of members to be
exported area.
7. To export short texts if no ABAP Doc comment is provided for an element, choose the corresponding
checkbox in the Export mode area.
8. To define the directory where you want to save the export files, choose Browse... in the Destination area.
9. Choose Finish to start the export.
Results
The export job is started. If you select a package with a huge number of classes and interfaces, for example, the
job might last several minutes. You can check the state of the export job in the Console and Progress view.
When the job is finished, the export log is displayed in the Console view. At the same time, a new folder with a
unique name is created in the chosen directory. The export files are stored here.
In addition, a popup is displayed from where you can open the export folder directly.
Note
To adopt the layout of the exported html file, open and edit the stylesheet.css file. It is saved in the
\htmldesign path.
Note
If the exported ABAP Doc comments contain links like { @link cl_car.meth:drive }, they will be
rendered as simple text like drive.
Related Information
Importing ABAP Doc Descriptions from the Class Builder [page 376]
Context
Note
Ctrl + > Remove Comment The editor removes the existing aster
isk (*) at the beginning of the line.
Note
In addition, you have the following options for working with ABAP comments:
● In the context menu of the editor, choose Source Code and select the corresponding entry.
● In an ABAP class and procedure, enter an asterisk (*) to split source code into logical sections.
● Enter an asterisk (*) to disable ABAP statements.
● Enter double quotation marks (") to describe source code within a line.
Related Information
To display Element Info in source code editors, select an identifier such as the name of a method, a database
table, or an interface and press F2 .
● Source Code Show Code Element Information from the context menu on the element.
● Window Show View Other... ABAP Element Info from the menu bar.
Note
To display Element Info for a method, press Alt + F2 at any position in the method implementation.
Related object Navigate to the related object. Related object name be
comes a link if you hover over it
ABAP Element Info view gives you the possibility to display the Element Info permanently. This view also
provides additional features, such as linking with selections , pinning views , and printing content .
Element Info is displayed as a side view if you trigger code completion by Ctrl + Space on a relevant
element.
In form editors, Element Info can be displayed from the context menu entry Show Element Information or by
pressing F2 on the element.
Related Information
Context
In source code-based development objects (like ABAP classes, ABAP interfaces, ABAP programs, and ABAP
function groups), you can display the definition and documentation of many ABAP code elements in a code
element info popup.
This enables you to obtain further details directly at the position where you are in the source code – without
navigating to the referenced object.
Note
You can only display the details on the use, not on the definition of elements.
Procedure
2. Press F2 or choose Source Code Show Code Element Information in the menu bar or context menu.
Results
A code element information popup will be opened that displays the following information:
Related Information
In a method implementation, you can display the name, parameters and exceptions of the method and its
documentation in a code element information popup. This enables you to obtain information about the method
from the position where you are in the source code.
Context
Procedure
2. Press Alt F2 or choose Source Code Show Method Information in the menu bar or context menu.
Results
A code element information popup will be opened that displays the method name, its parameters, and
exceptions and, if available, the documentation of the method.
Related Information
You can display details of elements from a development object in the Element popup and the ABAP Element
Info view.
Prerequisites
To navigate within the element info, your Eclipse-based IDE needs to be connected with SAP NetWeaver 7.4
SP04 or higher.
Context
Procedure
1. In the ABAP source code editor, position the cursor on an identifier in the implementation and press F2 .
Note
Since SAP NetWeaver 7.5 SP00, you can also display details on the usage from the definitions of
elements.
Note
Since SAP NetWeaver AS for ABAP 7.52 SP00, you can add links in ABAP doc comments to
open a ABAP repository objects or its component of an ABAP repository object. In addition, you
can trigger Where-used from linked object or component names.
The relevant element info for the selected element will now be displayed.
4. You can open a development object in the ABAP source code editor from its usage in the Element Info
popup/ABAP Element Info view.
a. Open the context menu from the relevant element and choose Navigate to.
The relevant development object will be opened in the source code editor and the cursor is positioned
on its definition.
b. To search for elements, choose the find icon from the bottom.
The search input field is opened. Enter here the search string and press then one of the following
shortcuts or icon:
Results
ADT provides the details of the code element information popup in the ABAP Element Info view.
The relevant search results are then highlighted in the element info. To skim through search results, you can
use the following shortcuts and icons from the integrated the toolbar:
● To lock the current display in order to compare, for example, details of several methods, press the icon.
● To link the display of the selected details with the current cursor position, press the icon. The display
will then automatically be refreshed in accordance to the selected cursor position within the source code.
Note
To predefine the formatting of ABAP Doc comments, open the General Appearance Colors and
Fonts preference page. From there, expand the ABAP folders and edit the ABAP Docu Font entry.
Related Information
Context
You can display further information of an element in a tooltip of the code completion results list. In this way, you
can check the element details directly while programming in the source code editor.
Procedure
1. To open the code completion results list, choose Ctrl + Space on the relevant element or position.
Results
ADT will provide the details of the selected element into the corresponding tooltip.
Related Information
Context
The ABAP source code editor provides a highlighting feature for occurrences of local variables and parameters.
It allows you to perform the following activities:
● To mark the occurrences, click on the local variable or parameter in the editor.
● To navigate between the occurrences choose the toolbar icons (Next Annotation) and (Previous
Annotation).
● To search for occurrences, starting from the current position, open the context menu and choose the
menu Source Code Occurrences in File or press Ctrl + Shift + U.
● To disable or enable this feature, use the marker icon in the toolbar.
● To specify the preferences for marking, choose Window Preferences ABAP Development Source
Code Editor Mark Occurrences
Related Information
Context
The Outline view displays the internal structure of an ABAP class, interface, or program that is currently
opened in the ABAP source code editor.
Icon Description
The following activities are provided from the context menu of an element in the outline tree:
Function Description
Navigate to Declaration Navigates to the declaration part in the source code editor.
Debug As Enables you to start debugging ABAP code after having set a
breakpoint. See also: Debugging ABAP Code [page 671]
Profile As Enables you to start profiling (ABAP Traces) for the ABAP
program. See also: Profiling ABAP Code [page 699]
Get Where-used List Enables you to determine the development objects that use
a specific object. See also: Where-Used Function [page 45]
Searching Usages (Where-Used) [page 323]
Context
You can open the ABAP Type Hierarchy view to display the inheritance tree of a selected ABAP class or
interface.
Note
In contrast to the corresponding quick view (Ctrl + T), you can look at the ABAP type hierarchy for a
selected class or interface independently from the current editor content. The hierarchy of a class or
interface is still displayed in the ABAP Type Hierarchy view even if the source editor has been closed, in the
meantime.
Procedure
1. Select either the name of the class in the currently opened ABAP source editor or the corresponding node
in the Project Explorer.
2. Open the context menu and then choose Open ABAP Type Hierarchy or press T.
The ABAP Type Hierarchy view appears that displays the class hierarchy including the superclasses and
subclasses.
Related Information
Prerequisites
Select the breadcrumb icon from the tool bar to display the breadcrumb bar in the source code editor.
Context
● Helps you to orientate and to navigate within the source code of a development object.
● Provides you with the same structural information as the Outline view.
● Provides you with information about the control structures (such as branch or loop statements) in which
your cursor is currently positioned.
You can display the breadcrumb bar in the source code editor of the following source code-based development
objects:
● ABAP classes
● ABAP interfaces
● ABAP programs
● ABAP includes
● ABAP function group main inlcudes
● ABAP function group inlcudes
● ABAP function modules
Example
You are working on a long method where you cannot see the start statement. But you want to know the
name of the method. The breadcrumb displays the names of the corresponding class and the method.
Procedure
1. In the source code editor, position the cursor where you need further information.
The name of the method or development object is displayed in the breadcrumb bar..
A drop-down list is opened where the name of the relevant development objects and subcomponents are
displayed.
3. Select the corresponding entry by double-clicking it.
Results
The corresponding development object or subcomponent is opened and the cursor is positioned on the
element's name (for example, method name or class name).
Related Information
Context
So-called quick views are in-place views that are shown on top of the source code editor area and can be easily
opened using keyboard shortcuts.
In the context of ABAP source code navigation, the following views are available:
● Quick Outline [page 397] (Ctrl + O shortcut) - displays the internal structure of a class, interface, or
program.
● Quick Type Hierarchy [page 398] (Ctrl + T shortcut) - displays the type hierarchy of a class or interface.
Related Information
Context
To use the quick outline in the currently opened ABAP source editor:
Procedure
1. Press Ctrl + O or open the context menu of the editor and choose Quick Outline.
The in-place outline view appears for the currently opened development object.
The Outline view shows also all subcomponents of all superclasses and all implemented interfaces (in blue
font).
3. Start typing while the Outline view is shown to filter the list of elements.
Related Information
Context
Procedure
1. Select the name of the class or interface in the currently opened ABAP source editor.
2. Press Ctrl + T or open the context menu of the editor and choose Quick Type Hierarchy.
The in-place type hierarchy view appears for the selected class or interface.
Related Information
Context
In systems with an automatic logoff mechanism, in particular, it can happen that your lock gets lost. This can
lead to the situation whereby other users may modify the same development object in the backend even if your
changes have not yet been stored.
The merging function allows you to decide which version should be stored if another user has changed the
same source in the backend in parallel. The merge dialog offers you options to:
● Compare and merge the versions available: This option opens the Compare editor where you can track the
changes first.
● Keep your local version: This will overwrite the backend version of your source code with those from your
ABAP project.
● Keep the backend version: This will overwrite your local source code with those from the ABAP Repository
(backend).
You can toggle between the inactive and active version of any source-based objects such as classes, function
modules, or ABAP programs. This functionality enables you to read the inactive version that is saved by
another user and not available in your working area.
Prerequisites
You have made changes in the source code and saved them.
This functionality is provided in SAP NetWeaver 7.4 SP08 and higher as well as in 7.31 SP14 and higher.
Procedure
2. In the context menu, choose Switch to active/inactive version or select Edit Switch to active/inactive
version from the menu.
3. [Optional:] Repeat step 2 to switch back to the opposite version.
Results
In the source code editor, the inactive or active version of a development object is displayed.
Note
In the tab of the current source code editor, the status of a development object is indicated by a decorator.
Inactive development objects are highlighted with a .
Context
ABAP Development Tools (ADT) provides a set of quick assists that help you to change ABAP source code in a
semi-automated way.
Related Information
Context
ABAP Development Tools provides a number of functions to refactor ABAP source code.
Related Information
Context
ABAP Development Tools (ADT) provides an intelligent search and renaming function that can find and rename
variables, methods, and form routine names, as well as other elements of an ABAP program. ABAP classes and
ABAP interfaces can be renamed as well.
In respective of your current back end version, following renaming functions are provided:
You can only change the names of elements that are used solely in the local ABAP program, as shown in the
editor (class pool, program, function module include). If you try to rename an element that is used in another
activated program, the Rename reports an error and does not make any changes. This check ensures that
changes to a local ABAP program will not cause unintended errors in another program.
In addition, you can rename global ABAP classes, interfaces, or their members (such as fields or methods of
classes or interfaces) that are used globally in other programs. All external references in other classes,
interfaces, or other program types are then automatically updated accordingly.
Caution
This kind of automatic update of external references is currently not supported in simple transformations,
package interfaces, transactions, data elements, structures, table types, eCatt objects, and so on.
Related Information
Context
You can change all occurrences of an element (except ABAP keywords) in an ABAP program at the same time.
Procedure
1. In the source code editor, position the cursor on the element to be renamed.
2. Start the Edit Quick Fix (Ctrl 1) Rename function function using the context menu and then Rename
x in source unit (Ctrl 2, R)).
A frame appears around each occurrence of the element.
Highlighted position of the element that is edited and all further occurrences of the element
3. Type in your change. The ADT makes the change simultaneously in all occurrences of the element in the
source code unit you are currently working in. This technique is only allowed for named elements that
occur only in your current source code unit. For example, you cannot use this technique to rename
elements in a method implementation if the named element is also used in your ABAP Unit tests.
You have renamed an element in your source code throughout the source code unit you are currently working
in.
Related Information
Context
You can use this function to rename elements in all parts of the ABAP source code.
Procedure
1. In the source code editor, position the cursor on the element to be renamed. ADT marks the element.
2. Start the Source Code Rename (Alt Shift R) from the context menu of the element to be renamed).
Or use the Quick Fix menu: Ctrl 1 and then Rename...
3. In the dialog box that follows, enter the new name for the element and choose Next.
Note
You can also choose Finish to complete the renaming right away.
Results
The wizard renames the selected element and updates the references.
Note
You can undo the renaming by choosing Undo Rename (Ctrl Z) from the context menu.
Related Information
Context
In the source code editor, you have the following options for extracting methods:
Function Description
Extracting Methods from Statements [page Creating a new method in the current class. The selected code is moved
407] into the body of the new method and replaced with a call to the new
method. Further occurrences of similar code are not replaced.
Available since SAP NetWeaver 7.3 EHP1 SP06 andSAP NetWeaver 7.4
SP02.
Extracting Methods from Expressions [page Creating a new method in the implementation of an ABAP class that re
410] turns the result of a selected expression. The selected expression is re
placed with the call to the new method. Further occurrences of similar ex
pressions are not replaced.
Available since SAP NetWeaver 7.3 EHP1 SP11 and SAP NetWeaver 7.4
SP05.
Prerequisites
You must be editing a global or local ABAP class in a class pool, a program, or another type of ABAP program.
Method extraction is not supported in code outside of classes. Also, you can only extract a method within the
start and end area of another method.
Context
In the implementation of an ABAP class, you can create a new method. The selected code is moved into the
body of the new method and replaced with a call to the new method. Further occurrences of similar code are
not replaced.
Note
The name of the new method is derived from the first code line that is selected. To this end, you can add a
comment at the beginning of the source code that contains the keywords you want to reuse in the name of
the new method.
Procedure
1. In the source code editor, select the code that you want to move to a new method.
2. In the context menu, choose Source Code Extract Method ... or the shortcut (Alt Shift M) to start
the dialog box.
You can change a suggested method name as well as the suggested name and attributes of a method
parameter.
Note
You cannot add a parameter to the proposed method signature, nor can you delete one.
Note
The method extractor presents the ABAP Compare editor to display the changes that will be made.
5. Chose Next to check the changes that will be made. The method extractor presents the ABAP Compare
editor to display the changes that will be made.
6. Use the ABAP Compare navigation buttons to review the changes. These are all shown in the Refactored
Source editor to the right.
Note
○ Comment as default name: Alternatively, you can start your selection with a comment. The comment
is then automatically suggested as the name of the new method. But you can also change the name or
write in your own name from scratch.
○ Method signature: The code extractor is very intelligent and usually does a good job of parsing the
code to extract and suggest useful method parameters. However, it can – under rare circumstances –
be misled. In this case, you can adjust the extracted code after you are finished with the method
extraction. You can also, within reason, change the suggested direction (exporting/changing...) of a
parameter.
○ Method visibility: By default, the new method is a private method in the local or global class you are
currently working in. You cannot have the method created in another class.
The method extractor inserts a call to the new method. Using Undo Extract Method (Ctrl Z) in the editor
context menu, you can cancel the method extraction and revert to the old code.
In addition to moving the extracted code and replacing it with a method call, the method extractor has done the
following:
● Implemented the signature – with your changes – that it suggested for the new method
● Declared any local variables that are needed in the new method
● Exposed class-based or classic exceptions in the method signature
● Suggested a simple, recommended naming convention for parameters and variables in the new method
You may wish to delete unused variables in the class from which you extracted the method. The method
extractor does not change the data declarations in your code, so the method extraction may leave an orphaned
data declaration behind.
Related Information
Context
In the implementation part of an ABAP class, you can create a new method that returns the result of a selected
expression. The tool declares this returning parameter with type Integer and the selected expression is
replaced with a call to the new method.
Note
The editor only replaces the selected expression. If the same expression is used several times in the same
repository object, only the selected occurrence is replaced. This means you have to extract all remaining
occurrences individually.
Example
Procedure
1. In the implementation part, select the entire expression that you want to add to a new method.
2. In the context menu, choose Quick Fix or use the shortcut (Ctrl 1).
3. In the Quick Fix dialog box, double-click Extract method from expression.
Results
In the private section of the definition part, the name of the extracted method (new_method) is added and the
appropriate parameters are declared.
In the implementation part, the selected expression is added in a new method. In the former call, the
expression is replaced with the name of the extracted method (new_method).
Example
Related Information
Context
In the source code editor, you have the following options for extracting constants:
Function Description
Extracting Constants from Literals [page 413] Creating a constant with the value of the literal and replacing all occur
rences.
Available since SAP NetWeaver 7.3 EHP1 SP11 and since SAP NetWeaver
7.4 SP05.
Note
In SAP NetWeaver 7.4, you can only extract literals into constants as
a string type. So, if you extract constants, a warning message that can
be ignored is displayed. The reason for this is that, if you assign a char
acter constant, it is not clear which exact type should be used.
Reusing Existing Constants [page 415] Replacing a literal with an existing constant. All other occurrences of the
same literals remain unchanged.
Available since SAP NetWeaver 7.3 EHP1 SP11 and since SAP NetWeaver
7.4 SP05.
Converting Locals to Class Members [page Converting a local constant, local variable, or local type to a class member
420] such as a member constant, attribute, or member type.
Available since SAP NetWeaver 7.3 EHP1 SP11 and since SAP NetWeaver
7.4 SP05.
Example
Related Information
You can extract local and member constants, local variables, attributes, as well as importing parameters from
the source code in order to substitute a literal in all or selected methods of an ABAP class. Afterwards, the tool
adds the corresponding identifier in the private or public section of the current class. So, the new identifier is
available in the entire ABAP class or in the corresponding method.
Context
Example
The literal '240' is to be extracted into a member con In the private section of the ABAP class, the new constant
stant. (_240) is defined as a string type with the value of the literal
('240'). Also, all occurrences of the literal are replaced
with the new constant.
Procedure
1. In the implementation part, select the literal that is to be extracted as a member constant.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. In the Quick Fix dialog box, double-click Extract local constant or Extract member constant.
Related Information
CLASS cl_car_extract_constant
METHOD drive.
IF i_speed > 240.
current_speed = 240.
ENDIF.
ENDMETHOD.
ENDCLASS.
You can reuse a member or local constant that has already been generated. Note that all occurrences of the
same literal remain unchanged.
Prerequisites
An existing constant is already defined for the same literal in a certain ABAP class.
Context
Example
The literal '200' is to be replaced with an existing constant In the source code of the ABAP class, all occurrences of the
literal are replaced with the name of the existing constant.
Procedure
1. In the source code editor, select the literal that is to be replaced by an existing constant.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. In the Quick Fix dialog box, double-click Use local constant or Use member constant.
Related Information
Context
In the source code editor, you have the following options for extracting variables:
Function Description
Extracting Local Variables from Expressions Assigning the selected expression to a new local variable. The selected ex
[page 418] pression is replaced with the new local variable.
Assigning a Statement to a New Variable Assigning the value of the selected statement to a new local variable or at
[page 424] tribute.
Converting Locals to Class Members [page Converting a local constant, local variable, or local type to a class member
420] such as a member constant, attribute, or member type of the current
class.
Converting Local Variables to Parameters In a certain method, converting an existing local variable to a new parame
[page 422] ter.
Declaring Variables from Usage [page 428] Creating a declaration for an attribute within a method.
Declaring Inline Variables Explicitly [page 426] In the method signature, converting an existing inline declaration of a local
variable to an explicit declaration.
Using Similar Variables [page 430] You have following options for using similar variables:
Deleting Unused Variables [page 436] Supported deletion of unused data declarations and variables.
Related Information
In a method of an ABAP class, you can create a new variable on the basis of an expression. This means, the tool
adds a new local variable and assigns the expressions. Note that other occurrences of the same expression are
not replaced with the new variable.
Prerequisites
This functionality is provided in SAP NetWeaver 7.3 EHP1 SP14 and higher as well as SAP NetWeaver 7.4
SP05 and higher.
Context
Example
The expression i_speed * '1.6' is to be extracted into In the implementation part of the method, the new local vari
a new local variable. able (kmh) is defined. The expression is assigned to the new
local variable. In the speed statement, the expression is re
placed with the new variable.
Procedure
1. In the implementation part, select the entire expression that you want to replace with a new variable.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl + 1 ) or by
using the Quick Assist view.
3. Apply Extract local variable.
Related Information
You can convert definitions of a local variable, local constant, or local type and paste them into the private
section of the current class. Therefore, you can make certain local elements of individual methods available for
all methods within an ABAP class.
Prerequisites
This functionality is provided in SAP NetWeaver 7.3 EHP1 SP11 and higher as well as SAP NetWeaver 7.4
SP05 and higher.
Context
Note
In the following table, you can see the local elements that can be converted to the corresponding member:
Example
The speed variable is declared local variable inside the im The local declaration has been removed and replaced by an
plementation of the drive method. attribute declaration.
Procedure
1. In the implementation part, position the cursor on the corresponding local declaration (variable, constant,
or type).
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl + 1 ) or by
using the Quick Assist view.
3. Apply Convert 'local variable' to attribute, Convert 'local constant' to constant, or Convert 'local type' to class
type.
Related Information
You can convert a local variable into a parameter create one of the following parameter types: IMPORTING,
RETURNING, CHANGING, or EXPORTING.
Prerequisites
This functionality is provided in SAP NetWeaver 7.3 EHP1 SP11 and higher as well as Release 7.40 SP05 and
higher.
Context
Example
The local variable speed is declared inside the drive The local declaration has been removed and the speed pa
method. rameter has been added to the signature of the drive
method.
1. In the source code editor, navigate to the method and position the cursor on the definition of the local
variable.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. Apply Convert 'local variable' to [importing / changing / exporting / returning] parameter.
Related Information
You can create an attribute or local variable in order to assign the result of a functional method call. A
functional method provides a returning parameter.
Prerequisites
This functionality is provided in SAP NetWeaver 7.3 EHP1 SP11 and higher as well as SAP NetWeaver 7.4
SP05 and higher.
Context
Example
The new variable car is to be added to replace the call of the In the implementation part of the test method, the new
create method car variable is declared.
Procedure
1. In the implementation part, position the cursor in front of the functional method call for which you want to
create a new variable or attribute.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl + 1 ) or by
using the Quick Assist view.
3. Apply Assign statement to new local variable or Assign statement to new attribute.
Related Information
In a method implementation, you can convert inline declarations of one or several local variables into explicit
declarations.
Prerequisites
The local variable is declared inline using the statement addition DATA(temp).
Context
Example
The inline declaration DATA(temp) is removed and an ex In the corresponding method, the new local variables (temp
plicit declaration is inserted in the method implementation. and engine) are generated and replace the undeclared in
line variable. The type (i and string) are derived from the
usage of the variable.
Procedure
1. In the implementation part, position the cursor on the inline declared variable.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl + 1 ) or by
using the Quick Assist view.
3. Apply Declare local variable 'variable' explicitly.
Related Information
You can create an attribute, local variable, or a parameter (importing, returning, changing, or exporting) on the
basis of a usage in a method implementation.
Prerequisites
This functionality is provided in SAP NetWeaver 7.3 EHP1 SP11 and higher as well as SAP NetWeaver 7.4
SP05 and higher.
Example
The variable speed is used but not yet declared. In the signature of the drive method, the attributes
(speed and engine_on) are added and declared.
Procedure
1. In the implementation part, select the usage that you want to replace, for example, with a local variable.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl + 1 ) or by
using the Quick Assist view.
3. Apply Declare [importing / changing / exporting / returning] parameter from usage or Declare local variable
from usage.
Related Information
You can reuse the name of a variable or interface attribute that is already defined by applying the following
quick fixes:
● Correcting Misspelled Variables [page 431] to replace an undeclared variable with the name of a variable
already defined.
● Correcting an Interface Attribute Access [page 432] to replace an undeclared variable with a similar
constant or attribute of an implemented ABAP interface.
Related Information
You can correct misspelled variables using a quick fix if another variable with a similar name exists.
Prerequisites
The source code contains an undeclared variable, but a variable with a similar name already exists.
Context
Example
The sped variable has been used but it is misspelled with a The misspelled sped variable has been replaced by the ex
typo. Only the speed variable is defined. isting speed attribute.
Procedure
You want to use an attribute of an interface. But you have forgotten to use the name of the interface as a prefix,
followed by ~.
Context
You have the following options for correcting an access to the interface attributes by:
Related Information
You can reuse existing interface members by adding the corresponding interface name and the '~' component
selector.
Prerequisites
Context
Example
The used speed variable is not declared in the cl_car The speed variable has been replaced by
class but in the if_car interface. if_car~speed.
Procedure
1. In the implementation part, position the cursor on the attribute that is defined in the interface.
Note
In this example, you can also choose Use similar parameter ... to use the importing parameter.
INTERFACE if_car.
DATA: speed TYPE i.
ENDINTERFACE.
You generate and reuse an alias from a variable that points to the ~ component selector of an interface.
Prerequisites
Context
Example
The used speed variable is not declared in the cl_car The name speed has been declared as alias for the
class but in the if_car interface. if_car~speed attribute in the public section of the
cl_car class where the interface is implemented.
Note
ADT automatically uses the name of the attribute for the
alias. You can rename the alias after execution.
Procedure
1. In the implementation part, position the cursor on the attribute for which you want use an alias.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl + 1 ) or by
using the Quick Assist view.
3. Apply Declare alias ....
INTERFACE if_car.
DATA: speed TYPE i.
In a source code-based development object, you can delete unused variables in the entire object or only in
marked source code. This enables you to automatically find and delete unused variable declarations in order to
clean up source code.
Prerequisites
This functionality is provided in SAP NetWeaver 7.3 EHP1 SP06 and higher as well as SAP NetWeaver 7.4
SP02 and higher.
Context
● Local variables within the scope of a method, function module, or form routine
● Global variables within a class, function group, or report.
Note
In a class, no variables that are declared in the PUBLIC or PROTECTED sections are deleted. The
deletion does not delete seemingly unused variables that could be referenced from outside.
Note
Deleting an unused variable can cause another variable to become unused if it was referenced. The deletion
of unused variables does not perform recursive checks for such variables. It can therefore be useful to run
the function more than once in order to find and delete unused variables in such cases. You can undo the
deletions using the shortcut Ctrl + Z .
The cl_car class contains the name and i_speed as well Only the unused current_speed, delta, and max pri
as the private variables current_speed, delta, temp, vate variables have been removed.
and max public variables.
Note
Except the temp variable, all other variables are not used.
To see which unused variables have been deleted, hover
the marker in the mark bar and check the displayed tool
tip.
Procedure
1. You can delete all unused variables of a source code-based development object:
a. In the source code editor, position the cursor anywhere within the source code.
b. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl + 1 ) or
by using the Quick Assist view.
c. Apply Source Code Delete Unused Variables (All) or shortcut (Alt U).
2. You can delete all unused variables in a selected section of source code:
a. In the source code editor, select the source code in the method where you want to perform the
deletion.
b. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
c. Apply Source Code Delete Unused Variables (Selection) or shortcut (Alt Shift U).
Context
In the source code editor, you can substitute members of an ABAP class in order to perform any of the
following functions:
Function Description
Changing Visibility of Members [page 439] Changing the visibility of a member by moving it into the public, protected,
or private section.
Converting Locals to Class Members [page Converting a local constant, local variable, or local type to a class member
420] such as a member constant, attribute, or member type of the current
class.
Pull-up Members to Superclass [page 442] Removing member definitions from a subclass and adding them to the su
perclass.
Pull-up Members to Interface [page 444] Removing member definitions and adding them to the implemented inter
face. Additionally, aliases are declared to avoid invalidation of existing
usages.
Note
In SAP NetWeaver 7.4 and higher, you can only extract literals into constants as a string type. So, if you
extract constants, a warning message that can be ignored is displayed. The reason for this is that, if you
assign a character constant, it is not clear which exact type should be used.
Related Information
In an ABAP class or ABAP interface, you can move a member definition between the public, protected, and
private sections in order to switch its availability.
Prerequisites
This functionality is provided in SAP NetWeaver 7.3 EHP1 SP06 and higher as well as SAP NetWeaver 7.4
SP02 and higher.
This refactoring option can be triggered for the following member types:
● Types
● Constants
● Attributes
● Methods
● Events
● Aliases
Note
Depending on the current section of the selected member, two refactoring aids are available as shown in
the following table:
Example
The speed attribute is declared in the private section. The declaration of the speed attribute has has been re
moved from the private section and added in the public sec
tion.
Decreasing Visibility
Some refactoring aids decrease (public > protected > private > local) the visibility of members of a class.
So, if the visibility of the target section is more restrictive than in the current section, the refactoring will check
whether any usages exist that will no longer be available after the change. In this case, the developer is
informed and can decide to reject or apply the change.
Some refactoring aids increase (local > private > protected > public) the visibility of members or locals inside a
class.
So, if the visibility of a member (or local) is increased, subsequent processing might depend on other
declarations that are no longer visible for the member. In this case, the developer is informed and can decide to
reject or apply the change.
Procedure
1. In the definition part, position the cursor on the member you want to move to another section.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. Apply Make 'member' protected, Make 'member' public, or Make 'member' private. Note that the
corresponding refactoring options for the possible target sections will be displayed depending on the
current cursor position.
Related Information
You can move member definitions (for example, constants, attributes, methods, types, and events) from a
subclass and to its superclass.
Prerequisites
Context
Example
The cl_car class contains the speed attribute and imple The declarion of the speed attribute has been removed
ments the cl_vehicle superclass. from the cl_car class and added to the cl_vehicle su
perclass.
1. In the implementation, select the member that you want to move to the protected section of the
superclass.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. Apply Pull-up Attribute to Super Class.
Related Information
You can move member definitions from a class and add them to the implemented interface. To avoid
invalidation of existing usages, aliases are declared.
Prerequisites
Context
Example
The cl_car class contains the move method and imple The declarion of the move method has been removed from
ments the if_vehicle interface. the cl_car class and added to the if_vehicle inter
face.
Procedure
1. In the definition part, select the member that you want to move to the interface.
Related Information
INTERFACE if_vehicle.
ENDINTERFACE.
If exceptions are propagated from a called procedure or raised by a RAISE EXCEPTION statement, they must
be explicitly declared in the signature of the calling method or handled by an appropriate TRY CATCH block.
In the source code editor, several functionalities are available for exception handling and these can be triggered
at the following positions:
The exception(s) are added to the signature of the calling method or surrounded with a TRY CATCH block.
Function Description
Propagating All Exceptions [page 447] Adding the unhandled exceptions of the selected block to the sig
nature of the calling method in order to propagate them.
Surrounding with TRY CATCH [page 451] Single catches: Surrounding the selected block of statements
with a try catch statement to handle raised exception(s). Each ex
ception is handled in a seperate catch block
The statement(s) are surrounded by a TRY CATCH block in order to handle the exceptions.
Function Description
Extracting a Catch Variable [page 455] Adding a local variable and adding the INTO clause to an existing
catch block.
Extending a TRY CATCH Statement [page 459] Adding a new catch block to an existing try catch statement.
Removing a TRY CATCH Statement [page 463] Removing the entire try catch statement.
Splitting a MULTI CATCH Block [page 461] Replacing the existing multi catch block by individual catch blocks
per exception.
Function Description
Propagating an Exception [page 449] Adding an exception class to the signature of a method signature
that is based on an existing RAISE EXCEPTION statement.
Extracting an Exception Variable from a RAISE State Adding a variable declaration for the exception and source code to
ment [page 457] instantiate the exception before raising it.
Related Information
You can add the unhandled exceptions of a selected block to the signature of the calling method in order to
propagate them.
Prerequisites
This functionality is provided since SAP NetWeaver 7.4 SP07 and higher.
Context
Example
The selection contains two statments that can raise ex The cx_failure and cx_no_fuel exceptions are
ceptions. cx_no_fuel and cx_failure have either to added to the signature of the drive method. The excep
be handled inside the method or propagated by adding tion will now be propagated to the caller of the drive
them to the method signature. For both cases, ABAP De method automatically at runtime.
velopment Tools (ADT) provides a quick assist.
Note
To handle them inside the method, proceed as described in Surrounding with TRY CATCH [page 451]
Procedure
1. In the implementation part, select the lines where the RAISE statement is called in a method.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl + 1 ) or by
using the Quick Assist view.
3. Apply Propagate All Exceptions.
Related Information
You can add an exception to the method signature based on an existing RAISE EXCEPTION statement of the
method implementation.
Prerequisites
Context
Example
In the implementation of the drive method, the In the signature of the drive method, the cx_no_fuel
check_fuel method that can raise an exception is called. exception class is added to the RAISING clause.
In order to propagate the exception, you need to define it in
the public section.
Procedure
1. In the implementation part, select the exception class that you want to define in the method signature.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. Apply Add raising declaration.
Related Information
You can surround the selected block of statements with a TRY CATCH statement in order to handle raised
exception(s) as a single or multiple TRY CATCH block.
Prerequisites
Context
In the implementation of the drive method , the In the drive method, the selection contains the call of the
check_fuel and check_engine methods are called. check_fuel and check_engine methods that can
The check_fuel and check_engine methods raise an raise exceptions. You want to handle the cx_no_fuel and
exception of the cx_failure and cx_no_fuel types. cx_failure exceptions that might occur in the drive
The signature of the drive method does not contain any method.
exception.
In the implementation of the drive method , the A TRY CATCH block is added to the drive method. If you
check_fuel and check_engine methods are called. have selected the call, a CATCH block for each exception
The check_fuel and check_engine methods raise an (cx_no_fuel and cx_failure) is added. Inside each
exception of the cx_failure and cx_no_fuel types. CATCH block, you can add code to handle the exceptions.
The signature of the drive method does not contain any
exception.
Procedure
1. In the implementation part, select the souce code that can raise one or more exceptions.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by using
the Quick Assist view.
3. Apply Surround all with TRY CATCH. If you have selected Surround all with TRY MULTI CATCH, all raised
exceptions are added to one CATCH block.
Note
You can also select several methods that are called. You then need to choose Surround all with TRY
MULTI CATCH in order to handle all raised exceptions that are defined for the selected method(s) in
the public section. Thus, all of the raised exceptions are added and handled in one CATCH block.
You can add a local variable to the method signature. Its type refers to the raised exception of the calling
method. In addition, this local variable is added as an INTO clause to the already existing CATCH block. This
enables you to handle the result of the exception in order, for example, to display it in a message.
Prerequisites
Context
Example
In the implementation of the drive method, the In the signature of the drive method, the exc local varia
check_fuel method is called in a TRY CATCH block. ble is added with TYPE REF TO of the selected exception
Here, the cx_no_fuel exception that is raised in the pub class. In addition, this local variable is added as an INTO
lic section is handled. clause at the end of the CATCH statement.
1. In the implementation part, select the CATCH statement where the exception class is called.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. Apply Extract Catch Variable.
Related Information
You can add a variable declaration for an exception to the method signature as well as to source code in order
to instantiate the exception before raising it. This enables you to handle the result of the exception, for example,
to display it in a message.
Prerequisites
This functionality is provided since SAP NetWeaver 7.4 SP05 / SAP NetWeaver 7.3 EHP1 SP11 and higher.
Context
Example
In the implementation of the drive method, an exception In the signature of the drive method, the exc exception
with the cx_error type is raised when the i_speed vari variable is added with TYPE REF TO of the selected ex
able is less than zero. ception class. In addition, this exception variable is added in
a CREATE statement and called in a RAISE statement. The
former RAISE EXCEPTION TYPE statement is deleted.
You can now reuse or process the value of the exception vari
able in order to handle this case of an exception.
Procedure
1. In the implementation part, select the exception class where it is called in the RAISE EXCEPTION
statement.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. Apply Extract Raise Variable.
Related Information
You can add a new CATCH block to an existing TRY CATCH statement. This enables you to handle another
exception in an existing TRY CATCH statement.
Prerequisites
Context
Example
In the implementation of the drive In the drive method, the new CATCH
method, the check_engine method block is added where the
is called. This method can raise excep cx_failure exception can now be
tions of the type cx_failure. handled.
Procedure
1. In the implementation part, select the method that can raise an exception that needs to be handeld in a
new CATCH block.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. Apply Extend Try Catch.
Related Information
You can replace an existing MULTI CATCH block by individual CATCH blocks for each exception separately.
Prerequisites
Context
Example
In the implementation of the drive method, a MULTI In the drive method, the MULTI CATCH block is divided
CATCH block handles the cx_no_fuel and cx_failure into two new single CATCH blocks for each exception.
exceptions.
Procedure
1. In the implementation part, select the MULTI CATCH block where you want to catch the exceptions
separately.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. Apply Split Multi Catch.
Related Information
You can remove an entire TRY CATCH statement if you no longer want to handle the exceptions.
Prerequisites
Example
In the implementation of the drive method, the In the drive method, the TRY CATCH statement – includ
cx_no_fuel and cx_failure exceptions are handled. ing the CATCH blocks – is removed. Only the content of the
former TRY block remains.
The TRY CATCH statement should now be removed be
cause the exceptions are no longer to be handled.
Procedure
1. In the implementation part, select the TRY statement of the TRY CATCH statement you want to remove.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. Apply Remove Try Catch.
Related Information
Context
In the source code editor, the following ABAP Quick Fixes are provided:
Creating Method Implementations from the Creating an empty method implementation from an existing declaration in
Method Definition [page 468] an ABAP class.
Available since SAP NetWeaver 7.3 EHP1 SP06 and SAP NetWeaver 7.4
SP02
Creating Method Definitions from Implemen Creating the empty method implementations of the methods that are de
tation Parts [page 470] fined in an implemented ABAP interface and of other unimplemented
methods within an ABAP class.
Available since SAP NetWeaver 7.3 EHP1 SP06 and SAP NetWeaver 7.4
SP02
Creating Implementation Parts for Unimple Promoting the implementation part of methods that are defined in an
mented Methods [page 472] ABAP interface and method stubs of other unimplemented methods.
Available since SAP NetWeaver 7.3 EHP1 SP06 and SAP NetWeaver 7.4
SP02
Creating Methods from Method Calls [page Creating a method from the method call. The signature is derived from the
478] existing method call.
Available since SAP NetWeaver 7.3 EHP1 SP06 and SAP NetWeaver 7.4
SP02
Creating ABAP Classes or ABAP Interfaces Starting the creation wizard of a global ABAP class or interface directly
from Usage [page 481] from the name of the missing repository object.
Available since SAP NetWeaver 7.3 EHP1 SP06 and SAP NetWeaver 7.4
SP02
Creating ABAP Includes from Usage [page Starting the creation wizard of an ABAP include from the name of the miss
485] ing repository object.
Available since SAP NetWeaver 7.3 EHP1 SP11 and SAP NetWeaver 7.4
SP05
Creating ABAP Function Modules from Usage Starting the creation wizard of an ABAP function module from the name of
[page 484] the missing repository object.
Available since SAP NetWeaver 7.3 EHP1 SP11 and SAP NetWeaver 7.4
SP05
Related Information
Context
ABAP Development Tools (ADT) provides the following quick fix tools to generate and synchronize definitions
and implementations of methods:
Note
Related Information
Prerequisites
In the ABAP class where you want to create the empty implementation part of a method, the declaration of the
method must exist in the definition part.
The ABAP class must be free of syntax errors, other than those for the missing method implementation(s).
Context
In an ABAP class, you can generate the implementation part of a method from an existing declaration in the
definition part. The added implementation part is empty and can be edited for development activities.
Procedure
1. In the source code editor, position the cursor on a method definition that has no implementation part yet.
Results
ABAP Development Tools inserts the corresponding (empty) implementation part of the method into the
existing implementation of the ABAP class.
Related Information
Prerequisites
In the ABAP class where you want to create the corresponding declaration in the definition part, the method
must exist in the implementation part.
The ABAP class must be free of syntax errors other than those for the missing method definition(s).
Context
You can generate the declaration of a method in the definition part of an ABAP class directly out of the
implementation part of the corresponding method.
Note
If you use the dialog and add parameters, the corresponding signature will be added in the definition part.
Procedure
1. In the source code editor, double-click the method name in the implementation part that has no definition
yet.
Note
Results
The source code editor inserts the definition from the method in the existing class implementation
Related Information
Prerequisites
● The name of the interface must be declared in the public section of the definition part of the class.
● The class must be free of syntax errors, other than those for the missing method implementation(s).
In an ABAP class, you can generate the implementation part of methods that are defined in an ABAP interface
as well as method stubs of other unimplemented methods.
Note
This functionality is available since SAP NetWeaver 7.4 SP2. In SAP NetWeaver 7.3 EHP1 SP4-10, you can
only create the implementations for unimplemented interface methods.
Procedure
1. Position the cursor on one of the following statements within the class:
Results
ABAP Development Tools generates stubs for all missing method implementations regardless of where the
method is defined.
Related Information
Context
Limitations
You can only create the implementations for unimplemented interface methods.
Note
In SAP NetWeaver 7.3 EHP1 SP11 and higher, the same behavior as in SAP NetWeaver 7.4 SP2 and
subsequent releases is provided.
1. In the source code editor of the class, enter the statement with the name of the interface in the public
section.
2. Position the cursor on the interface declaration that has no implementation part yet.
Results
ABAP Development Tools inserts the implementations of the missing interface methods in the existing
implementation part of your class.
Related Information
Prerequisites
The class must be free of syntax errors, other than those for the missing method implementation.
Context
Procedure
1. Position the cursor on one of the following statements within the class:
Results
ABAP Development Tools generates stubs for all missing method implementations regardless of where the
method is defined.
Related Information
Prerequisites
Context
In an ABAP class, you can generate the method definition from the method call in the implementation part.
Note
You can also create the method definition if the method is used in an ABAP class other than the one you are
now working in.
1. In the source code editor of the ABAP class where the method is implemented, position the cursor on a
method call to create the definition in another ABAP class.
Creating the method definition from the method call in another class
2. Choose Quick Fix (Ctrl 1) from the context menu.
3. In the Quick Fix dialog box, double-click Create method.
4. In the dialog, you can change a suggested method name as well as the suggested name and attributes of a
method parameter.
Results
The source code editor inserts the definition of the method in the public section of the existing ABAP class –
here with IMPORTING and EXPORTING parameters – using the wizard, and it creates the empty method in the
implementation.
Related Information
Prerequisites
In order to make this option available in the Quick Fix dialog, note the following prerequisites:
In the source code of an ABAP program, you can create a local and global ABAP class / interface directly from
the name of the missing class or interface.
ABAP Classes
● Definition statements, where the type ref to addition is used to specify a variable, constant type, or
method parameter
● Catch statements
● Raise exception statements
● Class definition statements within the inheriting from addition
● Create object statements with a type addition
Example
ABAP Interfaces
● Definition statements, where the type ref to addition is used to specify a variable, constant type, or
method parameter
● Interface implementation statements in the public section of a class
Example
Procedure
1. In the source code editor, position the cursor on the corresponding class or interface name for which you
want to create a class or interface.
2. In the context menu, choose Quick Fix or use the shortcut (Ctrl 1).
3. In the Quick Fix dialog box, double-click the required entry.
Note
The entries are displayed in reference to the element that you have selected.
Results
If you create a global class or interface, the corresponding creation wizard is opened. Here you define further
creation details.
Related Information
Context
You can create an ABAP function module that does not exist yet, based on the CALL FUNCTION statement.
Note
Example
If the function module does not exist yet, you can create it using a quick fix.
Procedure
1. In the source code editor, position the cursor on the corresponding function module name you want to
create.
2. In the context menu, choose Quick Fix or use the shortcut (Ctrl 1).
3. In the Quick Fix dialog box, double-click Create function module.
Results
The creation wizard is opened. Here you enter the data for creating the missing function module.
Related Information
Context
In the source code of an ABAP Include, you can start the creation wizard of an include directly from the name of
its call.
Example
REPORT demo.
INCLUDE demo_include.
Procedure
1. In the source code editor, position the cursor on the corresponding include name you want to create.
2. In the context menu, choose Quick Fix or use the shortcut (Ctrl 1).
3. In the Quick Fix dialog box, double-click Create include.
Results
The creation wizard is opened. Here you enter the data in order to create the missing include.
Related Information
Context
In addition to refactorings and quick fixes, the following other quick assists are provided:
Function Description
Generating Class Constructor Methods [page Creating an empty class constructor method in the public section
487] of the current ABAP class.
Generating Constructor Methods [page 488] Creating a constructor in the public section of the current ABAP class.
Note
If the class has attributes, a dialog is opened where you can select the
attributes that should be instantiated by the constructor.
Generating Factory Methods [page 489] Creating a static create method in the public section of the current
ABAP class.
Note
If the class has attributes, a dialog is opened where you can select the
attributes that should be instantiated by the factory method.
Creating a Text Symbol in the Text Pool [page Creating a text symbol in the text pool of an ABAP program.
496]
Editing Text Symbols [page 499] Changing a text symbol in the text pool of an ABAP program.
Correcting Inconsistencies Within Text Sym Balancing mismatches between source code and text pool.
bols [page 500]
Switching Notations [page 501] Adopting text changes of an existing text symbol in the text pool or the
source code and vice versa.
You have the following options for executing the generating functions:
Related Information
Context
You can create a public method called class_constructor with an empty implementation.
Example
Procedure
Results
Example
Context
From the class name in the definition of an ABAP class, you can create a public instance method called
constructor.
If the class has attributes, a dialog is opened where you can select the attributes that should be instantiated by
the constructor. Afterwards, the constructor is created with the selected parameters.
Example
Procedure
Results
In the definition, the constructor method is added. For each selected attribute, the corresponding parameter
is created.
Related Information
Context
In the definition of an ABAP class, you can add the static create method from the class name. If the class
has attributes, a dialog is opened where you can select the attributes that should be instantiated by the create
method. Then, in the public section, the definition of this method is added. In addition, an importing as well as a
returning parameter that refers to the same class are added.
Example
Procedure
Results
In the definition part, the create method is added. For each selected attribute, the corresponding r_result
returning parameter and i_current_speed importing parameter is created.
In the implementation part, the body of the create class-method is added. Here, the r_result returning
parameter is created and assigned to the i_name importing parameter.
Example
Related Information
You can generate the getter and/or setter method stubs from an attribute in the definition of an ABAP class in
the implementation. In addition, the corresponding importing and/or returning parameter(s) are set.
Prerequisites
Context
Example
In the local cl_car class of an ABAP program, the speed In the definition part of the cl_car class, the get_speed
attribute is defined. For the latter, the getter and setter and set_speed methods are added. For the get_speed
methods and the corresponding returning and importing pa method, the r_speed returning parameter is set and for
rameters need to be generated. The reason for this is be the set_speed method the i_speed importing parame
cause their value should be accessed and encapsulated. ter is set.
Procedure
1. In the definition part, select the variable for which you want to create the getter and setter methods.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. Apply one of the following options.
○ Generate Getter and Setter for speed to add the get_speed and set_speed method stubs as well as
its i_speed importing and r_speed returning parameters. In addition, the corresponding definitions
are also added.
○ Generate Getter for speed to add the get_speed method stub where the r_speed returning
parameter is set. The corresponding definitions are also added.
○ Generate Setter for speed to add the set_speed method stub where the i_speed importing
parameter is set. The corresponding definitions are also added.
Related Information
Exception classes have special constructor methods. If they implement the IF_T100_MESSAGE interface, the
signature and the implementation have a special logic.
Prerequisites
Context
Example
You have added the interface IF_T100_MESSAGE and an The signature and the implementation of the constructor
additional attribute SPEED to an exception class. There have been modified in accordance with T100 semantics
fore, the constructor is no longer up to date. and the new attribute.
Procedure
1. In the definition or the implementation, select the name of the exception class or the constructor method
for which you want to regenerate the constructor.
2. Get the quick assist proposals by choosing Quick Fix from the context menu (shortcut Ctrl 1) or by
using the Quick Assist view.
3. Apply Regenerate constructor.
Related Information
Prerequisites
This feature is supported for SAP NetWeaver 7.4 SP08 and higher.
Before SAP NetWeaver 7.4 SP08, you open text elements through the context menu entry Open Others
Text Elements in the SAP GUI.
Context
Using a text symbol makes a development object translateable and easier to maintain.
You can use various quick assits to create and edit text symbols directly in the source code editor.
Example
The following other quick assists are available for working with text symbols:
The table below shows the available quick assists, depending on the way a text is addressed in the source code
and on whether a corresponding text symbol already exists in the text pool.
Note
Text in uppercase is not considered
for translation. In this case, no
quick assist is provided.
Limitation
Text symbols are not considered whenever you copy a development object.
Related Information
Prerequisites
This functionality is provided for SAP NetWeaver 7.3 EHP1 SP14 and higher as well as SAP NetWeaver 7.4
SP08 and higher.
Context
Example
You want to create a text symbol from the following write statement:
WRITE text-001.
Procedure
1. In the source code editor, write text-xxx where xxx is the placeholder for the text key of your text symbol.
The text key has three characters that can be letters and / or numbers. However, it must not start with
%_ or contain empty spaces.
Note
Text in uppercase is not considered for translation. In this case, no quick assist is provided.
4. In the Quick Fix dialog box, double-click Create text 001 in the text pool.
Note
5. In the Text Content input field, add the information you want to display in the program.
Note
6. Enter the Maximum Length for the text content to be translated. You can also use the slider in order to
determine the number for the Maximum Length.
Note
Text translations in other languages may need more space due to an increased number of characters.
In order to provide the required space for such translations, the following automatic rules are defined in
ADT:
○ If the actual length is less than 20 characters, ADT adds 10 characters to the actual length.
○ If the actual length is greater than or equal to 20 characters, ADT doubles the number of the actual
length.
7. Choose Next.
8. Assign a transport request.
○ Select the Choose from requests in which I am involved radio button to pick an already existing
transport request.
○ Select the Create a new request radio button in order to generate a new transport request. In the
Request description field, type in further information.
○ Select the Enter a request number in order to add your class to an existing request. Choose the
Browse... button if you want to select a request that has already been created by a certain user.
9. Start the creation with Finish.
Example
The write statement is the same as it was before execution because the text content has been added in the
creation wizard.
In the Quick Assist view, the following quick assists are provided:
● Add literal for text to change the notation from text-xxx to 'hello'(xxx)
● Edit text to change the text of the text symbol
Tip
This procedure is also provided for similar use cases. In addition, take a look at the following differences:
You can write a text greeting = greeting = Use ● In the Text Content input field, the
followed by a certain 'hello'(B01). 'hello'(B01). quick given text 'hello' is already added.
text key enclosed in assists
brackets. to cre
ate or
edit the
text
symbol.
You can write a text print( 'Page print( 'Page Use the ● ADT automatically uses a text key
without providing was was quick that has not been used so far.
any text key. printed!' ). printed!'(100) assist ● In the Text Content input field, the
). to cre given text 'Page was printed!' is al
ate the ready added.
text
symbol. Note
If the same already exists as a text
symbol, you will get a quick assist
proposal to reuse the text symbol.
Related Information
Prerequisites
This functionality is provided since SAP NetWeaver 7.3 EHP1 SP14 and higher as well as SAP NetWeaver 7.4
SP08 and higher.
Context
You can edit text symbols in order to modify the text content or the maximum length.
Example
greeting = 'hello'(B01).
Procedure
Results
Example
Prerequisites
This functionality is provided for SAP NetWeaver 7.3 EHP1 SP14 and higher as well as SAP NetWeaver 7.4
SP08 and higher.
The text in the source code differs from the text stored in the text pool.
Context
You can automatically correct inconsistencies of an existing text symbol in the text pool or the source code
editor.
Example
Here, the text in the source code is 'hello', but the text pool contains 'goodbye' for the text key '001'.
REPORT adt_text_symbols.
WRITE:/ 'hello'(001).
Procedure
For this quick assist, an editor dialog is opened to verify or adjust the text that will be stored in the
text pool.
Results
Example
1. ABAP programm if you have replaced the literal by a text key from the text pool:
Here, the existing text content is updated with the content provided by the text tool.
REPORT adt_text_symbols.
WRITE:/ 'goodbye'(001).
2. ABAP programm if you have replaced the existing text content of the text pool:
Here, the text content remains in the source code editor. The text content in the text pool is updated.
REPORT adt_text_symbols.
WRITE:/ 'hello'(001).
Tip
If the texts are consistent and you want to change them, you can just edit the text in the source code and
use the quick assits to adjust the text in the text pool without opening the wizard.
Related Information
Prerequisites
This functionality is provided for SAP NetWeaver 7.3 EHP1 SP14 and higher as well as SAP NetWeaver 7.4
SP08 and higher.
1. You want to remove the fully qualified literal of a text symbol to display a notation.
2. You want to add the fully qualified literal of a text symbol without displaying a notation.
Example
In the source code, you want to replace the text content of a text symbol with a notation.
REPORT adt_text_symbols.
WRITE:/ 'This text needs to be replaced with another text ID'(001).
Procedure
1. In the source code, select the literal or the text key in brackets.
2. In the context menu, choose Quick Fix or use the shortcut ( Ctrl + 1 ).
3. In the Quick Fix dialog box, select Remove literal for text 001 to replace the text content in the source code
editor with a notation.
The Preview Changes dialog is opened.
4. Check the preview and select Finish.
Results
Example
REPORT adt_text_symbols.
WRITE:/ text-001.
Related Information
Context
The Transport Organizer in the ABAP Development Tools (ADT) contains the basic transport functions for the
SAP GUI-based Transport Organizer.
Related Information
You can create a new transport request from the Transport Organizer view.
Prerequisites
Procedure
You can also create a new transport request through File New Other… ABAP Transport
Request
Note
4. (Optional) Enter CTS Project or search using Browse…. Alternately, use content assist to search for the CTS
project.
5. Use Add... to add users to the task.
4. Choose Finish.
Results
The new transport request will be created with tasks assigned in the Transport Organizer view to the logged on
user. The Request is opened in the ADT Editor.
Context
The Transport Organizer view displays, by default, all transport requests and tasks of the logged on user. You
can set a filter to display objects that meet the filter criteria.
Note
This process simultaneously filters the following content in all configured back-end systems:
● Transport requests
● Tasks
● Owners
● Descriptions
● Object types
Note
You can enter letters, a name, special characters, or a number in the filter text field.
Results
The reduced set of elements in the Transport Organizer view is displayed. TIP: Delete the filter text to display all
transport requests, tasks, and objects.
Related Information
Context
You can set a filter for transport requests, tasks, and objects relating to a specific user.
Note
The Transport Organizer view displays, by default, all modifiable and released (last two weeks) transport
requests, tasks under workbench and customizing types in accordance with the owner status of the current
user for the selected project.
Note
At least one Request Type and Request Status must be set. Using the drop-down for ‘Released’ status
you can make a selection.
Note
You can use Reset Tree in the context menu to reset to default preferences.
The reduced set of transport requests and tasks that match the selected preference are displayed.
Related Information
Prerequisites
You can only add a user if the corresponding transport request exists in the folder Modifiable.
Context
You can create a new task to add users to a transport request. Consequently, you can ensure split development
activities amongst several users and ensure that a transport request can only be released if all involved users
have finished their work.
You can create a transport request within the Transport Organizer view of ABAP Development Tools. For more
information, see Creating a Transport Request [page 503].
Method Procedure
Transport Request Editor 1. Open the Request Editor. For more information, see
Opening a Request or Task Editor [page 518].
2. From the context menu on the Request in the Objects
section, select Add User. Alternately, Select the Add
User icon in the toolbar of the editor.
3. In the following dialog box, enter the user name of the
Owner or select the button Browse... to search for the
user name.
4. Choose Finish.
Related Information
Context
You assign the owner of a transport request or task to make it available for a particular user.
Method Procedure
Transport Request/Task Editor 1. Open the Request Editor. For more information, see
Opening a Request or Task Editor [page 518].
Note 2. In the Properties section, select Change.... Alternatively,
This feature is supported as of Application Server ABAP select Change Owner in the context menu of the Objects
7.53 SP00. section.
3. In the following dialog box, enter the user name of the
New Owner or select the button Browse... to search for
the user name.
4. Choose Finish.
Results
The transport request or task is assigned to the new user. Only the new user can edit or release the
corresponding transport request, tasks, and objects.
Related Information
Context
You can run various consistency checks on objects that are assigned to a transport request in one operation.
The consistency check will also automatically be executed when you release a transport request. Therefore,
you can check in advance if any problems have occurred before releasing.
Method Procedure
Transport Request/Task Editor 1. Open the Request Editor. For more information, see
Opening a Request or Task Editor [page 518].
Note 2. Select the Run Consistency Checks icon in the toolbar of
This feature is supported as of Application Server ABAP the editor. Alternately, Under Objects section, select
7.53 SP00. Run Consistency Checks in the context menu of trans
port request or task.
Results
If an inconsistency exists, ABAP Development Tools displays an error message in the status bar.
Related Information
Context
The Transport Organizer view and the Request/Task editors contain basic functions for releasing transport
requests [page 513] and tasks [page 511]. Use this action to release the tasks. After releasing all tasks, you
can also release the transport request.
Related Information
Prerequisites
You can only release a transport task if you are the owner.
Context
You release a task when you have finished the development activities and only when a certain development
status is to be released.
Method Procedure
Transport Request/Task Editor 1. Open the Task Editor. For more information, see Open
ing a Request or Task Editor [page 518].
Note 2. Select the Release icon in the toolbar of the task editor.
This feature is supported as of Application Server ABAP Alternately, Under Objects section, select Release in the
7.53 SP00. context menu of transport task.
Results
A task is released. If error exists, Release Transport Request error message appears. Click Problems view to
view detailed error message information. The objects are still locked. This means that only those users involved
in the change request can edit these objects.
If there are any ATC errors, the result can be checked under ATC Result Browser view.
Note
In the context menu of the transport task, chooseThe objects are copied to the object list of its change
request. Therefore, in the Transport Organizer view the corresponding objects and tasks are displayed at
the same folder level as the decorator. In the Transport Request Editor, Tasks are displayed with
decorator and objects are displayed on the right pane of objects section. Released objects are appended to
the All Objects node.
Related Information
Prerequisites
You can only release a transport request if you are the owner and only if all containing tasks are released.
Context
After you have released all tasks, you can release the transport request itself. Consequently, all objects of the
object list that have been changed are available for import into another system.
Method Procedure
Transport Request Editor 1. Open the Request Editor. For more information, see
Opening a Request or Task Editor [page 518].
Note 2. Select the Release icon in the toolbar of the transport
This feature is supported as of Application Server ABAP request editor. Alternately, Under Objects section, se
7.53 SP00. lect Release in the context menu on the request.
Results
A transport request is released. If error exists, Release Transport Request error message appears. Click
Problems view to view detailed error message information.
If there are any ATC errors, the result can be checked under ATC Result Browser view.
Related Information
Context
You delete transport requests [page 514] and tasks [page 515] to prevent the transfer of objects into another
system or client. The objects still remain in the system and will not be deleted.
Related Information
Prerequisites
The transport request has the request status Modifiable and has not been released yet.
Context
You can delete a transport request that is displayed in the Modifiable folder.
Note
Results
The transport request and all containing tasks are removed and they disappear from the Transport Organizer
view.
Related Information
Prerequisites
The task is modifiable and the objects assigned to the task are unlocked.
Context
You can remove classified and unclassified tasks from a transport request. You cannot delete tasks that contain
locked objects.
Method Procedure
Transport Request Editor 1. Open the Request Editor. For more information, see
Opening a Request or Task Editor [page 518].
Note 2. Under Objects section, select Delete in the context
This feature is supported as of Application Server ABAP menu of the task.
7.53 SP00. 3. Choose Confirm.
Related Information
Prerequisites
You can remove objects from a request or task in the following ways:
Method Procedure
Transport Request/Task Editor 1. Open the Request Editor. For more information, see
Opening a Request or Task Editor [page 518].
2. Select the Request or Task under the Objects section of
editor.
3. In the context menu of the Object list on the right pane,
select Remove. The Remove ABAP Object dialog box ap
pears.
4. Choose Confirm.
You can assign a task from an existing transport request to any other transport request assigned to your user.
Prerequisites
Procedure
The Task will be moved from the source request to the newly selected transport request
You can navigate to the selected request or task or the ABAP Object.
Prerequisites
Context
Method Procedure
Request or Task Editor 1. Double click or click Open context menu of the Tasks/
ABAP objects present in the Object List section of the
editor.
2. To open the Request Editor from the Task Editor, click
the Request link in the properties section of the Task Ed
itor.
Context
Open the Editor to edit a transport request or task. For more information, see Opening a Request or Task Editor
[page 518].
To ensure that only the owner of a request can add more users, you can protect the request.
Context
Procedure
Note
You can change the task type of a task that is added under a transport request.
Context
Method Procedure
Transport Task Editor 1. Open the Task Editor. For more information, see Open
ing a Request or Task Editor [page 518].
2. To change task type, in the Properties section, choose
Browse.
3. In the context menu, select Change Task Type
4. In the sub-menu, select the relevant task type :
○ Development/Correction
○ Repair
○ Unclassified
5. Choose Save.
Note
You cannot add any objects if the task type is Unclassified. You need to change the task type to
Development/Correction or Repair.
You can delete one of several identical entries in a transport request or task.
Prerequisites
Procedure
Results
Duplicate object entries will be removed from the transport request or task.
1. Add Object... [page 522] which allows selection of objects of your choice by providing the object name,
type, and the program ID.
2. Add objects from request... [page 522] which copies objects from another request.
In both the cases, the objects are added to the request without locks.
These objects get locked when the request is being released; if the same objects are locked for editing by
other change requests, then these change requests should be released first to avoid any conflicts.
This is to make sure that the requests do not transport objects in an undefined intermediate state.
Through this feature, you can assign objects of your choice to a request
Procedure
Results
Note
Objects can also be added to a task in the Task Editor by choosing the Add Object tool item in the Objects
section.
Procedure
All the objects from the source request is copied to the target request.
You can compare the changes in an object from a transport request or task editor.
1. Navigating to Revision History of Transport Objects [page 523] : which shows changes associated with
transport request within a single ABAP project
2. Comparing across ABAP Projects [page 524]: which compares the changes in two different ABAP projects
You can open the History view from the transport request or task editor. These revisions show changes over a
much longer period. You can compare the changes from one transport of source code to another.
Procedure
1. Open the Request Editor. For more information, see Opening a Request or Task Editor [page 518]
2. Select the Request or Task under the Objects section of editor.
3. In the context menu of the object list, choose Compare With Revision History .
Results
This will open the History view with the revision details of the object.
You can compare the newest version of an object in each of the two ABAP projects. You can use this
comparison to check code-level changes in separate ABAP back-end systems.
Procedure
For more information, see Opening a Request or Task Editor [page 518]
2. Select the Request or Task under the Objects section of editor.
3. In the context menu of the object list, choose Compare With ABAP Project where ABAP project is
one of the projects defined in your ADT.
Results
A compare editor opens with the two versions of the object corresponding to each system.
Context
You can compare the changes made to the source code with the last revised version of the code that was
transported.
Procedure
From the context menu of an object in the Project Explorer, source code editor or Transport Request editor,
choose Compare With Previous Revision
A new compare editor window opens, showing the current version of the code. The last transported version of
the code is shown with its timestamp in an adjacent view. Changes are highlighted in the two windows.
Locations or changes are shown as icons at the right edge of the saved code version.
Prerequisites
Context
You can use the object list of a Transport Request editor to edit one or more entries of a table that is locked in a
transport request. You need to first specify the table (TABU) or a generic transport object (TDAT, VDAT, CDAT),
and edit the individual key fields.
Procedure
Note
Object types like CDAT, VDAT, and TDAT are read only.
Note
This function moves all the objects and tasks that are under one request to another request.
Procedure
Results
All the objects and tasks of source request are moved into the target request. The empty request (source
request) is then deleted.
The ABAP Keyword Documentation describes the syntax and meaning of the keywords of the ABAP language
and its object-oriented part ABAP Objects.
Prerequisites
To enable the language help, the corresponding ICF service needs to be activated. For more information, see
chapter "3.1 Providing Access to Documentation" in the corresponding Configuration Guide for Configuring the
ABAP Back-end for ABAP.
Context
While editing ABAP source code, you will generally need to fall back on the ABAP language help. Here, you can
to find more information about the syntax and meaning an ABAP keyword. For this, ABAP Development Tools
provides a context-sensitive link from within the ABAP source editor. The help content is displayed in a
separate help view.
The content is stored in the back-end system, so it is in sync with the release of the ABAP project in which you
are working.
Procedure
1. To access the ABAP Keyword Documentation, position the cursor on an ABAP statement or ABAP keyword
for which you need help and choose F1 .
The ABAP Samples form an important part of the ABAP language help. You will find an extensive
collection of executable ABAP code samples, sorted according to theme.
2. To access the ABAP samples, open the ABAP Keyword Documentation and choose ABAP Examples
node.
You have the following options to search and group released APIs belonging to a certain contract:
Repository Tree
1. In the Project Explorer, right-click on an ABAP Project and choose New ABAP Repository Tree .
2. In the Create Tree dialog, choose Released Objects as filter criteria and click Next as shown below.
Alternatively, you can choose Deprecated Objects. :
1. Click Ctrl + shift> to open the Open ABAP Development Object dialog.
2. Search for api: + release state as shown in the following example. In this example, the filter api is being used
to find CDS views (filter type:DDLS) with name pattern I_SALES which were released as APIs for use in key
user apps (filter api:USE_IN_KEY_USER_APPS):
You can set the release state either in the properties tab or by right-clicking the object in the project explorer.
Once an ABAP development was opened, its API state is displayed in the API State tab of the Properties view.
The API State tab is visible only for types of objects which can be released as APIs.
Procedure
You can change the API state of your own development object as follows:
Remember
As a developer on customer-site, you can use the Use System-Internally (C1) release contract to make
custom objects available for use in key user apps. The other release contracts are only relevant for SAP
development.
Note
Released APIs must not be changed incompatibly, otherwise runtime errors might occur or an upgrade
might fail. For details, see Released APIs [page 100].
1. Change the release state by right-clicking the object in the Project Explorer. Select API State, then choose
Add Use System-Internally (Contract C1) to open the API State wizard.
2. On the first screen, select one of the available release contracts, e.g. Use System-Internally (Contract C1).
The available release contracts depend on the type of the object to be released.
Note
If the wizard is started via the context menu of the Project Explorer, this step is skipped, because the
release contract has already been selected before (see above). Click Next.
○ Released: Choose this release state to make your development object available for customers in a
restricted Cloud environment.
○ Not to Be Released: Choose this release state to document the decision that your development
object isn’t suitable for releasing.
○ Not to Be Released, Stable: Choose this release state if your development must not be released,
but nevertheless needs to remain stable.
b. Use the optional Comment field to explain your decision. The comment is stored locally in the
development system only. It is not transported to subsequent systems.
c. When releasing an object for contract Use System-Internally (Contract C1), its Visibility needs to be
defined additionally.
Related Information
To check the correct use of released APIs, you can run code inspector checks in the integrated ABAP Test
Cockpit (ATC) to check the usage of nonreleased objects.
Procedure
1. Create a new variant with the SCI transaction and select Test for restricted language scope (ABAP version).
2. In the attributes, you can select the language version you want to run the checks for.
Results
You can now use the code inspector checks to check for usage of development objects, which haven’t been
released for the selected language version.
You can determine the language scope and syntax rules of an ABAP program or class for specifying the
language elements and repository objects that can be used. You can also determine which syntax rules have to
be applied.
Context
To enforce the correct use of released APIs, you can select an ABAP language version for an ABAP program or
class with a restricted set of language elements and use of only released APIs . You can select the language
Procedure
1. In the Properties view of an ABAP program or class, open the Specific subtab.
2. From the ABAP Language Version dropdown listbox, choose the relevant entry.
Results
In the relevant scenario, the syntax of the corresponding ABAP program or class is now checked on the basis of
the selected ABAP language version.
Related Information
Context
You can mark a development object as deprecated, for example if you’ve defined an improved successor that is
to be used instead.
Note
1. Open the Properties tab for the object you want to set the API release status for.
2. Click Change to open the API State Wizard.
3. Change the release state from Released to Deprecated and click button Next.
4. Click Add to select at least one successor. This is mandatory: A development object can only be
deprecated if a successor was defined.
5. Select a successor. The successor must be a released API, which can serve as a replacement in all places
where the deprecated object was used before.
Results
The development object is now deprecated and a successor is in place. Using a deprecated object leads to a
syntax warning that points to the successor.
You want to deprecate an element in a CDS entity and you want to define a successor.
Context
Note
Procedure
Set the following annotations for the element you want to deprecate:
○ @API.element.releaseState: #DEPRECATED
○ @API.element.successor: 'SucceedingReleasedElement'
( It’s mandatory to select a successor for an element).
Results
Prerequisites
● You have already created an ABAP project. For information, see Creating ABAP Projects [page 115].
● You have added ABAP packages required for your work in the favorite list. For information, see Adding a
Favorite Package [page 136].
Procedure
Project Explorer context menu with the open data preview option
You can also use the combination key Alt + F8 to open a database table or a view in the ABAP Data
Dictionary.
Results
The Data Preview tool displays the top 100 records from the selected database table or view by default.
Related Information
Prerequisites
You have already opened the Data Preview for the required table.
Context
The Data Preview tool allows you to set the size of a result-set to retrieve records from ABAP Data Dictionary
tables, Views, external Views, and ABAP DDL Sources. The result-set size determines the number of records
that the Data Preview tool can retrieve. The default value is 100 and the maximum value is 5000.
Note
Using the value in the Max rows field, you can restrict the number of records for display in the Data Preview.
The number you set is the number of records displayed, even if the filter criteria has fetched more records.
The Number of Entries button displays the total number of records that match the filter criteria. If you have
not applied any filter, the button displays the total number of records in the database.
Procedure
1. In the top-right of the Data Preview tool, enter or select a value in the Max rows field.
The Data Preview tool fetches the number of records according to the value entered in the Max rowsfield.
Prerequisites
You have already opened the Data Preview tool for the Data Dictionary table or Data Dictionary View.
Context
You can configure Data Preview to view or work with specific columns. By default, Data Preview displays the
first 20 columns of an ABAP Data Dictionary table or View. This option is not available in ABAP DDL Source and
external Views.
Procedure
2. In the Select Columns wizard, only select columns that you want to display in Data Preview.
Results
Related Information
Prerequisites
You have already opened the Data Preview tool for the ABAP Data Dictionary tables, Views, external Views, or
ABAP DDL Sources.
Context
To identify and list specific column entries, the Data Preview tool allows you to set filters. You can set a filter on
a single column or on multiple columns. The Data Preview tool allows you to set filters using any of the following
options:
Related Information
Context
Procedure
1. In the top-right of the Data Preview tool, identify the Add Filter button.
Operator Description
Equal The Equal operator selects all records with value equal to
the value specified in the text field. This operator works
with column data types such as:
○ String
○ Numeric
○ Timestamp
Not Equal The Not Equal operator selects all records with value not
equal to the value specified in the text field. This operator
works with column data types such as:
○ String
○ Numeric
○ Timestamp
Lower The Lower operator selects all records with value lower
than the value specified in the text field. For columns with
String data type, Data Preview selects values with lexical
order lower than the value specified in the text field. This
operator works with column data types such as:
○ String
○ Numeric
○ Timestamp
Lower or equal The Lower or equal operator selects all records with value
lower than or equal to the value specified in the text field.
For columns with String data type, Data Preview selects
values with lexical order lower than or equal to the value
specified in the text field. This operator works with column
data types such as:
○ String
○ Numeric
○ Timestamp
Greater The Greater operator selects all records with value greater
than the value specified in the text field. For columns with
String data type, Data Preview selects values with lexical
order greater than the value specified in the text field. This
operator works with column data types such as:
○ String
○ Numeric
○ Timestamp
Greater or equal The Greater or equal operator selects all records with
value greater than or equal to the value specified in the
text field. For columns with String data type, Data Preview
selects values with lexical order greater than or equal to
the value specified in the text field. This operator works
with column data types such as:
○ String
○ Numeric
○ Timestamp
Like The Like operator selects all records with value that
matches the regular expression value specified in the text
field. This operator works with columns of String data
type.
Not Like The Not Like operator selects all records with value that
does not match the regular expression value specified in
the text field. This operator works with columns of String
data type.
In List The In List operator selects all records with value that is
equal to any of the values specified in the text field. This
operator works with columns of String and Numeric data
types.
Not In List The Not In List operator selects all records with value that
is not equal to any of the values specified in the text field.
This operator works with columns of String and Numeric
data types.
Is Null The Is Null operator selects all records with the value “is
null”. This operator works with column data types such as:
○ String
○ Numeric
○ Timestamp
Is Not Null The Is Not Null operator selects all records with the value
“is not null”. This operator works with column data types
such as:
○ String
○ Numeric
○ Timestamp
Related Information
Context
Procedure
The Data Preview tool displays records that match the Quick Filter criteria.
Note
To remove a filter, close the section used to set the filter criteria
Related Information
Context
The local filter highlights all values that match the filter criteria in the record-set fetched from the backend. The
local filter does not make any backend connection.
Procedure
1. In the top-left of the Data Preview tool, identify the Filter Pattern field.
2. Enter a value.
Results
The Data Preview tool highlights all values that match the criteria.
Related Information
The Data Preview tool also contains the Data Aging option for viewing the most frequently accessed data (hot
data) in your database.
Prerequisites
Context
This option supports all databases that support data aging. By default, Data Preview displays the most
frequently accessed data. For more information about data aging, see Data Aging under Related Information.
Procedure
Choose the Data Aging button to switch the option off or on.
If you switch off the Data Aging option, Data Preview displays the less frequently used data (cold data).
Prerequisites
You have already opened the Data Preview tool for the ABAP Data Dictionary tables, Views, external Views, or
ABAP DDL Sources.
Context
The Data Preview tool generates logs containing SQL queries. You can reuse queries from logs in your
application if required.
1. In the top-right of the Data Preview tool, choose the Show Log button.
The Data Explorer Log window appears and lists the log entries.
Related Information
Prerequisites
You have already opened the Data Preview tool for the ABAP Data Dictionary tables, Views, external Views, or
ABAP DDL Sources.
Context
The Data Preview tool enables listing of unique or distinct values in a column that contains duplicate values.
Procedure
Related Information
Prerequisites
You have already opened the Data Preview tool for the ABAP Data Dictionary tables, Views, external Views, or
ABAP DDL Sources.
Context
The Data Preview tool provides different file formats to save analyzed records.
Procedure
1. In the top-right of the Data Preview tool, identify the (Save as file) icon.
Related Information
Prerequisites
You have opened the Data Preview tool for the ABAP Data Dictionary tables, Views, external Views, or ABAP
DDL Sources.
Context
You can copy all the rows as an ABAP value statement and use it in the ABAP code to work with internal tables.
Procedure
You can use the generated source code in the ABAP code to work with internal tables.
SQL Console allows you to write an SQL statement and analyze the query performance.
Context
SQL Console uses the most current query used in Data Preview. SQL Console supports:
Note
SQL Console also performs an automatic syntax check
and instantly highlights any errors in syntax. For proper
functioning of the automatic syntax check, ensure that
the option Automatic Syntax check on all open ABAP
source editors is selected in Eclipse. This option is
available under the Eclipse menu option Windows
Preferences .
Note
The Run drop-down menu contains following options:
● History: This option lists previously executed
queries in SQL Console. Use this option to remove
specific queries from the list or to define the
number of queries to be displayed in the list.
● Clear History: This option removes all the
previously executed queries, except the current
query, from the History list.
● Add To Favorites: This option allows you to add a
query in the favorites section and reuse it for future
reference.
● Organize Favorites: This option allows you to work
with queries in your favorites. You can add, remove,
or move a query in the list.
Data Aging The Data Aging option allows you to view the most
frequently accessed data (hot data) in your database. This
feature is available only for the HANA database. The Data
Max Rows In SQL Console, enter a value for Max Rows. Data Preview
considers only this value while displaying records.
Maximum row value provided in the SQL statement is not
considered.
Query Performance SQL Console is split into two windows. The top window
provides you the option of entering an SQL statement and
the bottom window provides query related statistics.
Procedure
The SQL Console appears and displays the executed query, query results, and query statistics.
Context
ABAP Development Tools (ADT) offers you a variety of feeds from the ABAP repository, including these:
Related Information
Context
Note
When you create an ABAP project, some feeds are set up for you automatically.
Procedure
The New Feed Query view opens your ABAP Projects from the Project Explorer to show the repositories.
4. Choose an ABAP Project to display and choose from the available feeds.
You can see (and change, if you want to) the default refresh interval – the frequency with which ABAP
Developement Tools checks for new feed items.
Mark the Display notification messages check box to have a pop-up dialog notify you when there is new
content for a feed. Notifications offer a nice feature: The dialog tells you how old the feed event is. That is
useful, for example, for screening out old system messages if you open an ABAP project that you haven't
used for a while.
You can Selecting ABAP Runtime Errors for a Feed [page 769] for an error feed.
Note
If you haven't chosen Display notification messages, then monitor the # Unread column in the Feed
Reader view to see when new feed items have arrived.
Prerequisites
You have obtained the URL of the Atom feed from the provider of the feed.
Context
In the ABAP Development Tools, you can subscribe to any feed that is published in Atom (Atom Syndication
Format) or RSS (Really Simple Syndication) format.
Procedure
1. Type Ctrl + 3 to display available views, and select the Feed Reader, if it is not already visible.
2. Click on the pull-down menu of Add feed... in the Feed Reader view.
3. From the pull-down menu, choose Add Atom / RSS feed from URL.
4. In the following window, enter the URL of the Atom or RSS feed and choose Finish.
Results
Your Atom/RSS feed appears in the Feed Reader. Click on an entry in the feed for a quick look at the content in
the right frame of the Feed Reader view. Double-click on an entry to open it in its own window.
Related Information
Context
Procedure
Related Information
Procedure
To cancel a feed, or also to change the settings of an existing feed, mark the feed in the Feed Reader view. Then
choose Delete from the context menu of the feed.
Related Information
Context
Procedure
Context
There are two central tools in ADT for ensuring the quality of a repository object: ABAP Unit Framework and
ATC (ABAP Test Cockpit). Although these tools are self-contained, there is a strong integrational relationship
between them. ATC allows you to execute ABAP Unit tests together with other quality checks.
ABAP Unit Framework checks the functional correctness of the tested object and verifies the intended program
behavior at runtime.
ATC Framework measures the quality of the ABAP code and detects respective issues. There is a variety of
checks, you can execute within the ATC Framework, for example:
● Security check
● Accessibility check
● Usability check
● Functionality check
● ABAP Unit tests
You can configure, which tests you want to execute in ATC check.
Transport Release
When you want to release a transport request, ATC checks are executed to verify the specified quality
attributes.
Depending on the used ATC check variant, this includes execution of unit tests. Be aware that unit test
execution might be switched off or restricted to a maximum duration of ‘medium’ or ‘short’.
Note
The concept of test relations [page 609] is not considered during ATC check. This means that ATC doesn't
search for the foreign tests and doesn't execute them.
Related Information
Writing ABAP Unit tests is the way to provide high quality software, which can be easily evolved over time
without introducing regressions. In methodologies, like extreme programming and test driven development,
the role of unit testing is even more important.
ABAP unit is the state-of-the-art unit testing framework for ABAP. It's embedded into the ABAP programming
language which supports you in writing unit tests. In ADT you have various possibilities to execute the unit tests
and to evaluate the results concerning functional correctness and code coverage.
Related Information
ABAP Unit is a framework for executing automated tests written in local classes. These tests usually check the
functional correctness of ABAP objects like classes and CDS views.
Related Information
Depending on the program object with which you are working, there are different recommendations as to
where you should implement ABAP Unit test classes.
Context
In classes, for example, there is a special include for ABAP Unit test classes. Function modules also provide a
special include for ABAP Unit tests.
This table shows you how ABAP Development Tools supports you in creating and navigating to these ABAP Unit
includes, where they are available, and where to write your ABAP Unit source code.
Type of Repository Object Where to Write Your ABAP Unit Test Classes
ABAP Classes Just choose the Test Classes tab at the bottom of the ABAP
class editor.
Classes .
4. The creation dialog appears. Confirm the creation
of the empty include for the test class by selecting
Yes.
5. In the appeared dialog select Continue.
Result
The <function_group_name>T99 include is created for
ABAP unit test classes. The wizard also generates stubs
for the test methods that you specify.
In ADT, you can navigate to the ‘T99’ include and edit
the ABAP unit classes by opening the function group
from Project Explorer. This opens the master program
of the function group. You can then navigate to the
ABAP unit source code in the T99 include.
● Create the test include in ADT:
1. Open the function group in ADT.
2. Select the function group in Project Explorer. From
context menu select New ABAP Function
Group Include .
3. In the Dialog enter Description. Enter T99 in the
Suffix field.
ABAP Programs, Reports, and Subroutine Pools Create ABAP unit local classes and test methods at the end
of the ABAP program.
Note
Be aware that ABAP Test Seams [page 607] can only
be applied within class pools and function groups.
To write ABAP Unit tests, create tests methods in local test classes.
1. Open the Test Classes tab at the bottom of your ABAP Editor.
2. Write a test class using the predefined language elements. Alternatively, you can insert a template for
ABAP Unit test classes. Just type test in your editor, then press Ctrl + Space for a code-completion
list.
3. In the pop-up menu with suggested entries, select testClass - Test class (ABAP Unit) to insert the template.
The static methods of the class CL_ABAP_UNIT_ASSERT check the test assumptions.
Related Information
Test-Driven Development (TDD) is a way to develop software driven by automated tests which are written
earlier than the production code itself. ABAP Unit provides excellent support for TDD in ABAP.
Context
ABAP Unit is integrated into the ABAP language, which has the following benefits:
● ABAP Unit testing is always available. You do not need to switch to a special operation mode or use a
specially prepared server.
● You can run tests quickly and easily right from the development environment.
● You can navigate back and forth between a test class and the production code.
ADT supports you in the following cycle with the ABAP Unit Test Framework together with other tools such as
Coverage Measurements, Quickfixes, Refactoring Tools, Dependency Isolation Frameworks, and Splitscreen
Editing.
Supporting Tools
ABAP Unit Using ABAP Unit and ADT you can easily write [page 565] unit tests, execute [page 610] them
any time you want, and evaluate [page 628] the results with respect to functional correctness
and code coverage.
Quickfixes Just call a production method that does not yet exist and let the quickfix Create Method from Call
[page 478] create the entire method signature together with an implementation stub.
To write a new test, you can copy an existing test, give it a new name, and let the quickfix Create
Method Definition [page 476] create the method definition.
Refactoring Tools Refactoring tools complete the toolset and let you quickly improve the structure of your code.
Dependency Isolation Especially in the context of TDD, unit tests need to be stable and fast. Therefore, it is essential to
Support replace test-unfriendly code with test-friendly code when running tests.
Coverage Measure Making coverage measurements while executing the unit tests helps you to find production code
ment which is not motivated by an existing unit test and helps you to get back on track.
Splitscreen Editing Use Split Screen Editing [page 572] to edit test code and production code side-by-side.
Context
You can switch to test code for ABAP classes by choosing the Test Classes tab at the bottom of ABAP Editor. To
use ABAP Unit in Test-Driven Development, edit the source code and test thecode side-by-side. You can
configure the split screen editor as follows..
Procedure
The ADT opens a second ABAP editor for your class. You can switch to the test class code, while the other
editor displays the source code of the class.
3. Pull the class name tab of one of the editors to the right, so that you get a split screen editor.
4. Select the Test Classes tab of one of the editors.
Leave split-screen mode by pulling one of the split-screen class name tabs back up to the row of class
name tabs at the top of the editor screen. Alternatively, close one of the editors.
Results
You can now write test methods and implement your source code displayed side-by-side, following the Test-
Driven Development programming concept.
ABAP Unit is used to test production code that is called object under test. The object under test may depend
on other production code, known as the depended-on component or DOC. Examples of depended-on
components are classes, function calls, and databases.
A test may interact with the object under test directly using its front door or indirectly using its back door. The
front door can be viewed as the public API of the object under test while the back door contains calls to any
depended-on components.
Interaction of the object under test using front and back doors.
It is relatively simple to control and observe what happens at the front door, but more complicated to do the
same at the back door.
Input Output
Direct Direct calls to the object under test, in Responses received by the test from
cluding the parameters of these calls. the object under test like return values
(front door)
or exceptions.
Indirect Responses from the DOC, like return Calls from the object under test to the
values or exceptions. DOC, including the parameters of these
(back door)
calls.
Test Doubles are the key to get access to the backdoor. They replace the DOCs when tests are executed and
help you to control the indirect input and to observe the indirect output.
As a result, the test double replaces the depended-on component and behaves in such a way that the test can
rely on it.
ABAP provides several frameworks and concepts to get access to the back door. Which approach you choose,
depends on the kind of DOC and what you want to control and observe.
In the table below you can see what you can control and/or observe using the test double approach.
Authority
Purpose of HM TD OO TDF CDS TDF OSQL TDF ATS Check Test
Test Double Helper
Control indirect
input (Stub)
Verify indirect
output (Mock)
Log indirect
output (Spy)
Pretend exis
tence (Dummy) n/a n/a
Well supported
Not possible
Related Information
Whether you prefer handmade or tool-supported object-oriented test doubles, both approaches are based on
the same principle. First, you need an ABAP class that implements the same interface as the DOC (depended-
on component) you want to replace. Second, you need a mechanism to actually make the replacement. Use
object-oriented test doubles if the object under test uses the DOC through an ABAP interface. In this case, the
interface can be implemented by a test double class.
Note
There is no need to implement all methods of the interface in the test double class. Use the keyword
partially implemented and implement only those methods that you call when executing tests.
A slightly different approach is possible if the object under test directly uses the DOC. The DOC has to be a
nonfinal ABAP class. In this case it is possible to implement a test-specific subclass as a test double.
Note
Be aware that you can only overwrite public and protected methods. Private methods cannot be replaced
with this approach.
There are several approaches to replacing the original class with the test double class:
● Public injection: Use the public interface of the object under test to replace the dependency
○ Constructor Injection: Pass the test double as a parameter of the constructor
○ Setter Injection: Pass the test double as a parameter of a setter method
○ Parameter Injection: Pass the test double as a parameter of the method under test
● Private Injection: In the object under test overwrite the dependency
○ Test Class as Friend: Declare the test class as a friend and overwrite the private attribute that refers to
the DOC interface
○ ABAP Test Seams: Exchange the code where the DOC is created and create the test double instead
Related Information
The ABAP Test Double Framework has been designed to simplify and standardize the creation and
configuration of test double behavior.
Test doubles are used in unit test environments to replace depended-on components that are used by the
methods being tested.
The output of a method call can be configured easily using the framework API. The values of returning,
exporting and changing parameters, as well as any exceptions and events can be configured for each method
call.
Additionally, the framework provides functions for verifying any interactions on the double object, such as the
number of times a method was called with specific input parameters.
For creating a test double, use the CL_ABAP_TESTDOUBLE class and call its static methods create,
configure_call, and verify_expectations in the test class.
Restriction
The framework supports the creation of test doubles for global interfaces (since SAP NetWeaver 7.4
SP9) and global classes (since back-end version AS ABAP 7.53).
You can manage database dependencies with ABAP CDS Test Double Framework and ABAP SQL Test Double
Framework.
If you write tests that access a database, you might encounter problems with the consistency of the data. The
data in databases can change, whereas the data for the tests needs to be stable. To take control of the data,
you can manage dependencies between the object under test and the data source. A data source can be a
database table, a database view, a CDS view, a CDS table function, or an external view.
To manage dependencies in CDS views, use ABAP CDS Test Double Framework. For database
dependencies in ABAP programs, use ABAP SQL Test Double Framework. The frameworks support you in
replacing data sources with test doubles, so that the object under test accesses the test double instead of the
real depended-on component.
Related Information
CDS Test Double Framework enables you to test the logic expressed in CDS entities in an automated way.
The logic in a CDS entity is executed in the underlying database, which is independent of the ABAP runtime,
which means it is not possible to use conventional ABAP solutions for inserting dependencies. The depended-
on components (DOC) of the CDS need to be doubled in the database. It needs to be ensured that the
database engine calls or executes these Test Doubles instead of the dependent component when the CDS is
tested.
To test the logic in CDS entity under test (CUT), test data must be inserted in the double. This data is
returned by the Test Doubles when the CUT is executed. CUT must not be modified by the test framework to
enable unit or hierarchical testing.
Use CDS Test Double Framework to address these challenges. It enables unit or hierarchical testing of CDS
views by automatically creating "updatable" Test Doubles for each dependent component in the same
database schema. The framework double that is created is a stub which has the same structure as the original
dependent component.
Note
ABAP CDS Test Double Framework has been available since back-end version SAP NetWeaver
Application Server for ABAP 7.51 innovation package SP00 and higher.
The figure below shows an ABAP Unit test for a CDS view. The dependent CDS Views have been replaced with
test double tables. By imitating the behavior of the original CDS views, test double tables provide a CDS view
under test with the data created with a test class wizard.
The figure below shows the hierarchical testing of two CDS views. To test the views, a dependent CDS View and
two dependent tables are replaced by the appropriate test double tables.
CDS Test Double framework supports creation of test doubles for the following dependent components:
CDS test double framework supports the following entities as code under test:
● CDS views
● CDS views with parameters
● CDS views with DCL
● CDS view entities
● CDS view entities with parameters
● CDS view entities with DCL
● Projection views
Related Information
Context
Create a new test class with boiler plate code to reduce the entry barrier of writing tests for CDS views.
Procedure
1. In the Project Explorer, select the data definition that contains the CDS entity you want to test.
2. Open the context menu and select New Test Class to launch the creation wizard.
○ Unit Test: Use this option to create a new test class by replacing all first level dependencies.
○ Hierarchy Test: Use this option to replace dependencies at a deeper level. For example, you can test all
involved CDS entities by replacing all dependencies on the lowest level. This means you have to select
Note
If you want to test associations that are exposed by the CDS entity but are themselves not used in the
entity, you can do this by adding these associations to the dependency list. Use the icon to do this.
Then you can also select the target data sources of these associations to create doubles and to specify
the test data.
The list of dependencies is displayed on the left pane. By clicking these dependencies, you can view the
corresponding column names on the right pane.
7. Select one of them and enter the test data.
If the dependency contains a parameter, the parameter is visible as a column with the symbol . Enter the
parameters in the respective column.
You can use other options such as Add Row and Delete Row(s) for adding a new row or deleting one or more
rows. Use Select Columns to filter the required columns from the dependency table.
○ (Add Row) to add a new row.
○ (Delete Rows) to delete one or more rows.
○ (Select Columns) to filter the required columns from the dependency table.
○ (Import Test Data) is used to upload the test data from a file that was exported from Data Preview.
You can select the required columns from the uploaded file that need to be imported into the table.
8. Select Next.
9. Assign a transport request and select Finish.
10. Switch to the test class tab of the new class and finalize the test code.
Related Information
Quick Assist View provides you proposals for context specific source code generation.
Prerequisites
● The test class that is created must have Test References to link the test class or test methods with the
repository objects.
Note
Select Table of contents and navigate to the path: ABAP - Keyword Documentation > ABAP - Reference
> ABAP Syntax > Program Directives > Test Reference.
Context
In ABAP Development Tools (ADT), you can open Quick Assist prompt using CTRL + 1 keys. If you want to
dock this view to your ADT workspace perspective, use CTRL+SHIFT+1 keys.
Currently, the following quick assist proposals are offered while writing a test for CDS entity.
Quick Assist proposals when the cursor is inside any test method
Procedure
METHOD class_setup.
"corresponding doubles and clone(s) for the CDS view under test and its
dependencies, are created here
environment = cl_cds_test_environment=>create( 'CDSFRWK_OPEN_SO_ITEMS' ).
ENDMETHOD.
METHOD setup.
"clear_doubles clears the test data for all the doubles used in the test
method before each test method execution.
environment->clear_doubles( ).
ENDMETHOD.
METHOD class_teardown.
"Generated database entities (doubles & clones) should be deleted at the
end of test class execution.
environment->destroy( ).
ENDMETHOD.
METHOD class_setup.
"corresponding doubles and clone(s) for the CDS view under test and its
dependencies, are created here
environment = cl_cds_test_environment=>create( 'CDSFRWK_OPEN_SO_ITEMS' ).
ENDMETHOD.
METHOD setup.
"clear_doubles clears the test data for all the doubles used in the test
method before each test method execution.
environment->clear_doubles( ).
ENDMETHOD.
METHOD class_teardown.
"Generated database entities (doubles & clones) should be deleted at the
end of test class execution.
environment->destroy( ).
ENDMETHOD.
5. (Using wizard) Select Create a new test method and prepare test data proposal.
○ Unit Test checkbox is selected by default to test first level dependencies. Clear the selection to choose
dependencies.
○ Choose Next.
○ Enter Test Method Name.
Related Information
You can write unit tests to test the logic in a CDS entity using the CDS Test Double Framework.
Context
Sample Code
@AbapCatalog.sqlViewName: 'CDS_DEMO_1'
@EndUserText.label: 'Calculations in SELECT list'
@AbapCatalog.compiler.compareFilter: true
define view Cds_Sales_Order_Item
as select from snwd_so_i
association [1] to snwd_pd as _product on snwd_so_i.product_guid =
_product.node_key
{
Sample Code
CLASS ltc_demo_1 DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL
HARMLESS.
PRIVATE SECTION.
CLASS-DATA: environment TYPE REF TO if_cds_test_environment.
...
ENDCLASS.
Sample Code
METHOD class_setup.
environment = cl_cds_test_environment=>create( i_for_entity =
'Cds_Sales_Order_Item' ).
"Test double would be created for the table 'snwd_so_i'. Executes once
per test class.
ENDMETHOD.
METHOD setup.
environment->clear_doubles( ).
"Ensures fresh data for each test method. Executes once before each
test method execution
ENDMETHOD.
METHOD calculate_tax_rate.
...
ENDMETHOD.
METHOD class_teardown.
environment->destroy( ).
"Destroys test environment & test doubles created as part of the test.
Executes once per test class.
ENDMETHOD.
Sample Code
METHOD calculate_tax_rate.
ENDMETHOD.
Note
During the unit testing of a CDS entity using CDS test double framework, test doubles are created for all the
first-level dependencies.
Sample Code
METHOD class_setup.
ENDMETHOD.
You can test modeled associations. Only the first-level associations of the CUT are considered.
METHOD class_setup.
ENDMETHOD.
In hierarchical testing of CDS entity, you must specify the list of dependencies from the hierarchy of the CDS
entity under test for which you want to create the test doubles.
In the CDS hierarchy, ensure that one dependency is selected from each tree path for the selection to be valid.
Once the dependencies are selected, the test doubles for these dependencies are created. All the entities
above the selected dependencies in every tree path can be tested using ABAP SQL statements.
Sample Code
METHOD class_setup.
environment = cl_cds_test_environment=>create( i_for_entity =
'Cds_Open_So_Items_By_TaxR'
i_dependency_list =
VALUE #( ( name =
'Cds_Sales_Order_Item' type = 'CDS_VIEW' )
( name =
'SNWD_SO' type = 'TABLE' )
)
).
"Test doubles would be created for 'Cds_Sales_Order_Item', 'snwd_so'
"and the logic inside the entities
'Cds_Open_So_Items_By_TaxR','Cds_So_Items_By_TaxRate'
"can be tested using ABAP SQL statements in the test methods.
ENDMETHOD.
You can specify dependencies for few tree paths and select the leaf nodes (base dependencies) for others.
METHOD class_setup.
environment = cl_cds_test_environment=>create( i_for_entity =
'Cds_Open_So_Items_By_TaxR'
i_dependency_list =
VALUE #( ( name =
'Cds_Sales_Order_Item' type = 'CDS_VIEW' )
)
i_select_base_dependencies
= abap_true
).
"Test doubles would be created for 'Cds_Sales_Order_Item', 'snwd_so'
"and the logic inside the entities
'Cds_Open_So_Items_By_TaxR','Cds_So_Items_By_TaxRate'
"can be tested using ABAP SQL statements in the test methods.
ENDMETHOD.
You can select the leaf nodes (base dependencies) for all the tree paths.
Sample Code
METHOD class_setup.
environment = cl_cds_test_environment=>create( i_for_entity =
'Cds_Open_So_Items_By_TaxR'
i_select_base_dependencies
= abap_true
).
"Test doubles would be created for 'snwd_so', 'snwd_so_i'
"and the logic inside the entities
'Cds_Open_So_Items_By_TaxR,'Cds_So_Items_By_TaxRate', 'Cds_Sales_Order_Item'
"can be tested using ABAP SQL statements in the test methods.
ENDMETHOD.
You can test modeled associations. Only the first-level associations of the CUT are considered.
Sample Code
METHOD class_setup_4.
environment = cl_cds_test_environment=>create( i_for_entity =
'Cds_Open_So_Items_By_TaxR'
i_select_base_dependencies
= abap_true
test_associations = 'X'
).
"Test doubles would be created for ‘snwd_so’, 'snwd_so_i', 'snwd_pd'
"and the logic inside the entities ‘Cds_Open_So_Items_By_TaxR’,
‘Cds_So_Items_By_TaxRate’,
ENDMETHOD.
For each CDS entity, you can specify the unit test or hierarchy test.
Sample Code
METHOD class_setup.
environment = cl_cds_test_environment=>create_for_multiple_cds(
i_for_entities = VALUE #(
(
i_for_entity = 'Cds_Open_So_Items_By_TaxR'
i_select_base_dependencies = abap_true
i_dependency_list =
VALUE #(
( 'Cds_Sales_Order_Item' )
)
)
(
i_for_entity = 'I_BUSINESSUSER'
)
)
).
"Hierarchy testing is enabled for 'Cds_Open_So_Items_By_TaxR'.
"Test double would be created for 'Cds_Sales_Order_Item' as it is
mentioned in the i_dependency_lists parameter
"and as i_select_base_dependenies is set to true, doubles would be
created for all the remaining base tables which is 'snwd_so'.
"Unit testing is enabled for ‘I_BUSINESSUSER’.
"As the parameters i_dependency_list and i_select_base_dependencies are
not supplied
"Test doubles would be created for all the first level dependencies i.e
‘user_table’.
ENDMETHOD.
This section tells you how to write unit tests for the logic written using ABAP SQL statements.
Note
ABAP CDS Test Double Framework has been available since back-end version SAP NetWeaver AS for
ABAP 7.52.
An ABAP SQL statement depends on one or more data sources. A data source can be a table, a view, a CDS
view, a CDS table function, a CDS view entities, a CDS projection view or an external view.
METHOD get_amount.
ENDMETHOD.
ENDCLASS.
CLASS ltc_item_amount DEFINITION FINAL FOR TESTING DURATION SHORT RISK LEVEL
HARMLESS.
PRIVATE SECTION.
CLASS-DATA: environment TYPE REF TO
if_osql_test_environment.
...
ENDCLASS.
METHOD class_setup.
environment = cl_osql_test_environment=>create(
i_dependency_list = VALUE #( ( 'demo_new_orders_with_items' )
( 'demo_prod_prices' ) ) ).
ENDMETHOD.
"Fixture method setup is executed once before each test method execution to
ensure fresh test data.
METHOD setup.
environment->clear_doubles( ).
ENDMETHOD.
METHOD calculate_amount.
...
ENDMETHOD.
METHOD class_teardown.
environment->destroy( ).
ENDMETHOD.
METHOD calculate_amount.
environment->insert_test_data( orders ).
environment->insert_test_data( prices ).
* 3. Verify result
cl_abap_unit_assert=>assert_equals( act = amount exp = '55.00' ).
ENDMETHOD.
You must provide proper test data for the respective key fields of the entity in which test data is being
inserted. Otherwise an exception can be raised by the framework.
For all the actual database dependencies in the ABAP SQL statement for which test doubles are created, the
ABAP SQL TDF ensures that they are replaced by the respective test doubles at runtime. Now the ABAP SQL
statements fetch the data from the doubles rather than fetching it from the actual database artifacts.
NULL values
If the dependent object is a database table, both read and write accesses are redirected to the test double
table.
Access control logic acting on the dependent CDS is always disabled when tests are running.
Example
Related Information
Challenges
In some situations, you might want to test a component while knowing that it uses a certain database table
multiple times in different parts of your software. This sounds simple because you can just tell the Test Double
Framework (TDF) to replace this table and fill in some data. Here is an example:
Source Code
This should redirect any access to the database table to the new and configured test double table as shown in
the diagram below.
For example, when you use ABAP SQL TDF, select statements of ABAP code are redirected to a test double
table, whereas the CDS view still accesses the real object, as shown in the figure below.
It is recommended that you enable double redirections with CDS TDF as shown below. This redirects any
database accesses to a new test double table.
Source Code
environment = cl_cds_test_environment=>create(
i_for_entity = 'CDS_VIEW'
i_dependency_list = VALUE #( ( type = 'TABLE' name = 'DB_TABLE' ))).
environment->enable_double_redirection( ).
environment->insert_test_data( <your_test_data> ).
Related Information
The ABAP Authority Check Test Helper API is an API-based approach to configure single or multiple users with
authorizations for the test environment.
There was limited support for testing role-based functionality using AUTHORITY-CHECK statement in ABAP.
Writing unit tests by configuring various users with the required roles and authorizations is complex.
Configuring user roles and profiles for different user types requires considerable effort and technical
understanding. Setting up test data for user roles and profiles is difficult in both single and multiuser
environments. During central test runs all tests are executed by a test user, which has SAP_ALL
authorizations. Hence, the functional flow for business users is not evaluated. Running the tests in a separate
session via RFC call for a user with limited rights is complicated to set up and maintain.
The authorizations for the users in the test environment are provided to the test helper APIs through an auth
object. The auth objects (instances containing authorizations) support the test developers in handling test
data.
Code sample
" Define a role with DISPLAY authorizations for authorization object S_DEVELOP.
DATA(role_may_display) = VALUE
cl_aunit_auth_check_types_def=>role_auth_objects(
( object = 'S_DEVELOP'
authorizations =
VALUE #(
( VALUE
#( ( fieldname = 'ACTVT'
fieldvalues =
VALUE #( ( lower_value = '03' ) ) ) ) ) )
) ).
DATA(usrrl_may_display) = VALUE
cl_aunit_auth_check_types_def=>user_role_authorizations( ( role_authorizations =
role_may_display ) ).
Example
There is an authorization object set auth_objset with authorizations that grant permissions for display of
classes and query flight data of LH for user 1 and user 2. User 1 and user 2 must be modeled via the API for the
test session.
" Set up environment - Get an instance of the test controller and set the user
configurations.
" Set up environment - Configure users with the intended authorizations via the
auth_objset for the test session.
auth_controller->restrict_authorizations_to( auth_objset ).
Example
The current user must have only display authorizations during the test session via the controller
auth_controller. Additionally, there are two authorization object sets
auth_objset_with_display_auth which checks for display authorizations for the user in the test session
and the other auth_objset_with_create_auth which checks for create authorizations for the user in the
test session.
Example
The current user is restricted to only have display authorizations during the test session via the controller
auth_controller. Additionally, there are two authorization object sets. The
auth_objset_with_display_auth checks for display authorizations for the user in the test session. The
other auth_objset_with_create_auth checks for create authorizations for the user in the test session,
which was set as positive and negative expectations. The code under test is executed before calling assert/
check APIs.
Example
The current user is restricted to only have display authorizations during the test session via the controller
auth_controller. Additionally, there are two authorization object sets. The
auth_objset_with_display_auth probes for display authorizations for the user in the test session. The
other auth_objset_with_create_auth checks for create authorizations for the user in the test session,
which has set as positive and negative expectations. Also, the code under test is executed before calling
assert/check APIs.
You can implement test seams using special ABAP language elements.
Note
The concept of test seams and test injections has been available since SAP NetWeaver 7.5.
To use test seams, you enclose the test-unfriendly code with TEST-SEAM <seamname> - END-TEST-SEAM.
In your test, you can specify the code that is used instead within TEST-INJECTION – END-TEST-INJECTION.
At runtime, the code is replaced accordingly. The replacement is valid until the end of the test method in which
the injection is defined.
If you need the same injection for all test methods of your test class, you can put the INJECTION statement
into the setup method of your test class.
Scope
Within the INJECTION statement, you have access to all variables that are in the scope of the TEST-SEAM
statement.
If you need access to variables or methods from your test class inside of the injection code, you have to provide
these as static members of your test class.
Test seams are displayed in the Outline view by choosing the icon, followed by the test seam name.
Clicking a test seam name in a test injection and pressing F2 opens a pop-up window with the corresponding
test seam.
Restriction
● Test injections can only refer to test seams located in the same function pool.
● You cannot use test seams in reports.
● Code completion in test injections is available to a limited extent.
Related Information
You can use ABAP Unit to easily write automated tests for your repository objects, particularly if the
production code you want to test is contained in a class pool, function pool or report These object types are
the only ones that can contain test code and therefore we call them test containers.
This works fine, but there is one issue: the test code is not related to the production code. Therefore, it is
difficult to find the relevant tests for a certain object and execute them. To solve this issue, a relation between a
test and a piece of production code has to be modeled. To model a connection, write a specific @testing link as
ABAP doc comment in front of the test method or test class.
Note
The concept of test relations has been available since back-end version AS ABAP 7.53.
Related Information
Context
The maxim in unit testing is 'test early and often'. Here are the many convenient ways to launch your ABAP Unit
tests in the ABAP Development Tools (ADT).
First, define a test suite by selecting one or more tests you want to execute. You can do this directly by
selecting test classes or test methods or indirectly by selecting development objects.
● Direct selection: select one or more test classes or test methods in Project Explorer, in Outline view, or in
ABAP Unit View.
If you want to select a test method in ABAP Editor, make sure you put your cursor on the method name
in the method statement of the implementation part.
● Indirect selection: select one or more development objects in Project Explorer, Outline view, Search view, or
ABAP Unit view.
The table below provides an overview of direct and indirect selection for running ABAP Unit tests.
No matter which way you choose, ABAP unit results are displayed automatically for you in the ABAP Unit view.
Note
ABAP Development Tools (ADT) allows you to execute tests in parallel. This means that you can execute
another test while the first one is still running. The result of the previous test run will be overwritten in ABAP
Unit View view. To see the results of the previous test runs, use ABAP Unit Test History [page 633].
The ADT shows you that the tests are running with the progress indicator , displayed in the bottom right
corner of the workbench window. Double clicking on this progress indicator icon will show you the background
operations in Progress View.
Note
If you cannot execute ABAP unit tests, it can be due to a missing authorization or the system settings do
not allow you to execute the tests.
You can launch ABAP unit tests from the Project Explorer.
Context
Launching tests from the Project Explorer allows you to make a multiple selection of the development objects
you want to run tests for. For example, you can launch tests by selecting one or more classes, programs,
folders, or packages.
Launching ABAP unit tests from the Project Explorer for multiple packages
Context
While writing or changing the source code, you might want to execute all tests.
Procedure
● Wherever you are working on your source code in ABAP Editor, the easiest way to launch all tests is by
pressing a key shortcut Ctrl + Shift + F10 .
● If you want to select a certain test method in ABAP Editor on the Test Classes tab, make sure that you put
your cursor on the method name in the method statement in the definition or implementation part.
● If you want to launch tests for a certain test class, put your cursor on the class name in the definition or
implementation part.
Related Information
Launching ABAP Unit Tests from the Project Explorer [page 612]
Launching ABAP Unit Tests from the Outline View [page 614]
Launching ABAP Unit Tests from the Search View [page 617]
Launching ABAP Unit Tests from the ABAP Unit View [page 615]
Launching a Preview of the ABAP Unit Tests [page 619]
Run Modes of ABAP Unit Tests [page 623]
You can launch ABAP Unit tests from the Outline view.
Context
You can launch all of the ABAP Unit tests by selecting a development object, for example a class, indirectly in
theOutline view. To launch one or more test classes directly, do the following:
1. In the Outline view, select a test class or test method you want to launch.
2. Select Run As ABAP Unit Test from the context menu to run the selected method or class.
Alternatively, use key shortcut Ctrl + Shift + F10 .
Related Information
Launching ABAP Unit Tests from the Project Explorer [page 612]
Launching ABAP Unit Tests from ABAP Editor [page 613]
Launching ABAP Unit Tests from the Search View [page 617]
Launching ABAP Unit Tests from the ABAP Unit View [page 615]
Launching a Preview of the ABAP Unit Tests [page 619]
Run Modes of ABAP Unit Tests [page 623]
If you launch your tests from the context menu, you can make a selection of test methods to run these
methods only (for example, if the tests have been executed with errors). To analyze the errors, you can set a
breakpoint and start debugging.
If you want to rerun all the tests, select in the tool bar of the ABAP Unit view. Alternatively, select Rerun or
Rerun with Coverage in the dropdown menu of the Rerun tool bar button .
If you run a preview for the tests, the results appear in the ABAP Unit view as well. To launch your tests after
running a preview, select the tests that you want to run. Launch the tests from the context menu or with a key
shortcut. Alternatively, you can launch all the tests using tool bar button. If you want to run the tests with
the code coverage, use the dropdown menu of tool bar button. .
Launching ABAP Unit Tests from the Project Explorer [page 612]
Launching ABAP Unit Tests from ABAP Editor [page 613]
Launching ABAP Unit Tests from the Search View [page 617]
Launching ABAP Unit Tests from the Outline View [page 614]
Launching a Preview of the ABAP Unit Tests [page 619]
Run Modes of ABAP Unit Tests [page 623]
You can launch ABAP Unit tests from the Search view.
Context
After applying a Where-Used search function to an object, using the context menu or key shortcut Ctrl +
Shift + G , you get a Where-Used List in the Search view. You can now launch unit tests. Select one or more
development objects, for example classes or packages. Launch the tests from the context menu Run ABAP Unit
Tests or by a key shortcut Ctrl + Shift + F10 .
Additionally, you might want to find the locations in test code where the object is used. You can display a list of
tests that use the object as follows.
Procedure
1. Select the target object and display the Where-Used List, using context menu or key shortcut Ctrl +
Shift + G .
In the Search view, you get a list of occurrences where the target object is used.
2. You can filter the results using filter button from the tool bar of the Search view.
3. In the wizard, select Test Code Only in the dropdown menu of Code Category to set the filter.
The filter is applied now and the results in the Search view are restricted to test code.
Results
You can now launch unit tests for the target object from the Search view.
Related Information
Launching ABAP Unit Tests from the Search View [page 617]
You can launch a preview of the ABAP Unit tests to obtain an overview of the existing tests.
Context
Wherever you can launch ABAP Unit tests, you can launch a preview of the tests as well. Even if you are not
permitted to execute ABAP Unit tests, you can still run a preview.
● While working with a large amount of development objects, you might want to execute all the tests for
example in a package. Running the tests can be time-consuming, depending on the amount of existing
tests. Instead of launching all the tests, you can launch a preview to obtain an overview.
● If your tests are separated from the object being tested you can link them together using test relations. A
preview shows you all related tests, known as foreign tests. You can get an overview of these tests and you
then decide which of them you want to execute. This is especially the case if you are working with objects
without their own tests, for example CDS views or simple transformations.
Procedure
● The easiest way to launch a preview is by a key shortcut Ctrl + Shift + F9 . Alternatively you can
press Ctrl + Shift + F12 . In the wizard you can specify whether you want to run a preview for your
own tests or foreign tests, then select Preview.
● To launch a preview from the context menu, select Run As ABAP Unit Test With . In the wizard you
can specify whether you want to run a preview for your own tests or foreign tests, then select Preview.
Results
The results of preview runs are displayed in the ABAP Unit view.
Launching ABAP Unit Tests from the ABAP Unit View [page 615]
Evaluating Preview Results of ABAP Unit Tests [page 634]
Launching ABAP Unit Tests [page 610]
Run Modes of ABAP Unit Tests [page 623]
Context
To relaunch ABAP Unit tests for a saved list of ABAP programs, do the following:
Procedure
1. Choose Run As Run Configurations from the context menu in ABAP Editor or Project Explorer. You
see lists of previous runs of all types, with a section for ABAP Unit test runs. The name of the ABAP Unit
test run tells you the repository object for which tests were run. A package name shows you that the saved
configuration runs all ABAP unit tests in this package.
2. Double-click an entry in the ABAP unit list to repeat the test run for the saved list of ABAP programs. Or
mark the Run Configuration and select Run.
Results
Note
Delete Run Configurations from the list if you no longer need them. At this time, the ADT does not delete old
Run Configurations automatically.
Related Information
ABAP Unit is a framework for testing ABAP code like classes and function modules.
You can test other development objects, that cannot have own tests, like simple transformations and CDS
views. For example, while working with a CDS view, you might want to test it by launching ABAP unit tests
directly from the CDS view. Since it is not possible to write tests in CDS views, related tests known as foreign
tests, which are stored outside of CDS views, are used. To launch the tests from a CDS view, a relation between
test code and production code has to be modeled.
To model a connection, write a specific @testing link as ABAP doc comment in front of the test method or test
class.
● To test objects like classes and function modules, which can have both their own tests and foreign tests,
use a key shortcut Ctrl + Shift + F12 . In the launch dialog, go to the Scope section and you can
select own tests and/or foreign tests to be executed. Then select Execute.
You can select Preview in the wizard to get an overview of the tests.
● To test objects like CDS views or simple transformations, which can have only foreign tests, use a shortcut
Ctrl + Shift + F10 to launch the tests directly from the object. You can press Ctrl + Shift + F9
to get an overview of the tests.
When tests are selected indirectly by choosing a set of repository objects (object selection) it is possible not
only to execute the objects' own tests, but also any foreign tests that are not contained in the selection but
have a test relation pointing to an object inside the selection.
Foreign tests
Foreign tests can be executed in different ways, depending on the type of selected object.
Example
No object selected
In the figure below you see some repository objects (Oi) containing test code (Ti) and production code (Pi) with
some test relations (<@testing>) defined. But you cannot decide whether one of the tests is an object's own
test or a foreign test, because there is no current object selection.
In the following figure there is a current selection {O2}. Test T2 is contained in the selection (object's own test)
while T1 and T4 are not but do have test relations pointing to P2, which is inside the selection.
Finally, you can widen the selection to {O1, O2} and get a smaller set of foreign tests.
Related Information
There are several modes available for running ABAP Unit tests.
A mode of execution is chosen depending on how informative you want the results of the tests to be.
You can see the different modes of ABAP Unit tests with their possible execution variants in the following table.
Executed From
Modes of ABAP Unit
Test Key Shortcut Context Menu Tool Bar Menu Bar
Related Information
To configure your test execution, start a launch dialog with the key shortcut Ctrl + Shift + F12 .
Finally, you can choose to execute the tests or just get a preview [page 634] of the tests.
Related Information
A local test class can contain the private instance methods setup and teardown, which are executed before
and after each test method. Besides this, it can also contain the private static methods class_setup and
When ABAP Unit executes a test class, methods from its superclass are executed as well. The figure below
shows which methods of subclasses and superclasses are executed and in which order.
First, the class_setup method of the superclass is called, followed by the class_setup method of the
subclass. Then the setup method of the subclass is called for each test method. After the execution of the test
If you want to execute the same test with different configurations, you can use the following pattern:
Inheritance Pattern
Related Information
You evaluate the results of ABAP Unit tests to find out whether your objects under tests behave as expected.
Context
When you execute ABAP unit tests, ABAP Development Tools (ADT) automatically opens the ABAP Unit view.
The ABAP Unit view provides various information at the level of program, test class, test method, and total
information. Total information is displayed at the top of the ABAP Unit view. The program, test class, and test
method levels are displayed in the result tree. The table below shows what information you can see at these
levels.
Program
Test class
Test method
Total informa
tion
* The detailed duration of a test run is only displayed if it is longer than 0.01 seconds. Otherwise, ADT
displays generic information, such as "< 0.01s".
The status of the test method execution in the result tree is projected onto the status of the test class and
program. For example, if at least one test method produces an error, the corresponding test class is displayed
as failed.
By clicking the drop-down menu in the upper right corner of the ABAP Unit view you can show classes without
test methods, hide the risk level and duration of the tests, hide foreign tests, group tests by the test scope, and
decorate test containers with object type.
Filtering checkboxes: Restrict the number of displayed unit tests, for example display only those that have an
error. To do this, select one or more of the following checkboxes from the bar above the result tree.
Tip
If you right-click one of the selected checkboxes, the other checkboxes are deselected. If you right-click
again, all checkboxes are selected. This enables you to deselect the other checkboxes or select all
checkboxes in one step.
Note
If you execute tests for objects like classes, function groups, or reports that have both own tests and foreign
tests assigned to the objects using test relations [page 621], the results of the foreign test run are displayed
as a preview in the ABAP Unit view besides the results of the own test run.
Detailed error analysis: The information about errors, warnings, terminations, or failures are shown in the
Failure Trace. Here you can see the following information:
● Failure description
Related Information
Context
To run ABAP Unit tests with code coverage measurement, do the following:
Procedure
1. Start a code coverage measurement. Choose Coverage As ABAP Unit Test from the context menu of
ABAP Editor or Project Explorer.
The coverage display appears separately from the ABAP Unit results display, in the ABAP Coverage view.
The view shows you the code coverage that was achieved by running the ABAP Unit tests.
2. Use the View Menu of the ABAP Coverage view to switch to branch coverage or procedure (processing
block) coverage.
Here you can see the coverage at the source-code level. The source code display is related to the type of
coverage you are displaying in the ABAP Coverage view. You can easily detect any gaps in your testing:
Statement coverage The statement has been not applicable The statement has not been
executed executed
Branch coverage All branches have been exe At least one branch has not No branch has been exe
cuted been executed cuted
Procedure coverage The procedure has been not applicable The procedure has not been
called called
4. Move the cursor over a line of code to see how many times the line was executed during the coverage
measurement. In branch coverage, you see how often the branch resolved to 'true' and 'false'.
Tip
You can hide the shading by editing your source code or clicking the Hide Highlighting icon in the tool
bar of the ABAP Coverage view.
Results
Note
● If there is an ABAP Unit assertion, ADT shows you the ABAP Unit view first, instead of the ABAP
Coverage view. Click the ABAP Coverage icon to open the coverage view, if it is not open. In this case,
the coverage measurement is incomplete.
● By default, code coverage is shown to you as statement coverage by program and by processing block
(method, function module, or subroutine).
● In the processing block view, coverage is shown for all processing blocks of the tested ABAP programs,
regardless of whether code in a processing block was actually executed by a test. You can therefore see
where you still need test.
Related Information
You can use ABAP Unit with a trace for runtime analysis.
If you execute ABAP Unit tests with a trace, the results are displayed automatically in the ABAP Traces view. A
trace file for each test class is generated.
You can display previous test runs in the ABAP Unit Test History.
Context
The ABAP Unit test history enables you to switch between the results of different test runs without performing
them again.
This saves you time and gives you immediate access to test runs that have already been evaluated.
Note
When you perform a test run, the previous result is overwritten but not deleted. The history is only deleted
when you close or restart the IDE.
Procedure
1. Choose the arrow in the History... icon displayed in the toolbar in the ABAP Unit view.
2. Choose History... from the menu.
You can preconfigure the history to display up to the last 99 test runs. To do this, enter the required
number in the Maximum number of remembered test runs input field.
The result of the selected test run is displayed in the ABAP Unit view.
4. To remove a specific test run from the history, select it and choose Remove. To remove all results from the
history, choose Remove all.
After a preview of the tests is run, the results are displayed automatically in the ABAP Unit view, just like the
results of any executed ABAP Unit tests. This means that you can see all test methods grouped by test classes
and programs. As a next step, you can choose any subset or even all of the tests to execute them.
The preview results differ from execution results in the following aspects:
You can now get an overview of the total number of tests under the object, as well as of the number of test
classes. If you expand the classes you can navigate to local test classes and see the number, the risk level, and
the duration of the tests.
Related Information
depended-on component
Component on which the objects under test depend. Examples of depended-on components are classes,
function calls, and database tables. For more information, see Depended-on components [page 573].
foreign test
Related tests, located outside of the objects under test, contrary to own tests. For more information, see
Foreign tests [page 621].
Tested development objects such as ABAP programs, classes, or CDS objects. For more information, see
Object under test [page 573].
own test
Tests located in the same repository object as the object under test. For more information, see Own tests [page
621]
production code
We use the term production code for any code that is not test code.
repository object
test
test class
Local class that contains test methods for testing production code. For more information, see Where to Write
ABAP Unit Test Classes [page 566].
test code
Code written to test an object under test. For more information, see Writing ABAP Unit Tests [page 565].
Generic term for repository objects that can contain tests. For more information, see Writing ABAP Unit with
Test Relations [page 609]
test double
Object created to replace a depended-on component. It provides the same API as the real object so that the
object under test can use it. For more information, see Test Double with ABAP Unit [page 574].
test method
test relation
A link between a foreign test and an object under test. It is especially important for objects that cannot have
own tests, such as CDS views. For more information, see Test relations [page 621].
test run
A test or test suite can be executed many times, each time potentially yielding a different test result. We use the
term test run for any execution of tests, whether they are still running or already finished.
test suite
A collection of tests that are executed together. For more information, see Launching ABAP Unit Tests [page
610].
The ABAP Test Cockpit (ATC) is the standard tool for checking the quality of ABAP development objects using
static checks.
As an ABAP developer, you can use ATC tools in the Eclipse-based ABAP Development Tools (ADT) to find
potential bugs already during the development phase.
In particular, you can check the ABAP development objects for many types of problems, including syntax
errors, potential problems in performance, suboptimal or potentially faulty programming, adherence to
standards, errors in ABAP Unit testing, among others.
Related Information
4.2.2.1 Introduction
Prerequisites
● Using ATC tools in your development landscape requires that the setup for ATC is completed.
● To run the ATC check, you need the respective authorizations for the ABAP Test Cockpit.
● You need at least ABAP Development Tools client version 2.31.
ATC quality check as an integral part of the development and delivery process
ABAP developers have various options for using ATC tools. In the current shipment, they can use ATC in the
following use cases:
Use Case
(1) The developer runs ATC checks frequently during development to find and immediately clean up defects in
smaller development object units, like in a single ABAP class for example.
(2) The developer runs ATC checks up until the implementation of a certain functionality is complete and the
ATC result is then used to clean up the code in bigger development object units, like a package or transport
request.
● Launching ATC Check Run from the Project Explorer [page 640]
● Launching ATC Check Run from the ABAP Editor [page 642]
● Working with the ATC Problems View [page 643]
● [Optional] Selecting Check Variant [page 657]
● [Optional] Requesting Exemptions for ATC Findings [page 668]
Related Information
Each ATC check run uses a global check variant that contains a set of relevant checks. For each system, a
system default check variant is already predefined.
Remember
The standard check variant in your development system may have been set by the central ATC
administrator. If no such setting has been made, then it is the DEFAULT check variant of the Code Inspector
(transaction SCI).
In addition, you can start an ATC check run with the Run As > ABAP Test Cockpit With… to specify an arbitrary
global check variant. You can use this option to override the predefined ATC check variant for that specific
check run. That way, you can run your own set of checks, perhaps a more stringent set as defined in the
corporate standard.
Procedure
Tip
When editing the name of the check variant, you can avail of the content assistant functionality by
pressing Ctrl + Space in the corresponding field.
Remember
The check variant that you have chosen is used only for this ATC check run. Other runs revert to the
predefined check variant - unless you once again choose a different check variant.
The ATC checks all of the repository objects contained in the elements you selected in the Project Explorer tree.
Doing this for a package runs all ATC checks for all of the objects in the package.
The ADT shows you that the checks are running with Running ATC checks progress indicator. After completion
of the ATC check run, the new ATC check result (set of all findings) is displayed in the ATC Problems view and
added to the developer's Worklist.
Remember
You can think of a Worklist as a set of all findings for all ATC check runs that have been executed by the
developer in the local system.
Related Information
Launching ATC Check Run from the ABAP Editor [page 642]
Context
You can run ATC quality checks on the class or other development object that you are editing in the ABAP
editor. No matter how you start ATC checks, the ADT automatically displays the findings in the ATC Problems
view.
3. Choose the menu item Run As ABAP Test Cockpit from the context menu in the ABAP editor or
alternatively use the key shortcut Ctrl + Shift + F2 .
Note
Alternatively, you can start an ATC check run with the Run As ABAP Test Cockpit With... to
specify an arbitrary global check variant. You can use this option to override the predefined ATC check
variant for that specific check run. See also: Launching ATC Check Run from the Project Explorer [page
640]
Results
If your object has passed all of the checks included in one ATC check run, you will see an information message
in the status message area of the ADT. After completion of the ATC check run, the new ATC check result is
displayed as a Worklist in the ATC Problems view.
Related Information
Each ATC check run creates new ATC check results, which include a list of ATC findings. If a local ATC check run
finds errors or warnings, the ABAP Development Tools (ADT) automatically shows these to you in the Worklist
of the ATC Problems view.
The main purpose of the Worklist is to collect the results of all local ATC check runs that have been triggered in
your IDE (during one and the same logon session) and keep the status of ATC findings up-to-date. This allows
you, as a developer, to solve the ATC errors (or warnings) and immediately update the ATC status of the
checked development objects – until the worklist is empty when all findings are fixed.
Here is how to work in this view and with ATC findings displayed:
Related Information
The ATC Problems view provides you with a filter to quickly switch between various views. In particular, you can
switch...
● Between multiple ABAP projects from your workspace where local ATC check runs already have been
performed during the IDE session
● For each project, between various check variants used for the ATC check run
● For each project and each check variant, between various object sets.
Related Information
In the ATC Problems view, you can configure the columns of the view and group the ATC findings of an ATC
result.
Note
Columns that are marked with an asterisk (*) will not be displayed in the worklist, since they're empty
for the current ATC check result.
Choose Group By in the toolbar of the ATC Problems view and select the option for which you want to group the
ATC findings.
By default, the ATC Problems view groups your ATC findings by check.
Note
For some check variants (for example the check variant S4HANA_READINESS), the ATC Problems view
displays more columns and grouping options to give more detailed information about the individual ATC
findings.
Related Information
If you want to assign ATC findings of an ATC run result to a certain developer, you can do that by changing the
contact person of the ATC findings.
Prerequisites
This feature is provided in Application Server ABAP 7.54 SP00 and higher.
You need the authorization object S_Q_GOVERN (ACTVT = 03 and ATC_OTYPGO = 02) to change the contact
person.
Note
You can change the contact person only for local check runs.
1. In the ATC Problems view, select the ATC findings in question and choose Change Contact Person... in the
context menu.
Results
You have changed the contact person and the ATC findings are now assigned to the determined developer.
The short description of the ATC findings might not provide you with sufficient details about the problem. In the
ATC Problems view, you can directly display the details of an ATC finding by selecting the ATC finding.
The Details are especially important for understanding ATC findings and fixing problems quickly. For example,
you might see these details for an instance of the ATC finding 'Parameter is a nested internal table and passed
by VALUE'.
Note
The Details content automatically refreshes when you select a new finding in the ATC Problems view.
Related Information
If you are going to directly fix the ATC findings listed in the Worklist in the ATC Problems view, double-click an
ATC finding to jump to your source code at the position where the ATC found a statement with a problem and
adapt your source code.
If you want to locate the development object or object component that is responsible for an ATC finding, then:
● Open the Outline view to jump to the Outline at the development object or component in which the error
was found.
● Choose the menu path Show In Project Explorer in the editor to display in the Project Explorer view,
the development object or object component in which the error was found.
Note
You can also fix certain ATC findings with Quick Fixes. For more information, see Applying Quick Fixes for
ATC Findings [page 649].
Related Information
You can fix certain ATC findings with Quick Fixes. These Quick Fixes provide functions that enable you to
resolve errors and warnings without adapting your source code manually.
Note
Quick Fixes for ATC findings are only displayed, when the calculation of Quick Fix proposals is enabled.
You can enable the calculation of Quick Fix proposals while configuring a run series in transaction ATC in
SAP GUI as of Application Server ABAP 7.53 SP01.
ATC findings that can be fixed with a Quick Fix are displayed with a lightbulb icon .
● Applying Quick Fixes for ATC Findings in the ATC Problems View [page 650]
● Applying Quick Fixes for ATC Findings in the Source Code [page 651]
You can also fix several ATC findings at once with the Recommended Quick Fixes wizard. For more information,
see Applying Recommended Quick Fixes for Multiple ATC Findings [page 652]
Related Information
Quick Fixes for ATC findings can be applied in the ATC Problems view.
Procedure
1. Select an ATC finding with a lightbulb icon in the ATC Problems view.
2. Right-click the ATC finding and choose Quick Fix.
ATC Quick Fix in the context menu of an ATC finding in the ATC Problems view
Recommendation
If there is more than one Quick Fix available for an ATC finding, we recommend that you select the first
Quick Fix displayed.
Related Information
Quick Fixes for ATC findings can be applied in the source code.
Procedure
Note
ATC findings that can be fixed with a Quick Fix are displayed with a lightbulb icon .
Recommendation
If there is more than one Quick Fix available for an ATC finding, we recommend that you select the first
Quick Fix displayed.
Related Information
You can fix multiple ATC findings at once with the Recommended Quick Fixes wizard.
Prerequisites
This feature is supported as of Application Server ABAP 7.53 SP01 and higher.
Procedure
Tip
If you want to display all affected objects and their respective ATC findings, choose Group by Object.
4. In the Quick Fix column in the Quick Fix Selection frame, the recommended Quick Fixes for the ATC findings
are displayed by default. Select a Quick Fix to open a dropdown list with alternative Quick Fixes.
Recommendation
5. In the Post Processing frame, you can specify that the changed objects are activated after you apply the
Quick Fixes. If this option is selected, you can specify that the selected ATC findings are rechecked after
you finish the wizard.
Note
If you do not select any post processing options, the initial ATC result is displayed after you finish the
wizard. In this case, you have to activate and recheck the ATC findings manually.
6. Choose Next.
7. Select a transport request if required.
8. Choose Next.
Review changes with the compare editor in the Recommended Quick Fixes wizard
In this example, an order by primary key statement was added to the source code to fix the ATC
finding.
10. Choose Finish.
Results
Note
Sometimes it can happen, that some ATC findings could not be fixed with recommended Quick Fixes after
finishing the wizard. Open the ABAP Log view to see detailed information on these ATC findings.
How to generate automated code comments for ATC Quick Fixes in ABAP Development Tools (ADT).
Prerequisites
Note
For Application Server ABAP 7.54 SP00-SP02, you have to install SAP Note 2902053 .
Context
When using ATC quick fixes in ADT, in some cases you might want to leave details about the changes in the
refactored code.
This feature enables you to add automatically generated comments to your refactored code.
Note
● In order to keep your code readable and clean, SAP recommends to leave this function deactivated.
● Quick fix comments are currently available only for transportable objects. It is not possible to apply
them for local objects.
Procedure
1. To enable quick fix comments in your system, start the report SATC_AC_QFIX_COMMENTS_ENABLED and
mark the checkbox.
The source code comment in the refactored code contains the following information:
Sample Code
This is an example of a quick fix comment that has been automatically generated and added to the refactored
code. It contains the following information:
After fixing the ATC finding in your source code, the currently displayed ATC result is no longer valid. You can
then run a recheck for the corrected ATC findings in order to check if they have disappeared from the worklist.
Context
To run a recheck for one or multiple findings (within the entire worklist), proceed as follows:
Procedure
Related Information
Context
Each ATC check run uses a global Code Inspector variant that contains a set of relevant checks. For each
system, a default check variant is already predefined. In some cases, you may want to change the global Code
Inspector variant that is used for ATC check runs in your development system.
Procedure
1. In the Project Explorer, select the relevant ABAP project (that represents your ABAP development system).
2. Open the context menu and choose Properties.
3. In the Properties dialog, select the entry ABAP Test Cockpit.
4. Now you can enter the new Global Code Inspector check variant.
Tip
When editing the name of the check variant, you can avail of the content assistant functionality by
pressing Ctrl + Space in the corresponding field.
Use Case
(1) The developer runs the ATC check explicitly in the Transport Organizer tool before releasing a transport
request or task. - Recommended Step!
(2) The developer releases a transport request or task and the ATC check is launched automatically. The
automatic transport check provides a first Q Gate when the code leaves the development system at the time of
transport release. ATC findings may stop the transport release.
Related Information
Context
A transport request (or transport task) that contains changes for several development objects is about to be
released. However, before releasing the transport, you want to check if the transport still has errors or
warnings.
Procedure
1. If you have not yet already done so, open the Transport Organizer view using the tool bar menu Window
Show View Other...
2. In the Transport Organizer view, expand the Workbench folder.
3. Expand the Modifiable folder until you have found the requested transport request or task.
4. Choose Run As ABAP Test Cockpit from the context menu of the request or task or alternatively use
the key shortcut Ctrl + Shift + F2 .
Note
Alternatively, you can start an ATC check run with the Run As ABAP Test Cockpit With... to
specify an arbitrary global check variant. You can use this option to override the predefined ATC check
variant for that specific check run. See also: Launching ATC Check Run from the Project Explorer [page
640]
Results
The ATC checks all of the repository objects contained in the selected transport request or task. After
completion of the ATC check run, the new ATC check result is displayed as a Worklist in the ATC Problems view.
Context
You, as an ABAP developer, are going to release a transport request that contains changes for several
development objects. When you release a transport, the ABAP backend system automatically launches the
ATC check run in the background to check all development objects in the transport request.
Recommendation
We recommend running an ATC check explicitly before releasing a transport request. For more information,
see Launching ATC Check Run Explicitly [page 659].
Procedure
1. If you have not yet already done so, open the Transport Organizer view using the tool bar menu Window
Show View Other...
2. In the Transport Organizer view, expand the Workbench folder.
3. Expand the Modifiable folder until you have found the requested transport request or task.
4. Choose Release from the context menu of the request.
Note
If ATC findings are still reported in the transport request, a popup dialog is displayed. Choose Display
ATC Findings to display the ATC findings in the ATC Problems view.
Related Information
Use Case
The transports with code changes from the development systems reach the quality system during the
consolidation phase. The quality manager runs mass regression checks with ATC in the quality system and
then distributes the ATC results to the corresponding development systems as active results. This ensures that
code changes do not leave a consolidation or quality system until all critical findings have been cleaned up
(second Q Gate).
In ABAP Development Tools, the developers typically get a feed notification informing them about new central
ATC results. Developers can analyze these central ATC results in the ATC Result Browser and immediately clean
up the code in the development system.
Related Information
Prerequisites
● To get notice of your own active ATC findings, you must first subscribe to feeds from the ABAP Repository.
In particular, when adding a new query, you must select ATC Finding as a feed query.
See also: Subscribing to Feeds from ABAP Repository [page 558]
Tip
You can configure the findings displayed in the active ATC result according to various filter criteria such as,
for example, refresh interval, priority, or contact person.
Context
If your organization is using the ATC to run central quality checks, then you can receive notification of your own
priority 1 and 2 ATC findings in the active ATC central resul (entitled "ATC Messages --Prio 1 + 2 -- of Logon User
in your ABAP Projects"). For this purpose, ADT offers an ATC feed that provides you with access to findings in
the active ATC result.
Once you have the ATC feed, you can perform the following with the messages in the feed:
Procedure
Related Information
Context
In ABAP Development Tools (ADT), the developer receives a notification with new incoming results from ATC
quality checks originating from a central quality system. More on this:Getting Feeds with Active Results [page
661] You, as a developer, can use the ATC Result Browser to look at the current active results and also to get an
overview of your local ATC check runs.
Note
By default, the ATC Result Browser is not included in the ABAP perspective.
Procedure
Results
ADT opens the ATC Result Browser that displays, for each ABAP project (development system), the active
result replicated from the central quality system and also provides an overview about local ATC check runs.
Related Information
Here is how to work with ATC Results and ATC Findings in the ATC Result Browser view:
The ATC Result Browser lets you browse through ATC results for each ABAP Project (representing a connection
to an ABAP system) created in your ADT workspace.
Context
On the top level, the view displays the Active Result. In addition, the view displays Results of Central Check Runs
and Results of Local Check Runs. You can also display ATC check results from other users.
Remember
The ATC findings in the active result may be outdated when the code in the development system has been
corrected in the meantime.
The ATC Result Browser displays the Active Result, results of central check runs, and results of local check runs
Procedure
1. Select the ABAP Project in the ATC Result Browser and choose Configure Tree... in the context menu.
2. In the ATC Result Browser Tree view, you can configure the display of the Active Result, of Central Results,
and of Local Results. You can also enter the user name of whom you want to display the ATC results.
In the ATC Result Browser view, you can also navigate from an ATC result to its ATC findings, display the details
of an ATC finding, and jump from ATC findings to the effected source code.
Select an ATC result in the ATC Result Browser view to display the list of ATC findings that belong to the
corresponding ATC result.
Double-click an ATC finding to jump to the effected source code at the position where the ATC found a problem.
Select an ATC finding and choose Go to Details in the context menu or choose the corresponding icon in the
toolbar.
Select an ATC finding and choose Back to Results Overview in the context menu or click the corresponding icon
in the toolbar.
If you, as a developer, want to know if the ATC findings from the replicated active result or the central or local
ATC check runs are available in the relevant development system, you can recheck the ATC result in the ATC
Result Browser view.
Context
Procedure
Select an ATC result and choose Recheck from the context menu.
Remember
When running a recheck, ATC uses a Code Inspector variant that is predefined in your local system.
Sometimes ATC findings cannot be corrected. It is possible that such a problem is planned for correction in an
upcoming development cycle. Or perhaps only a test program is affected.
Context
If you can't clear an ATC finding by correcting the underlying problem, you can still clear it by requesting an
exemption. Once approved by a quality manager, an exemption masks an ATC error or warning message. The
finding then does not appear as an open issue in the new ATC results anymore.
To request exemptions for ATC findings from within ABAP Development Tools (ADT), proceed as follows:
Procedure
1. In the ATC Result Browser view, select the relevant ATC finding.
Note
Be sure to request exemptions only for ATC findings from the Active Result - marked with icon - in
the ATC Result Browser. Only exemptions that you request against the active result are considered in
future central ATC runs. It is not sensible to request exemptions for a local result that you generated
yourself in your development environment.
The minimum granularity and scope of an exemption restricts the ATC check to all instances of a
particular check message in a single subobject, such as an ABAP include or a method (in a class).
4. Choose Next.
5. In the second wizard page, enter at least an approver, and specify the reason for the exemption.
6. Choose Finish.
Results
The approver receives an e-mail notification with the exemption request. If the exemption is approved by the
quality manager, the ATC finding is marked as inactive, and the ATC generates no new findings for the
underlying ATC problem.
Related Information
You can now see results of central check runs directly in the development systems.
If you get email notifications with the results of runs in the central check system, you might want to see these
results in the system. You can see central check run results along with local check runs in the ATC Result
Browser in the development system without logging on to the central check system.
Besides you need authorizations for your user. These are defined with the authorization object S_Q_GOVERN.
Context
The ABAP Debugger lets you stop a program during runtime and examine the flow and results of each
statement during execution. Stepping through a program with the debugger helps you to detect and correct
errors in ABAP source code.
The ABAP Profiler tools show you where runtime is being consumed, and where effort for refactoring and
optimization can best be applied. They also let you analyze and understand program flow, which is useful when
you are trying to understand a problem or learn about code you need to analyze or maintain.
If an ABAP program encounters a runtime error, the program writes an ABAP short dump to document the
error and help in its analysis. An ABAP short dump provides a great deal of well-structured information for
localizing and understanding a runtime error, including a textual description of the error and its likely cause, an
excerpt showing the location of the error in the source code, tables of variables and their values, and more.
Dynamic logpoints have been introduced in order to support logging in quality or productive systems where the
source code cannot be changed. For example, you have found a location in the source code for which you need
additional monitoring details, or you may be facing a poorly localizable error situation that happens from time
to time in a batch job and cannot be debugged.
The AMDP Debugger allows you to debug the embedded AMDP code within ABAP Development Tools (ADT).
Related Information
Prerequisites
Context
The ABAP Debugger can satisfy most of your debugging requirements. Start the debugger by setting a
breakpoint in your ABAP source code and then running the ABAP program.
It's an ABAP debugger, but the look, feel, and functionality are all Eclipse, with all of the comfort and feature-
richness that one associates with Eclipse. For a quick orientation to the Debug perspective, follow this ABAP
Debugger [page 69].
Note
For special purposes you may still want to use the ABAP Debugger in the SAP GUI. For more information
see: Comparing ABAP Debugging in SAP GUI and ABAP Development Tools [page 74].
Related Information
Context
Related Information
Procedure
Setting Breakpoint from the Ruler in the Editor Using the Context Menu
1. Position the cursor within the ruler (left bar) of the source editor at the line that contains the executable
ABAP statement of your interest.
2. Choose Toggle Breakpoint from the context menu.
1. Double-click within the ruler of the source editor at the line that contains the executable ABAP statement
of your interest.
1. Position the cursor on the ABAP statement at which you want to stop.
2. Then choose the menu option Run ABAP Breakpoints Toggle Breakpoint .
Results
A breakpoint stays with the line of code at which you set it. If you change the code above the breakpoint, it
slides along with the relocated code.
Further Activities
Toggle a breakpoint again to delete it. You can also deactivate breakpoints, without deleting them.
You can display and manage breakpoints in the Breakpoints view in the Debug perspective.
Context
You can set dynamic breakpoints. These stop execution whenever a specified token – an ABAP statement or an
exception class – is reached.
Procedure
1. From the menu, choose Run ABAP Breakpoints Add Statement Breakpoint or Add Exception
Breakpoint .
2. If the ABAP project that you are working in is not selected, then choose the project from the dialog that
appears.
3. Choose from the list of ABAP statements. Or enter an ABAP exception class. The function searches
incrementally for exception classes as you type.
Note
○ Alternative way to set a dynamic breakpoint: Open the Debug perspective. From the tool bar of
the Breakpoints view, choose Add ABAP Breakpoint.
Dynamic Breakpoints
○ Breakpoint scope: For dynamic breakpoints we recommended keeping the default property Soft
breakpoints. Thus only running debug sessions if they have been started for example, using a
standard line-breakpoint, will consider this dynamic breakpoints. This allows you to focus on the
relevant code area and avoids unwanted debug sessions.
Results
You have set a dynamic breakpoint that is active for any program that you run from within the current ABAP
project.
You can display and manage dynamic breakpoints from the Breakpoint view in the Debug perspective. In
particular, you can change the token that triggers the breakpoint.
Related Information
Context
You have the option to specify a condition for an ABAP breakpoint. The condition is evaluated at runtime
whenever the source code position of the related breakpoint is reached. If the condition is fulfilled (evaluates to
true), the debugger will stop execution at the breakpoint. Otherwise, if the condition is not fulfilled, the
debugger will not stop at the breakpoint.
Note
Tip
Alternatively, you can specify a breakpoint condition in the Breakpoints view of the Debug perspective.
3. In the screen that appears, edit a condition in the corresponding entry field:
Note
Note
The validation of the condition syntax takes place at design time. The actual existence and validity of
the operands (for example, variable symbols) however is checked at runtime as they cannot be
checked properly at the time when they are created. If an operand is not valid, the program stops when
it reaches the breakpoint and a corresponding error message occurs.
You have added a condition that is now active for the specified breakpoint. This is indicated by the new
breakpoint decorator that is visible in the ruler of the source editor.
Related Topics
● Syntax for Breakpoint Conditions [page 868]
● Variables in Breakpoint Conditions [page 870]
● Literals in Breakpoint Conditions [page 870]
● Built-in Functions in Breakpoint Conditions [page 871]
● Operators in Breakpoint Conditions [page 873]
Prerequisites
You can use watchpoints for variables only during a running ABAP debug session.
Context
When debugging ABAP code, you can use watchpoints to track the value of individual ABAP variables. The
ABAP Debugger stops as soon as the value of a watched variable has changed. Furthermore, you can specify
conditions for watchpoints. The debugger then additionally checks whether this condition is fulfilled. More on
this: Watchpoints [page 71]
Procedure
1. Setting Watchpoints for Currently Selected Field in the ABAP source code editor:
a. In the ABAP source code editor of the Debug perspective, position the cursor on the field in question.
b. Open the context menu and select the option Set Watchpoint.
2. Setting Watchpoints in the Variables view:
a. In the Variables view of the Debug perspective, select the node for the variable in question.
Results
Once the watchpoint has been created for the debug session, the value of the specified variable will be
monitored. The ABAP Debugger stops as soon as the value of the variable is changed after a debug step and
the specified condition for the watchpoint is fulfilled.
Once the watchpoint is reached, the editor range indicator displays a small watchpoint decorator.
Tip
You can use the context menu of the watchpoint to access the watchpoint-related actions.
Watchpoint-related actions
Note
ABAP watchpoints are always short-living, both in the GUI Debugger as well as in the Debug perspective
of ABAP Development Tools.
They can only be active within a suspended debug session and are removed automatically when that debug
session is terminated.
Related Information
Context
You can specify additional conditions for watchpoints. The Debugger will then only stop if the value of the
watchpoint variable changes AND the condition is fulfilled.
Syntax
For strings:
● INEXACT_DF( ) - Operation in which a rounding error occurred The function INEXACT_DF( ) returns the
value 'X' or ' ', depending on whether the final result of an operation (for example, COMPUTE or MOVE) is
inexact (has been rounded) or not.
● sy-index > 5
● sy-index = sy-tabix
● lines( itab ) > 0
● lines( itab ) <> sy-tabix
● lines( itab ) < lines( itab2 )
● strlen( s ) >= sy-index
● KEY_STATUS( <itab> <key_name> ) = 1
● INEXACT_DF = 'X'
The functions KEY_STATUS( <itab> <key_name> ) as well as LINES( <itab> ) are valid Debugger
symbols. They can therefore also be used as watchpoint variables. So the Debugger would only stop for a
watchpoint at LINES( <itab> ) if the number of rows had not changed but the content of the table <itab> had.
Using KEY_STATUS( <itab> <key_name> ), you can monitor and query the secondary key of an internal
table. The return values of this function are 1 (secondary key is out-of-date) or 0 (secondary key is up-to-date).
The (secondary) key (or index) of a table is not necessarily updated immediately for performance reasons; it is
updated at the next read or write access to the table. This makes it difficult to determine which operations on
the table lead to a given index needing to be refreshed. This is the situation where "KEY_STATUS( <itab>
<key_name> )" can be used.
Related Information
Context
Double-click on any variable in the editor to open it for display in the Variables view. Internal tables are
automatically also opened in the ABAP Internal Table view.
Tip
An another way to inspect the variable values is to hover with the mouse cursor over the variable name in
the source editor in the Debug perspective.
Alternatively, write the name of a variable in the Variables view or the name of an internal table in the ABAP
Internal Table view to open the variable for display.
Context
You can automatically display the content of internal tables in the ABAP Internal Table (Debugger) view. This
view lets you work comfortably with the rows in an internal table.
You can quickly scroll through long tables and rearrange table columns for better display with drag-and-drop.
Are you confronted with unreadable hexadecimal data, or a string that contains HTML or XML tags?
Then choose Show Details As HTML Viewer XML Viewer to translate the data to text and to display
the data using its HTML or XML formatting. You will find these functions in the context menu of unstructured
variables in the Variables view.
Analyzing a complex ABAP object and displaying its attributes becomes easier if you try the following:
● Expand the size of the Variables view while you are working with the object.
● Move a subordinate object to the top of the variables display to give yourself more display room. Choose
Show as Top Level Variable from the context menu.
● If your object attributes are internal tables, display them in the ABAP Internal Table view by putting the
cursor on the table and choosing Show in Table View.
Type the value that a variable should have in the Value field in the Variables view, or in any field of a structure or
row of an internal table.
The variable immediately assumes the new value in the debugger context.
You can also use the Change Value entry in the context menu to set the value of a variable. The function has an
added value: It is inactive if the cursor is on a variable whose value cannot be changed.
You may have noticed the folders Locals and Globals in the Variables view. These folders offer a fast way to find
and display any active variable.
● Select open Locals to see a list of all of the data variables that are defined locally in the procedure that is
currently executing in the debugger.
● Select open Globals to see the globally defined data variables of the program that you are debugging.
Context
By default, ABAP Development Tools displays the SY-SUBRC system variable as a favorite, a variable that is
automatically displayed in the Variables view.
You can add your own favorites, or even get rid of SY-SUBRC.
Procedure
1. Type in the name of the variable in the Enter variable field in the Variables view or double-click on a variable
in the source code that you are debugging to add it to the Variables view.
2. Put the cursor on the variable name in the Variables view.
3. From the context menu of the variable, choose:
○ Keep as Favorite to toggle the status of the variable – automatically displayed favorite or not.
○ Change to type in a new variable name in place of the existing variable.
Internal tables open automatically in the ABAP Internal Table (Debugger) view. This view lets you work
comfortably with the rows of an internal table. You can quickly scroll through long tables and use drag and drop
to rearrange table columns for better display.
You have the following possibilities to analyze internal tables while debugging ABAP source code:
You have the following possibilities to display the content of internal tables from the Debug perspective:
1. Double-click the variable name from the ABAP source code editor.
2. Select an internal table in the source code that you are debugging and choose Inspect Variable from the
context menu.
3. In the Variables view, double-click the node for the internal table in question.
4. Open the ABAP Internal Table (Debugger) view from the Quick Access and enter the name of the variable in
the input field.
The content of the internal table is then opened in the ABAP Internal Table (Debugger) view.
Note
For a precise string analysis, you can display the content of an internal table in monospaced fonts. To do
this, choose Use Monospaced Font from the toolbar menu in the ABAP Internal Table (Debugger) view.
This feature is provided in Application Server ABAP 7.54 SP00 and higher.
Actions that are available for internal tables in the ABAP Debugger
● To change the values of particular fields in a table, choose the context menu option Change value....
● To add a row, use the option Insert Row from Selection or Insert Row... In both dialogs, you can edit the
values for the new row.
● To delete one or more rows, use the option Delete Selected Rows or Delete Rows...
Filtering
The ABAP Internal Table view provides you with a quick filtering functionality. Once you start editing the filter
text on the top left corner of the table view, you will immediately notice that the matching cells are highlighted
in blue. The highlighting is adjusted as you type.
Remember
An asterisk (*) is added implicitly to the beginning and the end of the filter text, unless you have already
used * or ? (? = any single character) within your filter text. Note that the filtering influences all columns of
the table view.
Note
The filter simply reduces the number of records shown on the UI (in our example from 1000 to 5 lines). No
records have actually been deleted from the internal table.
Sorting
You can also sort internal tables by clicking on one of the column headers. This also works in combination with
the filter.
Remember
The sorting and filtering functionality also effects sorted tables and hashed tables.
Note
The sorting functionality only affects the UI presentation of the internal table, and does not actually sort the
internal table in the context of the currently debugged process. The actual technical index of the records
within the internal table is still visible on the left-most column called Row.
In the example above, this means that the record shown on top is at position 35 in the internal table. In the
currently debugged ABAP program this record can still be addressed using the variable
L_RECORDS[ 35 ].
During debugging it is necessary to refresh all variable values after each (single) step. This is necessary
because it is impossible for the ABAP debugger to know whether variable values have been changed during the
step. For internal tables, this also means that the described sorting and filtering must be re-executed after each
single step, since changed values can influence the sort order and the filtering. For small tables, the re-sorting /
re-filtering is performed very quickly and you will not even know it is happening. For very large tables, it can
take up to a couple of seconds however. Since this slows down the stepping speed significantly, there is an
option for switching off the automatic refresh in the internal table tool.
To switch off automatic refresh, choose the corresponding Automatic Refresh icon in the toolbar in the table
view.
The shown values are now potentially invalid (the internal table might not even exist anymore) and you will not
be able to scroll or perform any actions on the data. The view will stay in this state until you perform a manual
refresh (see figure above) or you re-activate automatic refresh.
Note
To avoid confusion: There are no recognizable performance drawbacks unless you work with very large
tables and you use sorting / filtering and you try to perform stepping at the same time. For the vast
majority of situations, you can therefore simply use the default setting (Automatic Refresh is active).
The table view provides you with an additional Columns tab. You can use this tab for column configuration. It
also offers a way to find columns faster and navigate to them directly, which is especially helpful for broad
tables (internal tables with more than 100 columns).
Re-arranged columns
In earlier ADT versions, it was already possible to make certain rudimentary adjustments in the table tool, for
example to, change the width of the columns. One single step was enough to completely discard the personal
Example
1. You display the first variable first_itab. The default configuration is used.
2. Change the column configuration and enter a filter. This changes the column configuration.
3. Display the second variable second_itab. The default configuration is used again.
4. Display the first variable first_itab again. The previous (changed) column configuration and the
filter from step 2 will now be restored automatically.
The table status is reset once the debug session ends or the table view is closed. You can also reset the status
manually with a single click by choosing the Reset Column Configuration icon.
Context
Use the following functions to display the location and attributes of an exception object.
Note
If an exception occurs when Navigating in the Debugger [page 694], the debugger notifies you of the
exception by displaying a red '!' exclamation point in the left hand gutter of the editor window.
Procedure
Use the context menu of the line marked with the '!' exclamation point to use these functions:
Starting with ABAP Development Tools (ADT) client version 2.83, you have the option of debugging the flow
logic of dynpro screens (PBO, PAI, and so on). Dynpro debugging enables you to step from the ABAP code to
the screen flow logic, and vice versa. Both dynpro and ABAP entries are represented in a common call stack of
the current debug session.
In previous ADT versions, you were not able to view the dynpro code during stepping or in the call stack
view of the ABAP debugger. A single step at an ABAP statement such, as CALL SCREEN for example, made
the debugger stop at the next ABAP statement after the dynpro screen was processed.
The following figure demonstrates the stepping in a mixed call stack that includes ABAP and dynpro entries. In
our example, the debugger can stop at the CALL SCREEN statement, which serves as an ABAP stack entry. To
step into the called screen 100, you use the F5 key. The debugger then navigates to the PBO of the screen and
you can now debug the flow logic within the corresponding dynpro stack entry. And, vice versa, starting from
the dynpro code, you can call entries on the ABAP stack – again by pressing F5 .
Note
The ABAP Debugger editor displays the dypnro flow logic in pure read-only mode. It does not support any
code changes).
As illustrated in the figure below, the small debugger icon on the tab header indicates the use of the debugger
editor. In addition, you can see the screen number (0310) and the name of the ABAP program that the dynpro
screen belongs to (SAPLSEUK). The Variables view provides access to the varaibles of the underlying ABAP
program.
When stepping through debugged code, you have the option of adding further breakpoints in the debugger
editor. You add these breakpoints on demand in the debugger editor. They are green in color and are decorated
with the tag [temporary] in the Breakpoints view.
Note that these temporary breakpoints are only valid during the current session and will disappear
automatically after termination of the debug session.
Temporary breakpoints are only valid during the current debug session
Staring with ABAP Development Tools (ADT) client version 2.83, you have the option of debugging the
enhancement implementation in the ABAP debugger. Just like stepping into dynpro flow logic by pressing F5 ,
it is also possible to step into enhancement implementation (implicit and explicit).
The following figure demonstrates stepping from standard source code into enhancement implementation,
and vice versa. In our example, the debugger can stop in the standard source code at an enhancement-point
within a method implementation. After pressing F5 (Step Into), the debugger will reach the implicit
enhancement implementation.
The debugger editor displays the enhancement code in pure read-only mode and has the same characteristics
as known from dynpro debugging. More on this: Debugging Dynpro Flow Logic [page 690]. The enhancement
implementation is part of the call stack and is indicated with the tag [enhancement]. The Variables view
provides access to the related enhancement implementation.
When stepping through debugged code, you can – on demand – create temporary breakpoints in the debugger
editor. These breakpoints are green in color and are decorated with the tag [temporary] in the Breakpoints view.
Note
Temporary breakpoints are only valid during the current session and will disappear automatically after
termination of the debug session.
Context
You will find tools for stepping through and navigating within code in the Debug perspective. By default, the
corresponding buttons are available in the toolbar at the top of the perspective.
This section briefly explains the navigation options that you have.
Step Into (F5) Execute the next single ABAP instruction in the program in
the debugger. Step into a called procedure.
Step Over (F6) Execute the next ABAP statement. If the next step is a proce
dure call, run the entire procedure.
Step Return (F7) Run until the current procedure returns to its caller or until
the program ends.
Run to Line (Shift F8) Run to the statement on which the cursor is positioned.
Jump to Line (Shift F12) Put the execution pointer to the statement on which the cur
sor is positioned wihout executing of any other statement in
between. Consider that variables are not reset to reflect a re
start from an earlier code position.
Jump to code in call stack Click on an entry in the call stack in the Debug view to open
the code in the editor. The cursor is positioned at the point at
which the call happened.
Note
The Step Filter function is shown as active in the ABAP debugger, but it can only be used with Java coding.
For an equivalent functionality, see layer-aware debugging in the back end debugger.
In the special case that multiple people are using the same user name and password (group users), some
technical conflicts can arise.
ABAP Platform
For SAP NetWeaver releases < 7.50, this can cause different issues, for example when no debug session is
started although it should be or when a debug session is started for you, although it should be started for your
colleague or vice versa.
In SAP NetWeaver releases >=7.50, SP00, this issue is handled in two ways:
● The first one is the option This project only within the project-specific settings which allows you to work
isolated for exactly one certain ABAP project. If this option is chosen you will not experience any of the
Related Information
Context
You can change how the ABAP debugger behaves with the General Settings.
Procedure
1. Open the debugger preference page. (Choose Window Preferences ABAP Development Debug .)
2. Change debugger settings as required. The settings apply to all of your ABAP projects.
Enable debugging of system programs Mark this checkbox to make ABAP system programs visi
ble in the debugger. If this option is not activated, then the
debugger executes code in system programs without dis
playing the code. The debugger also does not stop at
breakpoints in system programs.
Suspend sending of background RFC requests Mark this option to have bgRFC (background RFC) func
tion module calls recorded by the system, but not exe
cuted. You can then debug such calls with transaction
SBGRFCMON in the integrated SAP GUI. Since bgRFC calls
are deleted after execution, suspending their execution is
necessary for analyzing them with the debugger. In older
releases, this option also works for tRFC (transactional
RFC) calls. These are held without being executed, so that
you can examine them in transaction SM58 in the inte
grated SAP GUI.
Enable debugging of automatic construction of shared ob Mark this option to have the debugger start on entering
ject areas the process that creates a shared object memory area.
Show message if breakpoint cannot be set Mark this option to enable or disable warning messages, if
a breakpoint that you have requested cannot be set.
Breakpoints cannot, for example, be set on some ABAP
statements for source code modularization, such as
CLASS or PUBLIC SECTION.
Show message if breakpoint activation conflict occurs Mark this option to get a notification popup if a different
person (IDE / project) is using the same debug scope as
you do currently. More on this: Managing Technical Con
flicts During Debugging [page 695]
Related Information
Context
You can use project-specific debug settings to change the user for which ABAP breakpoints are in effect.
Note
Debugging SAP public services: HTTP services that are defined under sap/public in transaction SICF are
handled without an explicit logon. (They are processed under a special system user). This means that the
breakpoints that you set in ADT do not work for debugging of sap/public services; a request does not run
under your user, and you cannot set an external breakpoint to catch processes of the special system user.
One workaround for debugging such services is to make a copy of your service under a different SICF path,
sap/bc, for example. Then requests to the service run under your user, and you can stop in the debugger in
your ABAP service handler.
Procedure
1. Open the debugger preference page. (Choose Window Preferences ABAP Development Debug .)
2. Choose Configure Project Specific Settings... and choose the ABAP Project for which you wish to change
the customizing.
3. [Optionally:] Specify the validity scope of ABAP breakpoints that have been created in ADT.
Option Description
This Enables debugging of requests from within this ABAP project only. With this option, you can only debug
project requests that are started from within this certain project but no external requests (RFC, HTTP).
only
Note
If this option is chosen you will not experience any issues that are reported in the topic: Managing
Technical Conflicts During Debugging [page 695].
Logon Enables debugging of any request for the logon user (default option).
user
This means that for server-requests that have been processed on the ABAP server, only the ones running
under your logon user (SY-UNAME) are able to start a debug session - if they reach a breakpoint. Re
quests that are executed under a foreign user will not start a debug session and just ignore the break
point. Therefore you will not be able to stop/debug the requests of your colleagues with this option.
If you want to debug requests of a foreign user you can choose this option and enter the respective user
name.
This allows you to debug also external requests like RFC and HTTP, as long as they are processed under
the specified user on the ABAP server.
4. [Optionally:] Use Advanded Settings and mark Allow debugging of tool requests if you are developing
ABAP components for ABAP Development Tools itself.
5. [In case of AMDP debugging: ] You have the option to view or change the settings for AMDP debugging.
More on this:
Related Information
The ABAP Profiler is not available if you are working with a back-end system of SAP NetWeaver 7.0 EHP3. Use
the transaction SAT (ABAP Runtime Analysis) in the embedded GUI if you need to trace an ABAP program
under SAP NetWeaver 7.0 EHP3.
Note
The ABAP Profiler is the successor of the Runtime Analysis toolset and is recommended for SAP
NetWeaver 7.4 SP2 and higher.
Usage
The ABAP Profiler allows you to examine the performance of transactions, ABAP programs, function modules,
global ABAP classes, and Web Dynpro applications.
You can use the ABAP trace (the results of the ABAP Profiler) to identify runtime-intensive statements and to
follow the hierarchy of program calls.
Tip
You will find a compact overview and introduction to ABAP Profiler in the SAP Community Network. To read
the related blogs, click here... and here...
● Identify performance hot spots where you might want to concentrate your re-factoring effort.
● Identify excessive or unnecessary use of modularization units.
● Identify CPU-intensive program functions
● Analyze the flow of your application.
Tip
If you need to analyze or compare program flow, the ABAP Profiler can be a faster and more effective
tool to use than the ABAP Debugger.
Related Information
● Run your program before profiling it: It's a good idea to run your program at least once before you launch
the ABAP Profiler. That way, any side-effects of compilation, initialization of caches, or other time-users,
are eliminated before you actually create an ABAP trace (result of the ABAP Profiler).
● By starting the ABAP Profiler for an individual ABAP program directly from the source editor or from the
Project Explorer view.
More on this: Launching Profiler for an ABAP Development Object [page 701]
● By launching the profiler wizard tool - independently of any context, you can select an arbitrary
development object to be profiled.
More on this: Creating an ABAP Trace Using a Wizard [page 702]
● By creating a trace request. Certain programs or program units cannot be started directly as ABAP
applications. As an alternative to profiling such a program in its ABAP Unit tests, you can create a trace
request and profile a method or function module whenever its execution is triggered in the back-end
system by a transaction, HTTP request, RFC call, or within a background process
More on this: Creating an ABAP Trace Request [page 705]
Context
You want to start the ABAP Profiler for an individual ABAP program directly from the ABAP source code editor
or from the Project Explorer view.
Procedure
1. From the ABAP source editor or from the Project Explorer, choose Profile As ABAP Application or
Profile As ABAP Application (Console) or Profile As ABAP Unit Test .
Note
You can profile ABAP classes and other programs that you cannot start directly by running their
ABAP Unit test methods.
2. [Optional-]When your program has completed, switch to the ABAP Profiling perspective.
3. Open the ABAP Traces view. The new ABAP trace should already be shown; if it is not, simply refresh
the list of traces.
4. Double-click on a trace to open it in the Overview page. You can also start an appropriate analysis tool,
such as for example, the Trace Hit List or the Call Sequence (for non-aggregated traces) from the context
menu of a trace entry.
Related Information
Context
Independently of any context you can start profiling development objects using the corresponding wizard tool.
To do this, you launch the profiling dialog using a shortcut. Then you specify the object (transaction,
program ...) that you wish to profile in the selected system.
You can only start the profile function for a subset of development objects that are executable in the ABAP
Workbench.
More precisely, the dialog enables you to start profiling for the following object types:
● Transactions
● ABAP programs
● Function modules
runs the test environment for function modules
● Global ABAP classes
runs test environment for the selected class
● Web Dynpro applications
.
Note
The range of object types for which you can start tracing depends on (the release of) the backend system
you are connected to.
Procedure
1. Call the profiling dialog using the menu Run Profile ABAP Development Object... (shortcut Alt +
F9).
2. Select the relevant ABAP project – if you have not already done so.
3. Select the Object Type and enter the (part of the) name of the development object or transaction for which
you want to start profiling.
Tip
When editing the name, you can avail of the content assistant functionality by pressing Ctrl + Space in
the Object name field.
Results
ABAP Development Tools runs the selected development object or opens the corresponding test environment
within the integrated SAP GUI.
Context
Let's assume you want to create an ABAP trace for a source code with a specified start and end position. You
can now avail of the option to explicitly switch the measurement function on and off. In particular, you can
switch the ABAP Profiler on/off at defined breakpoints when debugging your program. The ABAP Profiler then
captures only those source code sections for which you want to analyze the runtime, and not for the entire
program execution.
1. Before you launch the debugger, set a breakpoint at that line of ABAP source code that you want to analyze
in detail.
More on this: Setting Breakpoints at a Line in Code [page 672]
2. Start the Profiler wizard using the menu Run Profile ABAP Development Object... (shortcut: Alt +
F9 ).
3. In the wizard page that appears, select the relevant ABAP project and the Object type, and then enter the
name of the object for which you want to start the Profiler. In addition, you can specify a specific Trace title
for the ABAP trace to be created. Then choose Next.
On the next page, you can adjust the ABAP Profiler settings to your needs. More on this: Understanding
ABAP Profiler Settings [page 740]
4. Under the heading When should the trace start? , choose the option Explicitly switch on and off.
7. On the ruler, open the context menu and choose Switch ABAP Trace On.
The decorator of the breakpoint now indicates that the ABAP Profiler is switched on.
Note
The ABAP Profiler will be switched off automatically when the application is terminated.
Results
As a result of this procedure, the Profiler creates an ABAP trace for the selected development object. You will
find it in the ABAP Traces view under the ABAP project and Trace title - as you specified in step 3.
Related Information
Context
You can trace the execution of an ABAP request even if you cannot start it directly yourself. That is, you can
create a trace request: Tell the ABAP Profiler to wait until a request starts and then automatically profile its
execution.
Procedure
3. Then click on the Create Trace Request button ( Ctrl + N ) or choose the corresponding function
from the context menu of a line in the view.
4. In the Trace Schedule wizard that appears, you can specify what you want to profile. Look at Filling Out the
ABAP Trace Request Dialog [page 706] for more information on the fields in the wizard page.
Any request that meets your scheduling specifications (type of activity, user, client, and so on) will be
traced. It does not matter whether the program was started from the ABAP Development Tools client or
from the back-end system.
7. Use the Refresh ( F5 ) function in the context menu to monitor your trace request. When the Executions
column in ABAP Trace Requests shows that at least one trace has been made, you can switch to the ABAP
Traces view to examine the trace. To do so, mark the trace request entry and choose Show in ABAP
Traces .
The cursor will be positioned on the trace entry in the ABAP Traces view.
8. Double-click on a trace to open it in the Overview view. You can then use the analysis tools to examine the
results in detail.
Related Information
Context
The table below explains how to fill out the fields on the ABAP Trace Request dialog. The dialog lets you
schedule asynchronous traces of ABAP program executions.
Example
For example, you can trace HTTP requests or RFC calls that are processed by the back-end system.
Which requests do you want to trace? Here you tell the ABAP Trace what sort of activity you want
to trace. The available request types are:
Recommendation
Choosing additional filters is optional, but it allows you
to limit the number of trace files created. Therefore, SAP
recommends that you set the relevant filters as pre
cisely as possible.
Note
This field is only available when you specify the object
type Web Requests (HTTP).
Recommendation
SAP recommends that you schedule a trace on all serv
ers. The ABAP load-balancing features make it hard to
predict the server on which a program will run.
Which restrictions apply? Here you can specify how many traces are performed.
Schedule more than one trace if you need to be sure of cap
turing the right instance of a program run. Once the re
quested number of traces is reached, no further traces are
run on that ABAP application server.
Title of the trace file The Title is the trace title shown to you in the ABAP Traces
view. The ABAP Trace generates a description for you, or you
can enter your own description.
Context
You want to save profile configurations, such as the name of an ABAP development object and ABAP Profiler
settings, so that you can quickly and easily re-run the ABAP Profiler with predefined settings.
Procedure
1. Start the configuration dialog from the editor or from the Project Explorer or by choosing Profile As
Profile Configurations ( Ctrl + Shift + F9 ).
2. ABAP Development Tools presents the Profile Configurations dialog. In the Project Explorer, you can create
a new run configuration or edit an existing run configuration.
3. On the Main tab, specify the ABAP development object that is to be traced and the ABAP project (system
and client) in which the trace is to be made.
4. On the Tracing tab, you can set Profiler options.
See Understanding ABAP Profiler Settings [page 740] for a description of the Profiler options.
Results
You have saved a configuration for the ABAP Profiler. To run the ABAP Profiler, choose Profile from the toolbar
of the Configurations dialog.
Double-click on an entry in the ABAP Traces view to display the trace overview. The Overview is the starting
point for further analysis and provides you with the following information:
General Information
Title The title given to the ABAP trace by the user or generated by the system.
ID The name of the trace file, composed of the name of the instance - host_sid_number - on
which the trace was made and the file name - AT....
User User under which the trace was made. In scheduled traces, this may be a service user, a
different user than scheduler of the trace.
Aggregation Mode Indicates which aggregation mode (None, Call Stack or Call Position) has been used during
the trace execution.
Runtime Distribution
Provides you with an information of how the traced runtime was distributed across Application Server ABAP
components.
ABAP The run time spent processing ABAP code, not including ABAP system programs.
Database The run time spent in the database, performing database operations.
System The run time spent processing ABAP code in system programs. An ABAP program is a sys
tem program if it is defined with the status set to System Program.
As an integral part of the ABAP Profiler, various analysis tools provide you with different views on the ABAP
trace:
Condensed Hit List ... find top consumers with regard to procedures such as methods, function modules, or
forms.
More on this: Finding Top Consumers Using the Condensed Hit List [page 711]
Hit List ... find top consumers in your application by call position.
More on this: Finding Hot Spots with the Hit List [page 717] and Determining Runtime with
the Hit List [page 719]
Aggregated Call Tree ... analyze trace events that are aggregated by call stacks and displayed within a call tree.
More on this: Analyzing Trace Events in the Aggregated Call Tree [page 726]
More on this: Analyzing Program Flow with the Call Sequence [page 721]"
Call Timeline ... visualize the call sequence in the form of a diagram.
More on this: Analyzing Call Sequence Using the Call Timeline Tool [page 731]
Database Accesses ... check which portion of runtime is used by database accesses and identify the top con
sumers among database accesses.
More on this: Understanding Parameters in the (Condensed) Hit List [page 714]
SQL Trace ... view SQL trace events and analyze how the system handles database requests.
You can use the Condensed Hit List to find top consumers with regard to procedure calls, such as methods,
function modules, subroutines, or other kind of calls (for example: CALL TRANSACTION, CALL SCREEN).
Prerequisites
● You have created an ABAP trace of your program. The ABAP trace has the status Finished.
● The ABAP trace is not aggregated by Call Position. More on this: Aggregation Options in ABAP Traces
[page 742]
Context
Remember, in the Hit List tool, trace events are aggregated by their call position so that no stack information is
available, whereas in the Condensed Hit List, aggregation is independent from the call position and depends
only on the called unit. See also: Aggregation Options in ABAP Traces [page 742]
Imagine a class with methods M1, M2, and M3. Now imagine a program PROG that calls M1 twice at the same
call position. The first call of M1 implies also the call of method M2. Finally, M2 is called through the method M3,
as shown in the figure below. In the Condensed Hit List, the ABAP Profiler creates a single trace entry for each
method M1, M2, and M3. The Executions column has the value 2 for M1 and M2.
Trace events in the Hit List and in the Condensed Hit List
● Analyze the runtime consumption of individual procedure calls in your ABAP application - how long does it
take for a method, function module, or subroutine call to run?
● Find top consumers among the procedure calls.
● Analyze how the runtime consumption of an individual procedure call is distributed to intrinsic
(unspecified) ABAP statements, to external calls, and to specified ABAP statements (for example: SELECT
statements that require database calls).
Here is how to use the Module Hit List to evaluate potential top consumers under the procedure calls in an
ABAP program.
1. To open the Condensed Hit List, select the relevant trace in the ABAP Traces view and choose Show
Condensed Hit List from the context menu.
Note
Alternatively, double-click the trace in the ABAP Traces view to open the Overview page of the trace and
then choose the Condensed Hit List tab.
The Condensed Hit List provides you with a list of individual procedure calls within an ABAP trace. Each
trace event is aggregated to a method, function module, subroutine, or other kind of procedure call.
2. Identify those trace events (procedure calls) that cost disproportionate amounts of runtime and perhaps
could be optimized. You can pay special attention to the Executions, Own Time (…), and Total Time
columns. See also: Understanding Parameters in the (Condensed) Hit List [page 714]
Option Description
Show Called Unit in ... to navigate to the source code position where the procedure is implemented.
Source Code
Show All Executions ... to display all executions of the selected trace event (procedure call). The results are dis
played in the Search view and allow you to detect the runtime portion for each individual execu
tion of the trace event.
Note
This option is only enabled for aggregated trace events (number of Executions > 1)
Show in Call ... to analyze the execution path of the procedure call.
Sequence
Note
This option is only enabled for non-aggregated trace events (number of Executions = 1).
The runtimes that you see for the trace event reflect a single execution of the procedure
call that has been recorded in the trace entry.
Show Call Stack ... to analyze the distribution of executions over the different call stacks. This view on data al
lows you to follow from where the current trace event is called.
Show in Hit List ... to analyze in detail the different call positions of the called unit.
System Events ... if you want that system events (for example: methods of system programs) are displayed.
Here is some information on the trace parameters that are displayed in the Condensed Hit List and the Hit
List.
Trace Event (in Hit List) A trace event is an ABAP statement or other operation (a database operation, for example) for
or Called Unit (in Con which the ABAP Profiler records discrete performance data. Each individual trace event that has
densed Hit List) been recorded allows you to analyze the runtime and memory consumption of the underlying
ABAP statement or other operation.
Note
In the Condensed Hit List, a called unit in particular represents procedure calls such as meth
ods, function modules, or subroutines.
The ABAP Trace does not record all ABAP statements and operations as trace events, but only
those that are potentially "expensive" in terms of system resources. A CALL METHOD statement is
recorded as a trace event. An IF statement is not.
Though the ABAP Profiler does not record all ABAP statements and events, a trace nevertheless
gives you a rich and detailed view of program performance and execution flow, especially since all
procedure call statements are recorded.
The trace events that you see in a particular ABAP trace also depend on the Profiler settings that
you selected before creating the ABAP trace. More on this: Understanding ABAP Profiler Settings
[page 740]
Aggregation means that the runtime used in the aggregated trace events that have been called in
the same manner is added up to a single total trace event entry. The Executions column is set to
show how many trace events were aggregated. You can therefore calculate average values for sin
gle instances of the aggregated event.
Example: Imagine a class with methods M1 and M2. Now imagine a PROGRAM that calls M1 once
and M2 twice:
● For M1, the ABAP trace creates a single trace entry. The Executions column has the value 1.
● Method M2 occurs as one entry in the Condensed Hit List with Executions = 2. If the call posi
tion of the first call of M2 is the same as for the second call, there will also be one entry in the
Hit List with Executions = 2. However, if both call positions are different, there will be two en
tries in the Hit List, both with Executions = 1.
Executions The number of executions of a trace event indicates whether this trace event shows aggregated
runtimes or not. If you see the value 1 in Executions, the trace event in not aggregated. The run
times that you see then reflect a single execution of the statement or operation recorded in the
trace entry.
If you see a Executions of greater than 1, that number of runs of the traced ABAP statement or
operation are aggregated in the runtimes that you see. Executions 3 with an Own Time of nine sec
onds means that each instance of the trace event ran for an average of three seconds.
Callers Number of direct callers of a trace event. Using this parameter you can detect how many different
call positions contribute to the runtime of the called unit. The number of callers of a called unit in
the Condensed Hit List tells you how many different entries of the Hit List have been aggregated to
this entry.
Note
This parameter is available in the Condensed Hit List, but not in the Hit List.
Stacks Number of different call stacks associated with the trace event. The number tells you how many
entries of the Aggregated Call Tree have been aggregated to this entry.
Own Time (Specified The amount of runtime in microseconds spent running a particular trace event or set of aggre
and Unspecified ABAP gated trace events, including specified ABAP statements, such as SELECT statements that require
Statements) [µs] database calls.
Note
This parameter is available in the Condensed Hit List, but not in the Hit List.
This runtime includes intrinsic (unspecified) statements and specified statements, but excludes
all time spent in external calls that were started from the present trace event.
Example: Imagine that method M1 has a total runtime of six seconds. One tenth of a second is
accounted for by creating an object that offers method M2 (specified statement). Nine tenths of a
second are spent doing other intrinsic processing in M1 (unspecified statements). Five seconds
more are spent in method M2 called form M1.
In the Condensed Hit List, the Own Time (Specified and Unspecified ABAP Statements) of method
M1 is one second (one tenth + nine tenths of a second) because the rest of the runtime of six sec
onds was spent in method M2 (five seconds).
Own Time [µs] The amount of runtime in microseconds spent running a particular trace event or set of aggre
gated trace events. The Own Time excludes all time spent in other trace events that were started
from the present trace event, such as external calls or specified statements (for example: SELECT
statements).
Example: Imagine that method M1 has a total runtime of six seconds. One tenth of a second is
accounted for by creating an object that offers method M2 (specified statement). Nine tenths of a
second are spent doing other processing in M1 (unspecified statements). Five seconds more are
spent waiting for calls from M1 to method M2 to complete.
In the Condensed Hit List and in the Hit List, the Own Time of method M1 is nine tenths of a second
because the rest of the runtime of six seconds was accounted for by creating an object (100 milli
seconds) and waiting for method M2 (five seconds). Each of these events has its own trace entry.
Their runtimes are therefore excluded from the Own Time of M1.
Total Time [µs] The amount of runtime in microseconds from the start to the finish of a particular trace event or
set of aggregated trace events. The Total Time includes time spent in other trace events started
from the first trace event. In other words: it includes the runtime of external calls as well as unspe
cified (intrinsic) and specified statements (for example: SELECT statement that requires database
calls) within the present trace event. Total Time lets you see the total contribution of the process
ing done within such tracing events as procedure calls.
Example: A method M1 includes unspecified statements, calls a second method M2, and also calls
the database using SELECT statements. Three seconds runtime are spent for method M2 to com
plete, one second is spent for performing database calls, and two seconds are spent for the intrin
sic, unspecified statements.
The Total Time of method M1 is six seconds, including the runtime of method M2 and database
calls.
% Own Time (Specified This column shows the Own Time (Specified and Unspecified ABAP Statements) of the trace event
and Unspecified ABAP
as a percentage of total ABAP trace runtime.
Statements)
This column (as well as % Own Time and % Total Time) let you evaluate the importance of a partic
ular trace event in the total runtime of a measured application. A trace event can have a long run
time. But how much of the own (total) run time is accounted for by the trace event? For example,
an event with an Own Time contribution to a runtime of a couple of percent does not merit the
refactoring attention that you would pay to an event with a 33% share of runtime.
% Own Time This column shows the Own Time of the trace event as a percentage of the total trace runtime.
% Total Time This column shows the Total Time of the trace event as a percentage of the total trace runtime.
Calling Program Calling Program identifies the ABAP program that initiated the trace event.
Called Program Called Program identifies the ABAP program in which the trace event is located.
These two parameters Calling Program and Called Program let you differentiate between code in
your own application and the infrastructure code that originated in the ABAP Application Server.
Tip
Use the filter field to show, for example, only trace events that belong to your own application.
Prerequisites
● Analyze the runtime of your ABAP application - how long does it take to run?
● Find performance hot spots – operations that cost disproportionate amounts of runtime and which
perhaps could be optimized.
The Hit List aggregates trace events (potentially costly ABAP statements and events). This means that you can
easily see runtime accounted for by repetitive events in your program, such as repeated calls to a particular
method. And you can evaluate the impact of aggregated operations on the total runtime of the application.
Here is how to use the Hit List to evaluate potential hot spots in an ABAP program.
Procedure
Open the Hit List by selecting a trace in the ABAP Traces view and choosing Show Hit List from the context
menu.
The Hit List opens in a new view of its own. It starts with the list of trace events sorted by Own Time. That is the
run time in microseconds that was spent in the trace event itself, excluding other trace events, such as
procedure calls, made during the trace event. A method may have a large total time but a small own time if it
does nothing but call another method.
Example
Here's how to read this excerpt from a hitlist, sorted by Own Time. To evaluate the importance of the top
entry in the Hit List, SELECT SINGLE TLDOC_ITFPARACONV. This trace event accounts for fully 25 percent
of the runtime of the traced program – that qualifies it as a 'hot spot' – a target for potential optimization.
We'll pay special attention to the Own Time and Executions columns. Here is Understanding Parameters in
the (Condensed) Hit List [page 714] for understanding all of the columns.
○ The Trace Event column shows what ABAP operation was recorded. Here, the topmost, most expensive
trace event – Select Single TLDOC_ITFPARACONV – belongs directly to our own program, the
program that we want to analyze. Since the trace event belongs to our code, we can potentially
optimize it. The next two lines – Fetch ICFSERVICE – pertain to the ABAP HTTP service
infrastructure. They are not directly part of our program, and we can ignore these trace events. The
Called Program and Calling Program columns help you to recognize events that belong to your code and
non-relevant trace events that belong to other frameworks or infrastructures.
○ Own Time shows the accumulated time spent doing the traced operation. Own Time is important
because it is the time spent doing the operation by itself, without counting any time the operation may
have spent waiting for other traced operations that it called. Here, our program spent 37 milliseconds
Results
Armed with this information, you can now decide whether this top entry in the Hit List deserves optimizing
attention or not. On the one hand, 37 milliseconds is not a lot of time. On the other hand, it is a full quarter of
the total runtime of the traced program.
Since the operation is a database operation, there are several low-cost optimization strategies available.
● We could check whether caching in switched on for TLDOC_ITFPARACONV, and if so, whether the caching
strategy is correct for the table and its use.
● Are the same records being fetched over and over again? If so, then perhaps the program could fetch each
record only once.
● Are all of the fields of the table records being used? Perhaps only a couple of fields need to be fetched.
● If the table is small and most or all of the records in the table are being read, then perhaps the program
would be more efficient if it did a single SELECT of the table contents into an internal table.
Should you wish to take a closer look at the code or set a break point in the code, just double-click on an entry.
The ABAP editor opens in a separate window, positioned where the aggregated trace event occurred.
Tip
You can also use these context menu functions to navigate from Hit List entries:
Prerequisites
You have created an ABAP trace of your ABAP program. The ABAP trace has the state Finished.
Procedure
1. Open the Hit List, for example, by selecting a trace in the ABAP Traces view and selecting Show Hit List
from the context menu.
The Hit List opens in a new view of its own.
2. The Hit List starts with the list of trace events sorted by Own Time. Re-sort the list by clicking on the Total
Time [µs] column. This sorts the trace events by total runtime spent in a particular trace event.
Total runtime includes time spent waiting while other trace events were called and processed. For that
reason, Own Time (time spent processing the trace event itself) is often less than Total Time.
As you can see in the screen shot above, the first six trace entries have to do with the ABAP Trace itself or
with the communications infrastructure of the ADT. The third line, for example, shows that the total round-
trip time of the ADT request was around 149 milliseconds. The total run time of our traced application
(CL_DOCU_ATC_ADT_RES_ITF_DOCU->GET) appears in the last line shown in the screen shot. As you can
see, the run time of the GET request was about 143 milliseconds.
(By the way, the ABAP Trace uses kernel technology and is very fast. A traced application may slow down if
the ABAP Trace needs to write a lot of trace records, but even in this case, the traced runtimes reflect only
the activity of the traced program. The ABAP Trace automatically excludes its own runtime for making
measurements and writing trace entries from the runtimes of the traced program and mot the tracing).
Usually, you must read down the Hit List to find the start of the runtime that pertains to your code; the first
entries pertain to the ADT or the communication infrastructure. You can identify the start of your code by
looking at the Called Program column. You can also use the Filter column to restrict the display to your own
code or to find particular procedures or other trace events.
4. Evaluate the run time.
Is the total runtime acceptable? In this case, the runtime of 143 milliseconds for fetching and displaying a
document is probably acceptable. The response time for the user is likely to be far under 0,5 seconds. If
the GET method had shown a higher runtime, close to 500 milliseconds, for example, then that would have
been good cause to start analyzing the code to find out where the runtime is being consumed. A major
refactoring and optimization might be required.
Should you need to start a closer analysis of the code or set a break point in the code, just double-click on
an entry in the Hit List. The ABAP editor opens in a separate view, positioned where the trace event
occurred. If the trace event was aggregated, then the Search view opens to let you open the editor from
one of the aggregated instances of the trace event.
You can also use these context menu functions to navigate from hit list entries:
○ Show in Call Sequence: Show a trace event in position in the Analyzing Program Flow with the Call
Sequence [page 721].
○ Show Call Stack: Displaying the Call Stack [page 734] that led to the trace event.
How much time does my program need to run? Does it run as quickly as I expect it to? Is the runtime
acceptable? You can answer these important questions with the Hit List.
Prerequisites
● You have created an ABAP trace of your ABAP program. The ABAP trace has the state Finished.
● The trace in question has aggregation set to No, as in this sample from the ABAP Trace Requests view.
If a trace is aggregated, then the trace does not record individual trace events. The Call Sequence function
is not offered in the context menu if a trace was recorded with aggregation active.
Context
Use the Call Sequence view to analyze the execution path of a program. You can use the Call Sequence to do
the following, for example:
● Analyze the flow of a program as part of the analysis of an error. You can see which ABAP programs are
involved in the error and easily find useful places to set breakpoints.
● Understand how an unfamiliar program works and which ABAP programs play a role in its execution.
Here is how to use the Call Sequence to analyze the flow of program execution.
1. Open the Call Sequence by selecting a trace in the ABAP Traces view and choosing Show in Call Sequence
from the context menu or from the Overview page.
The Call Sequence opens in a new view of its own. It starts with a display of the top-most branches of the
call hierarchy. The main runtime consumers are highlighted with boldface. The Show/Hide toggle link lets
you display or hide non-procedural trace events in each procedure, such as database activity or use of
internal tables.
2. Drill down to the section of the trace that particularly interests you. There you can see which programs
participated in processing and analyze the flow of processing at the level of procedure calls.
3. Use the information resources of the Call Sequence to understand the program flow and analyze the
runtime behavior of the program.
In this sample, we want to understand the most expensive call to the method
GET_DOCUMENT_FROM_DOCU_SYSTEM, which had a runtime of around 17 milliseconds (Total Time). In this
first view, the structure of the method is clear:
○ It calls a function module from SAPLSDOC to fetch a document.
○ It then calls a series of methods that perform operations on the document, such as resolving text
symbols.
As you take a closer look at the trace excerpt, there are some interesting features to look at. First, the
DOCU_GET function module uses almost as much 'own' (net) runtime as total runtime. What is it doing?
Click Show to see what used the time in DOCU_GET. In fact, the Own runtime is accounted for by database
operations on the three ABAP documentation tables.
Results
We now understand basically how the class works and what runtime resources it consumes.
Tip
● Should you wish to take a closer look at the code or set a break point in the code, just double-click on
an entry. The ABAP editor opens in a separate window, positioned where the aggregated trace event
occurred.
● To take a look at the aggregated impact of the trace event on runtime, choose Show in Hit List from
the context menu of an entry. You can see how the aggregated trace event ranks among the runtime
consumers in the trace.
● To Displaying the Call Stack [page 734] that lead to a trace event, choose Show Call Stack in the
context menu.
Related Information
Here you will find information on the trace parameters that are displayed in the Aggregated Call Tree and the
Call Sequence:
Note
With one exception, the parameters are identical in the Aggregated Call Tree and Call Sequence views:
Parameter Description
Trace Event A trace event is an ABAP statement or other operation (a database operation, for example) for
which the ABAP Profiler records discrete performance data. Each individual trace event that has
been recorded allows you to analyze the runtime consumption of the underlying ABAP statement
or other operation.
The ABAP Trace does not record all ABAP statements and operations as trace events, but only
those that are potentially expensive in terms of resources. A CALL METHOD statement is recorded
as a trace event. An IF statement is not.
Though the ABAP Profiler does not record all ABAP statements and events, a trace nevertheless
gives you a rich and detailed view of program performance and execution flow, especially since all
procedure call statements are recorded.
The trace events you see in a particular ABAP trace also depend on the Profiler settings that you
selected before creating the ABAP trace. More on this: Understanding ABAP Profiler Settings
[page 740]
Aggregation Options
In the Aggregated Call Tree, the trace events are always aggregated for display according to their
call stacks. The Aggregated Call Tree tool is available for non-aggregated trace files and for trace
files that are aggregated by Call Stack. The Call Sequence tool is only available for non-aggregated
trace files More on this: Aggregation Options in ABAP Traces [page 742].
Statement Filter The Aggregated Call Tree and the Call Sequence view filter the trace display to highlight procedure
calls such as CALL METHOD and CALL FUNCTION. Clicking on Show link in this field displays
specified statements within the procedure call, such as data object creation, database calls, or use
of an internal table, that were also recorded within the current procedure. These trace events are
shown in contrasting colors.
Remember
The Hit List view for example, shows by all trace events, including the unspecified statements
that the Aggregated Call Tree and the Call Sequence hide by default.
Executions The number of executions of a trace event indicates whether this trace event shows aggregated
runtimes or not. If you see the value 1 in Executions, then the trace event in not aggregated. The
runtimes that you see then reflect a single execution of the statement or operation recorded in the
trace entry.
If you see a Executions of greater than 1, then that number of runs of the traced ABAP statement
or operation are aggregated in the runtimes that you see. Executions with an Own Time, for exam
ple, of nine seconds means that each instance of the trace event ran for an average of three sec
onds.
Note
This column is available in Aggregated Call Tree only! In the Call Sequence view, the Executions
counts the value 1 for each trace event recorded).
Total Time [µs] This represents the amount of runtime in microseconds from the start to the finish of a particular
trace event or set of aggregated trace events. The Total Time includes time spent waiting for other
trace events started from the first trace event. In other words: it includes the runtime of external
calls, as well as unspecified (intrinsic) and specified statements (for example: a SELECT state
ment that requires database calls) within the present trace event. Total Time lets you see the total
contribution of the processing done within such tracing events.
Example:
A method M1 has a total runtime of six seconds. Five seconds of that time are spent waiting for
method M2 to complete. Method M2 is called from method M1. The Total Time of method M1 is six
seconds, including the run time of method M2.
Own Time [µs] This represents the amount of runtime in microseconds spent running a particular trace event or
set of aggregated trace events. The Own Time excludes all time spent waiting for other trace
events that were started from the present trace event, such as external calls or specified state
ments (for example: SELECT statements). Own Time lets you see how intrinsically expensive a
traced statement or operation was, in and of itself.
Example: Imagine that method M1 has a total runtime of six seconds. One tenth of a second is
accounted for by creating an object that offers method M2 (specified statement). Nine tenths of a
second is spent doing other processing in M1 (unspecified statements). Five seconds more are
spent waiting for calls from M1 to method M2 to complete.
In the Aggregated Call Tree and in the Call Sequence, the Own Time of method M1 is nine tenths of
a second because the rest of the runtime of six seconds was accounted for creating an object (100
milliseconds) and waiting for by method M2 (five seconds). Each of these events has its own trace
entry. Their runtimes are therefore excluded from the Own Time of M1.
Call Level This parameter counts the depth within the call hierarchy, starting from entry point of the call tree
(Call Level = 0) downwards to the level of the selected trace event.
% Total Time This column shows the Total Time of the trace event as a percentage of the total trace runtime.
% Own Time This column shows the Own Time of the trace event as a percentage of the total trace runtime.
Calling Program Calling Program identifies the ABAP program that initiated the trace event.
Called Program Called Program identifies the ABAP program in which the trace event is located.
These two parameters Calling Program and Called Program let you differentiate between code in
your own application and the infrastructure code that originated in the ABAP Application Server.
Tip
Use the filter field, for example, to show only trace events that belong to your own application.
You can use the Aggregated Call Tree to analyze trace events that are aggregated to call stacks and displayed
within a call tree.
Prerequisites
● You have created an ABAP trace of your program. The ABAP trace has the status Finished.
● The ABAP trace is not aggregated by Call Position. More on this: Aggregation Options in ABAP Traces
[page 742]
Context
Remember, the Call Sequence tool provides you with a time sequence of trace events as a hierarchical tree. By
contrast, the Aggregated Call Tree shows the trace events in an aggregated form. In the latter case, the trace
events are aggregated By Call Stack and displayed in a tree hierarchy.
Aggregation By Call Stack means that the runtime data of the multiple executions that occurred via the same
call path (the same caller) is added up to a single trace event entry. In the results display of the Aggregated Call
Tree, the Executions column displays how many trace events were aggregated in a single trace event entry.
EXAMPLE
Imagine a class with methods M1, M2, and M3. Now imagine a program PROG that calls M1 twice from the
same call position. The first call of M1 implies also the call of method M2. Finally, M2 is called through the
method M3, as shown in the figure below.
In the Aggregated Call Tree, the ABAP Profiler creates a single trace entry for M1. The Executions column has
the value 2. Due to the fact that both calls to M1 occurred via the same call path, the ABAP Profiler aggregates
the two calls to M1. The number of Executions indicates that two executions of method M1 have been added up.
Use the Aggregated Call Tree to perform tasks such as the following:
● Analyze all usages of a procedure (such as a method) - how many executions of a method occur via a
particular call path?
● Analyze how many executions of specific events occur with the same call stack.
● Analyze which specific statements are executed and how often within a procedure, and which call stacks
occurred for outgoing calls of the procedure.
Procedure
1. To open the Aggregated Call Tree, select the relevant trace in the ABAP Traces view and choose Show
Aggregated Call Tree from the context menu.
Note
Alternatively, double-click the trace in the ABAP Traces view to open the Overview page of the trace and
then choose the Aggregated Call Tree tab.
2. Expand the call tree and identify those trace events within the tree display that you want to analyze in more
detail. You can pay special attention to the Executions and Total Time columns. See also: Understanding
Parameters in Aggregated Call Tree and Call Sequence [page 724]
Related Information
You use the Aggregated Timeline as an optional tool to visualize the aggregated trace events and time
consumed in the form of a diagram.
Prerequisites
● This feature is provided in Application Server ABAP 7.54 SP00 and higher.
● You have created an ABAP trace for your program. The trace has the status Finished.
● The ABAP trace is not aggregated. More on this: Aggregation Options in ABAP Traces [page 742]
In general, the appearance of the aggregated trace events in this graphical tool corresponds to the display in
the Aggregated Call Tree. The horizontal axis of the diagram displays the time used by each of the aggregated
traces events measured, while the vertical axis represents the call depth within a call hierarchy.
In contrast to the Aggregated Call Tree tool, however, the trace events are represented as a diagram and not as
discrete tree nodes. The advantage of the new tool is the graphical representation and the quick detection of
eye-catching patterns.
Procedure
1. To open the Aggregated Timeline tool, select the relevant trace in the ABAP Traces view and choose
Show Aggregated Timeline from the context menu.
Note
Alternatively, double-click the trace in the ABAP Traces view to open the Overview page of the trace and
then choose the Aggregated Timeline tab.
2. Select the appropriate sequence using the thumbnail view of the diagram.
You can benefit from various functions that are available within this graphical tool:
Prerequisites
● You have created an ABAP trace of your program. The trace has the status Finished.
● The ABAP trace is not aggregated. More on this: Aggregation Options in ABAP Traces [page 742]
Context
The ABAP Profiler provides you with a Call Timeline as an optional tool, which visualizes the trace events and
time consumed in form of a diagram. In general, the appearance of the trace events in this graphical tool
corresponds to the display in the Call Sequence tool. The horizontal line of the diagram displays the temporal
sequence of each of the traces events measured, while the vertical line represents the call depth within a call
hierarchy.
In contrast to the Call Sequence tool, however, the trace events are represented not as discrete tree nodes, but
as a continuous sequence. The advantage of the new tool is the graphical representation and the quick
detection of eye-catching patterns.
Procedure
1. To open the Call Timeline tool, select the relevant trace in the ABAP Traces view and choose Show Call
Timeline from the context menu.
Note
Alternatively, double-click the trace in the ABAP Traces view to open the Overview page of the trace and
then choose the Call Timeline tab.
2. Select the appropriate sequence using the thumbnail view of the diagram.
You can benefit from various functions that are available within this graphical tool:
Prerequisites
The ABAP trace must be aggregated by Call Position. More on this: Aggregation Options in ABAP Traces [page
742]
Context
You can display the call stack that leads to a particular trace event in the Aggregated Call Tree, the Call
Sequence, or in another analysis tool .
Procedure
1. Put the cursor on an entry in the Aggregated Call Tree, or the Call Sequence.
Tip
You can also display a call stack from the Condensed Hit List. If the number of stacks for hit list entry is
> 1, the ABAP Trace first shows you the individual trace events. From this display, in the Search view,
you can display the call stack of each trace entry.
2. Choose Show Call Stack from the context menu of the trace entry.
The ABAP Trace displays the call stack in a separate Properties view. From this view, you can jump to the
position of a call stack entry in the Call Sequence or Aggregated Call Tree, or you can jump into the source code
editor in order to analyze it or to set a breakpoint.
Related Information
Whenever the database portion of a runtime distribution is (unexpected) high, you may wish to find out, which
database accesses in your application have caused this to happen.
Prerequisites
You have created an ABAP trace of your ABAP program. The ABAP trace has the state Finished.
Context
The Database Accesses tool allows you to identify and analyze the top consumers during database accesses.
It provides you with a list of all database tables and table views that are used during the execution of the ABAP
program in question. In addition, detailed information for each database access, such as access type, buffer
settings, or duration of table accesses is provided.
Procedure
Results
Tip
To restrict the data in the view, you can enter the appropriate filter text or configure the view by using the
context menu in the table header.
Related Information
Here is some information on the trace parameters that are displayed in the Database Accesses tool:
Field Description
Table Name Name of database table, database view, or generated view that is used when the ABAP program in
question is run. In addition, you will also find the corresponding entries for DB accesses from
ABAP kernel and system events.
SQL Statement Kind of SQL statement from which the database access results.
Access Type Specifies whether access to the database table takes place using the ABAP SQL or the Native
SQL database interface.
Buffered Accesses Total number of buffered accesses. Since non-buffered accesses to buffered tables and views may
occur, this number is always <= the number of Executions.
Positions Number of source code positions where the related SQL statement is used to access the corre
sponding table (view).
Total Time [μs] Total time spent for all executions of the SQL statement in microseconds.
% Total Time Total time of this trace event as a percentage of the total time of the trace file.
Buffer Settings These settings specify whether or not and how the relevant table is buffered - corresponding to
the technical settings of the table. If the table is buffered, the type of buffering is specified by one
of the following options:
● Entirely buffered - All records of the table are loaded into the buffer when one record of the
table is accessed.
● Single entries buffered - Only the records of a table that are really accessed are loaded into
the buffer.
● Generically buffered - When a record of the table is accessed, all the records that have the
same generic key as this record are loaded into the buffer.
Table Type Specifies whether the table entry is a transparent table, a (standard) view, or a generated view in
the ABAP Dictionary.
Short Text Short text that has been entered for the table (view) and is displayed in the Default Language of
the ABAP project.
Context
You can customize how the ABAP Trace records ABAP program runs. Here is how to set the ABAP Trace
preferences.
Procedure
1. From the menu, open the ABAP Development Profiling Preferences page.
2. In the Advanced parameters section, set options that apply to all traces.
Results
ABAP traces that you start with Profile As ABAP Application or via a trace request will use the
preferences that you have set.
Related Information
Configuration Options
Here is detailed information on the configuration options you have for ABAP traces:
Perform aggregated meas Here you specify the aggregation mode for the ABAP trace to be created. The following val
urements?
ues are available for the aggregation mode: NONE, By Call Stack, By Call Position.
Choose No, I need the Call Sequence (large file size) if you want to create a non-aggre
gated trace in which each trace event is recorded in a separate trace entry. This level of de
tail makes a trace file larger, but it is required by the Call Sequence analysis tool.
Choose Yes, I need the Aggregated Call Tree (medium file size) if you need an aggregated
ABAP trace. For this option, the trace events are aggregated according to their call stack
(aggregation mode: By Call Stack). That means, the trace events that have exactly the
same call stack are accumulated in a single trace entry.
Choose Yes, Hit List is sufficient (small file size) if you only need the Hit List trace display.
This is an aggregated ABAP trace where trace events are aggregated by call position (aggre
gation mode: By Call Position). That means, in identical traces, events that are called identi
cally (such as method calls in a loop) are accumulated in a single trace entry.
Remember, the aggregation mode has a major impact on the file size created for the ABAP
trace and availablity of tools you can use to analyze the trace. More on this: Aggregation Op
tions in ABAP Traces [page 742]
● Procedural units, SQL: A trace records all of the ABAP modularization statements,
such as CALL METHOD and CALL FUNCTION as well as any database activity, such
as SELECT or UPDATE operations.
● Procedural units, SQL, internal tables: As above, but operations on internal tables are
also included in a trace.
● Only procedural units: A trace includes only ABAP modularization statements, like
CALL METHOD or CALL FUNCTION.
● Custom statements: Opens the checkboxes under Details. Here you can switch on or
off tracing of the various categories of ABAP statements and events that the ABAP
Trace is able to capture.
Options not described in the rows above are as follows:
○ Dynpro events traces events in the special processing for traditional ABAP Dynpro
screens.
○ Other ABAP Events switches on tracing of all traceable ABAP statements and
events other than those specified above. This includes, for example, data transfer
statements (READ DATASET, TRANSFER) and other statements, such as
ASSIGN, MESSAGE, and IMPORT.
○ System and kernel events switches on tracing of ABAP infrastructure code (pro
grams of the ABAP category system programs) as well as calls from ABAP to ker
nel functions.
The ABAP Trace measures the complete runtime of a program, no matter which statements
are traced. What changes with your choices is the level of detail in the trace. The full runtime
of a method is always shown in a trace; the number of different trace records within the
method changes with your statement tracing choices.
When should the trace Immediately starts tracing when you choose Profile As ABAP Application .
start?
If you specify Explicitly switch on and off (for example, within Debugger), you can trace dedi
cated code sequences of your request. The trace for a code sequence can be switched on
and off using the ABAP statement SET RUN TIME ANALYZER {ON|OFF} or the ABAP
Debugger.
More on this: Starting and Stopping the ABAP Profiler in the Debugger [page 703]
The aggregation option specifies whether or how the ABAP trace data is aggregated in the trace file. The
aggregation option has a major impact on file size and the availability of tools for analyzing the ABAP trace:
Aggregation Options
Aggregation
Option Meaning File Size Tool Availability
NONE Each trace event is stored Huge trace Module Hit List
individually in one trace en file, linear in
Hit List
try. crease with
request run Aggregated Call
time Tree
Call Sequence
Call Timeline
Aggregated Call
Tree
By Call Posi Trace events are aggregated Small file Hit List
tion
by their call position. No size, most
stack information available. compact for
mat
4.3.2.5 Glossary
Term Meaning
Using this wizard, you can launch the ABAP Profiler for various object types. Independently
of any context, you can select an arbitrary development object to be profiled.
ABAP Profiling Perspective Eclipse perspective that mainly includes tools that focus on profiling activities, such as
ABAP Traces and ABAP Trace Request views.
Each ABAP trace corresponds to an ABAP trace file generated by the ABAP runtime. ABAP
traces are listed in the ABAP Traces view.
(ABAP) Trace Request A trace request enables profiling of an ABAP request such as a program, transaction, HTTP
request, RFC call, or a background process, whenever its execution is triggered in the back-
end system.
ABAP Trace Request View One of the main tools within the ABAP Profiling perspective
ABAP Traces View View that is used to access individual ABAP Traces for each ABAP project that is opened in
the user’s workspace.
The user can specify the aggregation option for each ABAP trace to be created. The follow
ing values are available for the aggregation: NONE, By Call Stack, By Call Position.
Analysis tools provide the user with different views on the ABAP Trace. It includes the follow
ing tools: Condensed Hit List, Hit List, Aggregated Call Tree, Call Sequence, Call Timeline,
Database Accesses, and SQL Trace.
The profile configuration allows the user to re-run the ABAP Profiler with predefined settings
Requester (of an ABAP User who launches the ABAP Profiler in order to create an ABAP Trace.
Trace)
The SQL Trace can be switched on, in addition to the ABAP Trace, to record the database
activities of the executing program.
to create ABAP Trace User action: allows the user to create an ABAP Trace (for example, by means of the ABAP
Profiler wizard)
Synonym: to profile
to create ABAP Trace Re User action: enables the user to tell the ABAP Profiler to wait until a program runs and then
quest
automatically profile its execution.
Trace Event An ABAP statement or other operation (a database operation, for example) for which the
ABAP Profiler records discrete performance data
Each individual trace event that has been recorded allows you to analyze the runtime of the
underlying ABAP statement or other operation.
Trace Parameters Parameters that are used to analyze ABAP traces in analysis tools
User (Application User) User who starts the execution of the object or application
In ABAP Development Tools (ADT), the SQL trace allows you to see how ABAP SQL statements that you use in
ABAP source code are converted to standard SQL statements, and the parameters with which the embedded
SQL statements are passed to the database system.
The SQL trace can be helpful to analyze performance issues or functional errors.
You can create and display the SQL trace in the following ways:
● Using the SQL Trace and the Technical Monitoring Cockpit [page 745] to create an SQL trace in ADT and
to analyze it in an SAP Fiori-based UI in your default Internet browser
● Using the SQL Trace Tool and the ABAP Profiler [page 747] to create an SQL trace that is part of an ABAP
trace and analyze it in the integrated SAP GUI in ADT
You can create SQL trace and display it in the Technical Monitoring Cockpit. This enables you to analyze the
performance of SQL statements.
Prerequisites
This functionality is supported as of Application Server ABAP 7.54 SP00 and higher.
Before you can investigate an issue using the SQL trace tool, you need to activate the creation of a SQL trace.
To do this, see step 3 below.
Context
Results
The Technical Monitoring Cockpit is opened in your default Internet browser. It displays the content of the SQL
trace. You can start your analysis from here.
Recommendation
SAP recommends to deactivate SQL trace after your analysis. Otherwise, data is collected all the time.
Related Information
You can create an SQL trace file and display its content in the integrated SAP GUI. This enables you to exactly
see how the system handles database requests.
Prerequisites
The trace option Enable SQL trace is switched on for the relevant trace before you start the ABAP Profiler.
Procedure
Results
The system displays the Trace List tool in the SAP GUI window.
Related Information
Prerequisites
In order to use the logpoint functionality, you need in the relevant system:
● As a minimum, the display authorization for object S_DEVELOP with activity: 03 to be able to launch the
ABAP source editor for displaying the ABAP source code.
● An additional authorization for object S_DYNLGPTS that provides you with advanced logging functionality,
including...
○ Switching on / off traces (value TRACING for field OBJNAME)
○ Analyzing ABAP variables (value VARIABLES for field OBJNAME)
More: Read the documentation for Authorization Object S_DYNLGPTS for Logpoints [page 867].
Note
You can use the advanced logging functionality if you already have the corresponding authorizations for
the ABAP Debugger or for the transaction ST05.
Developer-Relevant Activities
Related Information
Prerequisites
In general, you can set dynamic logpoints for each source code line that contains an executable ABAP
statement. When the logpoint is reached during program execution, the logpoint is evaluated. The logpoint
evaluation first checks the condition. If the condition is fulfilled, a log entry is written according to the specified
logpoint parameters.
Procedure
Setting Logpoints from the Ruler in the ABAP Source Code Editor
1. Position the cursor within the ruler (left bar) in the source editor at the line that contains the executable
ABAP statement of your interest.
2. Open the context menu and choose Add Logpoint.
Setting logpoints from the ruler in the ABAP source code editor
3. In the wizard page that appears, specify the parameters for the logpoint to be created.
Activity
So that you can use logpoints in the context of various use cases, the wizard provides you with a set of
predefined activity options. You can select one of the predefined activity options or apply the logpoint
syntax for a user-defined logpoint:
Note
Only variables with elementary data types (for exam
ple: variables that can be used within a WRITE state
ment) are valid variables here.
Log Call Stacks With this option, you can set the logpoint for a program
line where you are interested to know which call units
(methods, functions, forms, or events) are the callers. So,
in particular, you want to know which different call stacks
lead to the program line for which the logpoint is defined.
Using this activity option, you can switch on the SQL trace
for an individual SQL statement in order to analyze per
formance issues in detail.
Table Buffer Trace for Current Statement Using this activity, you have the option to switch on the ta
ble buffer trace This option is valid if the selected code line
comprises an ABAP SQL statement that refers to a buf
fered database table.
User-Defined Logging This option allows you to specify the logpoint using the
logpoint syntax for the following Parameters:
○ Key Definition
More on this: Key Definition in Logpoints [page 755]
○ Field Values
More on this: Field Values in Logpoints [page 756]
○ Optional Condition
More on this: Conditions in Logpoints [page 754]
Example:
Description
In the Description field, you have the option to provide a text that describes the meaning or the usage
context of the logpoint to be created.
Tip
Writing a description might especially be necessary if you want to set multiple logpoints in a single
program, or even multiple logpoints for one and the same program line.
Activation
You can specify the following parameters for the activation of the logpoint:
Parameter Meaning
Active for User You have the option to restrict logpoint activation for a
specific user in your system. Using this restriction you can
ensure that log entries will only be evaluated when the
specific user runs the corresponding program.
Active Until Point of time when the logpoint will be deactivated auto
matically (activation expiry)
Default Value: 24 h
Note
In addition to this implicit deactivation, you have the
option to deactivate the logpoint explicitly at any time:
See also: Deactivating Logpoints
Delete Logpoint After Deactivation [days] For an active logpoint: number of days after activation ex
pirywhen the logpoint will be deleted automatically.
Note
In addition to this implicit deletion, you have the op
tion to delete the logpoint explicitly: See also: Deleting
Logpoints
Max. Log Events for Internal Session To ensure stable system performance, you can limit the
maximum number of evaluations for the particular dy
namic logpoint within the current internal session (roll
area). Evaluation then stops after the maximum number
of log events.
Results
You have set a dynamic logpoint that is active for the specified code line. After the logpoint is created, a
dedicated marker is visible in the ruler of the source editor.
In addition, the Logpoints view will be opened where you can display and manage dynamic logpoints defined for
each of your ABAP projects.
Remember
This logpoint applies whenever you start the corresponding APAP program.
The condition is evaluated at runtime, whenever the source code position of the dynamic logpoint is reached. If
the condition is fulfilled (evaluates to true), the dynamic logpoint delivers results according to the content of
the KEY and FIELDS entries of the specific dynamic logpoint. Otherwise, if the condition is not fulfilled, the
logpoint provides no results at all.
Note
The condition has an ABAP-like syntax, where you can use ABAP data objects that are valid at the source
position at runtime and also the following ABAP operators:
Similar to ABAP syntax, you can also use the operators NOT, AND,OR and brackets to combine elementary
conditions.
Examples
sy-subrc <> 0
Similar to the SUBKEY addition of the (static) LOG-POINT statement in ABAP, the key definition in dynamic
logpoints is used for aggregation of the result set. While in static logpoints the SUBKEY has to be specified
using a single character-like ABAP data object, in dynamic logpoints you can specify a list of data objects. For
the key definition of the dynamic logpoint, you can enter a list of ABAP data objects (including literals), which
are valid at the current source code position at runtime. The particular data objects in the list have to be
separated by a SPACE or comma. In addition, you can specify special built-in functions, which may be called to
execute a specific functionality (for example: trace). Each built-in function has a specific return value that is
added to the key definition.
A syntactical validation of the given key definition is performed, when the dynamic logpoint is created.
Logpoint events with identical KEY values are aggregated into one and the same log entry (result). A new log
entry will only be created after the key value has changed.
Restriction
Do not use references, internal tables, or deep structures in the key definition as they cannot be converted
into a STRING representation. The resulting key of a dynamic logpoint is built by concatenating the STRING
representation of all specified data objects in the key definition. The STRING representation of each data
object is determined by following the ABAP conversion semantics.
Examples:
sy-uname sy-host
Related Information
Using this logpoint parameter, you can specify a list of ABAP data objects, except literals, that are valid at the
current source code position at runtime. The particular ABAP data objects in the list have to be separated by a
SPACE or comma.
According to the FIELDS addition of the (static) LOG-POINT statement in ABAP, the Field Values in dynamic
logpoints are used in log results. One or multiple Field Values in dynamic logpoints are written for each
aggregated log entry.
A log entry is only updated for a logpoint event with identical Key Definition. Otherwise, if the Key Definition of
the log event differs from the previous one, a new log entry is created.
In contrast to the Key Definition, you can also specify internal tables and deep structures as data objects for
Field Values. In addition, you can add special built-in functions to the results list. Each built-in function has a
specific return value that is added to the log results.
Restriction
You cannot use literals or any kind of references (TYPE REF TO <object> or TYPE REF TO DATA) as Field
Values for logpoints.
Remember
In case of aggregated log entries the log result contains the values of the last log event.
Examples:
sy-uname sy-host
stack( ), itab
Related Information
You can use the Logpoints view to display and manage dynamic logpoints defined for each project.
The Logpoints view provides you with an overview of the dynamic logpoints that have been created by a
predefined user (default: the user currently logged on) of all ABAP projects in the workspace. For each ABAP
project, a list of all dynamic logpoints that have been defined by a user is displayed. For each logpoint, you can
view the details of the ABAP program and the location affected, as well as the status information.
Logpoints view
For each ABAP project, you can perform the following actions using the context menu in the view:
You can perform the following actions using the context menu:
You can use the properties dialog to view or change properties of existing logpoints.
Context
● The logpoint definition (what is the logpoint condition, whether and how results should be aggregated,
and so on)
● The activation status of the logpoint.
Sometimes you might want to change the logpoint at a later point in time however.
Remember
Starting with the ADT version 2.83, you have the option of changing the logpoint definition as well. Note
however that doing this deletes all previously collected log entries.
Procedure
Tip
Alternatively, you can access the logpoint definition from the ruler in the source code editor.
Results
All previously collected log entries of the changed logpoint are deleted. You can reproduce the deletion in the
Logpoints view, since the number of Log Events is reset (after refresh) to 0 for the related logpoint.
Related Information
Context
Starting with the ADT version 2.83, you have the option of using copy, cut and paste functions on logpoints.
Procedure
Tip
You can also copy the definition and the activation status of an existing logpoint into the logpoint
clipboard for later reuse as a kind of template. This can be particularly useful if you want to create
multiple logpoints that are similar.
3. Set the cursor at the target line in the source code editor.
4. Open the context menu and choose Paste Logpoint... .
5. In the dialog screen that appears, enter the logpoint properties and choose Finish.
Context
Whenever you wish to suppress logging during program execution, but do not yet want to delete the associated
logpoint, you have the option to disable the logpoint. An inactive logpoint is ignored during program execution.
Procedure
Alternatively, you can deactivate a logoint from the ruler in the source code editor.
Results
The new status is visualized with a marker at the logpoint position in the ruler of the source editor.
Related Information
Context
Only active logpoints are evaluated at runtime, whereas inactive logpoints are ignored during program
execution.
Procedure
Context
In addition to implicit deletion, you have the option to delete logpoints explicitly.
Procedure
Tip
Alternatively, you can delete a logoint from the ruler in the source code editor.
Results
As a result of this operation, the dynamic logpoint is removed from the ABAP program and the associated log
entries are deleted in the current system.
Related Information
Logpoints are commonly used for writing a log entry when the relevant ABAP program reaches a certain point.
Remember
1. In the source code of the program, position the cursor at the code line you wish to analyze in detail.
2. Set the logpoint at the selected source code line and specify the logpoint parameter.
3. Run the relevant ABAP program if this has not yet already been done.
4. Collect the currently available logs from all servers of the system.
5. View the relevant log entries.
The two simple examples below show how the resulting log entries are to be interpreted.
Let’s assume that the position to be examined in the program is a DO statement with which squares of
numbers are to be issued.
REPORT Z_DEMO_SIMPLE_LP.
DATA square TYPE i.
...
DO 10 TIMES.
square = ipow( base = sy-index exp = 2 ).
cl_demo_output=>write( |{ sy-index } { square }| ).
ENDDO.
...
As Activity, we select the option User-Defined Logging, and specify the Key Definition, Field Values and Optional
Condition as follows:
User-defined logpoint
Due to the condition defined in the example, the result of the log is limited to two entries, which are represented
by the key values [8] and [9]. The results display contains as uppermost node the Generation Time to which the
values of the key are assigned (through the variable SY-INDEX). For each key value you have, in turn, the
defined Field Values (SY-INDEX and SQUARE), whose results are issued in the Field Value column.
The following program demonstrates the call of one and the same routine over two different call paths. With
this simple example, you learn how these different call paths are mirrored in the log results and how you can
use the log information for the call stack analysis.
REPORT Z_DEMO_CALL_STACK.
DO 10 TIMES.
CASE sy-index.
WHEN 1.
PERFORM delegate_call.
WHEN OTHERS.
PERFORM do_something.
ENDCASE.
ENDDO.
FORM do_something.
MESSAGE 'Subroutine sucessfully executed' TYPE 'S'.
ENDFORM.
FORM delegate_call.
PERFORM do_something.
ENDFORM.
As Activity we choose the option Log Call Stacks and add the Optional Condition, as follows, in order to restrict
the number of result entries:
As our result we get two different stacks, which represent the different call paths. In the first case (SY-INDEX =
1) 3 stack entries are counted, while for the other values (SY-INDEX > 1) 2 entries are counted. This
corresponds exactly to the two call chains for the routine called in the example routine. As we limit the log
Note
The prefined activity Log Call Stacks implicitely uses the built-in function STACK_HASH( ) [page 861] as a
key value. As STACK_HASH( ) delivers a different hash values for all different call stacks, only log events
with different call stacks are aggregated.
Restriction
Much like for static logpoints, the size of each data object stored in one single trace event of dynamic
logpoints is limited by the profile parameter abap/aab_log_field_size_limit. The value of the profile
parameter specifies the size in bytes. The default value is 1.024 bytes. When a log entry is generated, the
content of each data object is truncated when this limit is reached. This restriction affects Field Values in
Logpoints [page 756] of internal tables, large structures, long fields of type X/C, and long strings.
Context
You have the option of deleting the accumulated log entries of a dynamic logpoints without deleting the
logpoint.
Procedure
Tip
Alternatively, you can access the logpoint definition from the ruler in the ABAP source code editor.
Results
All previously collected log entries are of the related logpoint are deleted. You can reproduce the deletion in the
Logpoints view, since the number of Log Events is reset (after refresh) to 0 for the related logpoint.
Related Information
Prerequisites
The program that you are running has just terminated because of a runtime error and has written a short
dump.
Context
This section shows you how to display the information about the short dump and use it to analyze the error.
If an ABAP program fails with a short dump, the system responds by displaying the following dialog:
Procedure
The system notifies you of a short dump even if the short dump occurs during an ABAP Unit run. [page
628]. You can navigate to the short dump from the ABAP Unit view in the Failure Trace by clicking the link
Show Runtime Error.
Related Information
As of AS ABAP 7.53 runtime errors can be displayed in ABAP Runtime Error Viewer.
● If a runtime error occurs when executing ABAP programs, a dialog appears in the bottom right corner.
Click Show to display the error.
● In the Feed Reader view, double-click the runtime error entry.
● If a runtime error occurred during an ABAP Unit test run, click the link Show Runtime Error in the Failure
Trace section of the ABAP Unit view.
Related Information
You can use the debugger to inspect a dump only if you have started a program (executable program, class,
and so on) from the ABAP Development Tools, and it has terminated with a short dump.
While the dialog is shown, the program context still exists. Click Debug to start an analysis with the post-
mortem debugger.
Since the program has been terminated, you cannot use the stepping function in the post-mortem debugger.
However, all of the variables and other runtime information in the program context are available.
You can quit the debugger by clicking the icon in the main tool bar.
Note
Analysis of dumps using the post-mortem debugger is available as of SAP NetWeaver 7.4.
Related Information
Context
When you subscribe to feeds (Subscribing to Feeds from ABAP Repository [page 558]), you can define rules
for displaying ABAP runtime errors.
Procedure
Info
The project that you selected in the Feed Reader view is automatically selected. You can change it if
needed.
○ Select Any if you want to join rules by OR logic. The feed reports all short dumps that meet any of the
rules.
○ Select All if all rules must apply and you want to join them by AND logic.
An example of a feed query: Report any runtime errors that a) contain TYPE_INCONSISTENCY in their names or b)
occurred in the session of the A2ETEST user on 01.03.2018 at 10:00 or later.
If you do not define a filter, the feed reports all runtime errors that occur in the ABAP project.
Tip
You can quickly define identical feeds for runtime errors in your ABAP Projects. To do so, first set up one
feed. Then choose theCopy query selection to clipboard icon . Now create a new runtime error feed or
choose Edit feed... for an existing feed from the context menu. On the Feed Query Configuration dialog,
choose the Paste query selection from clipboard icon . The ADT applies the configuration that you
copied to the new feed.
Related Information
Accessibility features help ABAP developers with disabillities to work with and to use the benefits of ABAP
Development Tools (ADT).
Context
The central idea is to provide the functionalities of ADT to all ABAP developers, independently of possible
disabillities. So, SAP has overworked the application UI in order to enable tools to read out text from the user
interface. In addition, Eclipse and SAP provide specific configurations and preferences to adjust ADT to your
needs.
In the current client version, you have following possibilities to utilize accessibility features:
Related Information
You can define preferences in order to adjust ABAP Development Tools (ADT) to the required usage.
Context
Note
The following preference paths are created on the basis of Eclipse 4.4 (Luna). They might be different in
later versions.
Procedure
To open the Preferences page, choose Windows Preferences from the menu bar.
You can resize fonts for displaying text in bigger letters to improve readability.
Context
Recommendation
SAP recommends that you use the standard Eclipse themes and the Windows display settings to resize
fonts in Eclipse.
Procedure
1. In the General Appearance Preferences page, choose one of the following themes from the list box:
○ Default
○ Classic
○ Windows 7
Note
Use one of the themes from the list above. Other themes might not work for all controls.
Results
In ADT, the larger font size should now be available on all text-based controls.
Related Information
You can adjust the color of the displayed text to suit your own needs.
Context
Eclipse provides options for changing the colors - for example, for the following features:
Procedure
1. To configure syntax coloring in general, for example, for ABAP source code and CDS/DDL objects, open
the General Appearance Colors and Fonts Preferences page.
a. Choose the theme from the Theme listbox.
b. Then choose the corresponding tree element and define the color.
2. To configure colors at ABAP keyword level or the sequence of several ABAP keywords used within a
statement, open the ABAP Development Editors Source Code Editors ABAP Keyword Colors
Preferences page.
a. Change the corresponding color.
Related Information
In Eclipse, you can work with the higher contrast mode of your operating system. This enables you to improve
readability, for example.
Context
When you are using the High Contrast Mode of your operating system, SAP recommends that you adapt the
preferences, as follows, to suit your needs:
Procedure
1. To open the Preferences page, choose Windows Preferences from the menu bar.
2. Open the General Editors Text Editors Preferences page and deselect the Highlight current line
checkbox.
3. To adapt the appearance of the ABAP occurrence annotations (ABAP Occurrences, ABAP Indirect
Occurrences, ABAP Tentative Occurrences and ABAP Write Occurrences), open the General Editors
Text Editors Annotations Preferences page.
By default, the ABAP occurrence annotations are highlighted with a grey background color.
a. To enable these annotations - for example, for the high contrast mode, choose Underlined in the Text as
droplist box.
b. To contrast annotations from the background, define the underline color by choosing the
corresponding color in the Color field.
A screen reader is an additional application that transforms displayed text into an electronic voice. As a result,
the user can follow this voice.
Avoids appearance of the progress indi General Always run in background checkbox
cation dialogs, which require some time
to get read by the screen reader
Enables the screen reader to read more ABAP Development Additional Enable additional accessibility
information in table controls, and so on information checkbox
Accessibility Information
Opens the embedded SAP GUI trans ABAP Development SAP GUI Open SAP GUI as separate window
actions as a separate window checkbox
Integration
Opens status messages in a dialog ABAP Development Show error status messages also in a
dialog box and Show information status
Notifications
Note messages also in a dialog box check
boxes
Status messages are also displayed
in the status bar.
To reduce the number of entries in the main menu and toolbar, you can enable or disable entries in the
Customize Perspective dialog. Open it through Window Customize Perspective... from the menu bar.
Then, select the relevant checkboxes in the tabs Tool Bar Visibility, Menu Visibility, and Shortcuts.
A screen reader is a software application that identifies and interprets textual content on the UI. A screen
reader reads this content to the user through an audio function.
Context
ABAP Development Tools (ADT) provides features for working efficiently with a screen reader. Eclipse also
provides shortcuts for many operations.
Procedure
1. To open a window showing a list of all shortcuts that are currently active, choose Ctrl + Shift + L .
Note
Usually this list is too long to read through all of the shortcuts.
2. To open the Keys Preference page, choose the same shorcut again.
Here the cursor is automatically positioned on a filter field.
3. Search for the command you are looking for.
Note
If you do not find a shortcut for a particular command, you can define your own shortcut in this
Preference page. To do this, select the command in the Command list. In the Binding entry field,
position the cursor and choose the desired shortcut on the keyboard. Choose Ok to apply the new
shortcut.
Related Information
Ecplise is a development environment that provides a large number of views and editors side by side. This kind
of display requires knowledge of the keyboard controls in order to focus the required view.
Eclipse offers commands to work efficiently with the keyboard when many editors and views are opened side
by side.
Context
By default, Eclipse opens editors stacked in the Editor area. Around this Editor area, views are arranged in View
areas that are grouped on the left, bottom, and right. Views might be stacked in these View areas.
Procedure
Use the Window Navigation menu to find functions to manage editors and views.
Note
Procedure
Note
You can also use this dialog to manage your open editors. You can do this by proceeding as follows:
Results
Context
Procedure
1. To open a view switcher window with a list of views given in the last used order, choose Ctrl + F7 .
Note
As long as you choose and hold the Ctrl key and choose again F7 key. The selection will go to the
next view until you release the key.
Note
If this editor is invisible, it will automatically become visible after choosing F12 .
Eclipse does not provide default key combinations to move focus into the properties view or variables
view.
Recommendation
SAP recommends adding customer-specific shortcuts for frequently used views to the corresponding
Show View commands.
Each view has a character assigned in this dialog. Example: Show View (Breakpoints): B
To open the corresponding view directly without searching through the list, choose Alt + Shift + Q .
As soon as the dialog is opened, choose this character.
6. To search and open a view from the Show View dialog, choose Enter .
Context
Procedure
To switch to the next or previous perspective, choose the Ctrl + F8 and Shift + Ctrl + F8 shortcuts,
respectively.
Context
Note
All editors are stacked in the editor area by default. If you put one of the editors into full screen, the entire
editor area is put into full screen.
1. To toggle to full screen, choose the Ctrl + M shortcut for each editor or view.
2. To restore the windows to the previous state, choose the same shortcut again.
3. To switch to another editor, open the development object using the Ctrl + Shift + A shortcut.
4. To open it also in full screen mode or to navigate to it, choose the Ctrl F6 shortcut
If you now open a view, for example, using Ctrl + F7 , the view is opened and focused. The view now
behaves much like a modal dialog.
5. To close a view, choose Esc .
Results
Context
You have, for example, the following possibilities to create new objects:
Note
Procedure
1. In the input fields referencing another object , you can choose Ctrl + Space to use the content assist
functionality.
The selected entry is added to the input field. Continue choosing the relevant input entries.
Related Information
To edit an existing development object, you need to open it from the database.
Context
You can open development objects, for example, from the Project Explorer view or through the Open ABAP
Development Objects dialog.
In the Project Explorer view, you will find your ABAP projects with a tree of ABAP packages and objects.
Note
The content of the project explorer tree is loaded asynchronously. Occasionally, the screen reader
announces a Loading repository tree... node. This node will be replaced by the real content as soon as it is
available.
Procedure
1. To open a development object through the Project Explorer view, navigate to the corresponding node in the
tree and choose Enter.
2. As an alternative to the Project Explorer, you can use the Open ABAP Development Objects dialog. For this,
choose the Ctrl + Shift + A shortcut.
Results
If there is no editor integrated for a development object, the SAP GUI is opened and ready for editing.
Related Information
You can use the keyboard to navigate, for example, through source code elements of an opened development
object.
Context
Procedure
Note
In general, Alt + Left / Right allows you to navigate through the navigation stack.
3. To navigate from the beginning statement (like a method, if, or loop) to the corresponding end statement
(endmethod, endif, or endloop), use F3 .
4. To navigate through annotations, choose the Next Annotation (Ctrl .) and Previous Annotation (Ctrl ,)
commands.
Note
There are many different annotation types. You can find them on the General Editors Text Editors
Annotations Preferences page. For each annotation you can select whether it should be included in
the Next / Previous Annotation navigation.
Recommendation
SAP recommends using these shortcuts, especially for the ABAP annotations (like block highlighting,
occurrences, and coverage).
Each source editor in Eclipse has a ruler column next to the source code. It displays information about the
corresponding line. Currently, it is not possible to focus the ruler.
Context
● Line number
● Possible breakpoint
● Bookmark
● Task
● Indicator for syntax errors or warnings
● Indicator for ABAP enhancements
The following methods can be used to access and change the ruler content:
Procedure
The element info displays, for example, the type of a variable or the parameters of a method.
Procedure
To open the ABAP Element Info view, position the cursor on an identifier and choose F2 .
Results
This will open and focus a popup showing the information available for this element. The screen reader starts
reading the information. The information is shown as HTML.
Note
When the cursor is located inside a method, you can retrieve the element info for this method through Alt
+ F2 . A popup is then opened and focused, in this case showing the parameters of the method again.
Related Information
A screen reader can read status messages for errors and other information that is displayed in dialogs.
Context
To make such information accessible for the screen reader, you need to display it in a dialog. To do this,
proceed as follows:
Procedure
1. Open the Preferences page, choose Windows Preferences from the menu bar.
Results
If there is a specific occurrence where a status or an error message needs to be displayed, its content is
opened in a dialog. From here, the screen has access to the text on the user interface and can read it.
Related Information
The outline displays the structure of the currently selected or edited object – for example, all its attributes,
methods, and other members of a class.
Context
The outline can be shown directly in the editor or in the Outline view. In this view, you can:
● Use filters
● Sort options from the toolbar
● Link with the navigation tools in the editor.
Procedure
Related Information
If you are not sure whether the word at the current cursor position is a keyword, identifier, comment or literal,
you can use the shortcut of your screen reader for reading colors.
Context
The Eclipse color settings might not be accessible through the screen reader.
Color Type
Blue Keyword
Black Identifier
Limegreen Literal
Grey Comment
Procedure
To read out the color, use the shortcut of your screen reader for reading colors. For example, use Insert 5 for
JAWS.
Results
The screen reader reads the name of the foreground color and the background color.
You can find and edit the properties of an object (for example, description, author, created at, package, and so
on) in the Properties view.
Context
The Properties view is always linked to the editor that is currently open. When you open the Properties view, the
focus is in the General tab on the Package field.
Procedure
To access the tab control and switch to the Specific tab, use the Shift + Tab shortcut.
You can compare a development object, for example, between two ABAP systems or with older versions of the
object. This enables you to investigate differences between both versions.
Context
Note
No shortcuts are defined for these copy actions by default, but you can define your own in the
Preferences.
Related Information
You can adopt the specific functions and utilities for efficiently creating, editing, and navigating in ABAP source
code in accordance with your needs.
Related Information
The following section describes the editing features that are the same in all editors:
Procedure
1. An editor is locked immediately when you start editing. To unlock the editor again, choose Ctrl + U . You
will be asked whether you want to discard your changes.
2. The syntax check is executed automatically in Eclipse. When you stop typing, a syntax check is triggered,
and in normally less than a second the syntax check result is available in the Problems view.
3. To activate an object, choose Ctrl + F3 or the context menu in the editor.
4. In Eclipse, the name of the pretty printer is Source formatter. You can execute the source formatter by
choosing Source Format from the menu or the context menu of an editor, or by choosing the Shift F1
shortcut.
Related Information
In the ABAP source code editor, the code completion proposes valid ABAP keywords and identifiers to you that
can be inserted within the source code at your current position.
Procedure
Quick assists, like renaming an attribute or defining a local variable, help you to change ABAP source code in a
semi-automated way.
Context
Procedure
Like with code completion, there is an additional popup that shows more information for each quick assist.
Currently, screen readers might not be able to access this popup in Eclipse. Therefore, ADT provides the
Quick Assist view as an alternative. This view can be linked with the current source code position to show
the available quick assists and the additional information at this position.
Related Information
If you open a development object for which there is no editor provided in Eclipse, the object is opened in SAP
GUI.
Context
By default, SAP GUI is opened in a new editor tab. The focus is then set on the command field in SAP GUI.
Recommendation
To improve focus handling and interaction between SAP GUI and screen readers, we recommend opening
SAP GUI in a separate window.
Note
This checkbox is only provided for SAP GUI for Windows. To open a new window in SAP GUI for Java
in a new editor tab, you can open the relevant object in SAP GUI and enter the /o prefix for the
relevant transaction code.
Procedure
1. If you have lost the focus in a SAP GUI that is opened in an editor tab, choose Ctrl + / to bring the focus
back to the command field where you can enter transaction codes.
2. Enter /nex and confirm with Enter.
Results
The editor tab with the SAP GUI is closed. The focus is set on the previous editor, view, or window you worked
with previously.
Related Information
ABAP Development Tools (ADT) supports ABAP debugging. However, fewer operations than in the SAP GUI
might trigger prolongation of the debug session timeout.
Context
Eclipse does not interact with the debugger when you scroll through ABAP source code and navigate between
different locations. If you do not interact with the debugger for some time, the common timeout settings of the
system will terminate the debugged process.
Note
The timeout is configured as the system profile parameter (rdisp/max_wprun_time). The value is set by
default between 10 and 20 minutes.
Procedure
To avoid losing the debugged process, interact with the debugger or trigger a dummy interaction such as the
synchronization of breakpoints. To do this, choose Ctrl + Alt + B within any editor of the corresponding
project.
Related Information
ABAP Unit is a unit-testing framework that is integrated into the ABAP language.
Procedure
Related Information
ABAP Development Tools provides an Eclipse-based editor for the following development objects:
Avai
labl
e Avai Avai
sinc labl labl
e e e
SAP sinc sinc Available
Net e e since SAP
Wea SAP SAP NetWeaver Available Available Available
ver Net Net AS for since SAP since since Applica
7.3 Wea Wea ABAP 7.51 NetWeaver Applicatio Applicatio tion
EHP ver ver innovation AS for n Server n Server Server
Use Case Development Object 1 7.4 7.5 package ABAP 7.52 ABAP 7.53 ABAP 7.54 ABAP 7.55
Structure - - SP0
0
Domain - - - SP01
Consumer-Mapping - SP0
2
Contract - SP0
2
Note
Related Information
The following shortcuts are highly frequently used for working with development objects in ABAP Development
Tools.
Note
The availability of the shortcuts depends on the user interface area you are currently working.
Select Ctrl + Shift + L to open a list that displays the area-specific keyboard shortcuts.
The subsequent lists are designed for using the operating systems Microsoft Windows© or Linux©. If you
are working with Apple Mac©, you might need to choose the Command tab instead of Ctrl.
Function Shortcut
Close Ctrl + W
Save Ctrl + S
Function Shortcut
Show bookmarks, breakpoints, and tasks of the focused editor row Alt + Ctrl + P
Show the properties of the currently focused object or file Shift + Alt +
P
Show bookmarks, breakpoints, and tasks of the focused editor row Shift + Alt +
P
Show the Variable view in the ABAP debugger and to set the focus into the view. Shift + Alt +
Q/V
Note
Switch back to the source by using F12 .
Set the View menu, for text editors the ruler context menu is shown, or add bookmarks, break Ctrl + F10
points, or tasks
Show bookmarks, breakpoints, and tasks of the focused editor row Alt + Ctrl +
F10
Adopt the size of the current editor, view, and so on to the maximum screen size Ctrl + M
Function Shortcut
Select the previous open editor you want to navigate to Ctrl + Shift +
F6
Move the keyboard focus into the top level editor or the active editor tab F12
Function Shortcut
Function Shortcut
Function Shortcut
Function Shortcut
Close Ctrl + F4
This documentation describes the syntax that is used for editing classic ABAP Dictionary objects within ABAP
Development Tools (ADT).
Note
Detailed concept information about classic objects in ABAP Dictionary can be found in the ABAP Keyword
Documentation.
Related Information
5.3.1 Structures
Syntax Form
Definition
A structure is a data type that consists of components. Each component can be an elementary type (either
through a data element or the specification of the data type and length in the structure definition), another
structure, or a table type. A structure can be nested to any depth.
Notes
In ABAP Development Tools (ADT), you can create and edit structures in the ABAP source code editor.
Use
Example
In ABAP Development Tools (ADT), you can add the following annotations to structures:
Note
Both annotations are mandatory when you are creating or editing structures in ADT.
Syntax Form
@AbapCatalog.enhancementCategory : #NOT_EXTENSIBLE |
#NOT_CLASSIFIED |
#EXTENSIBLE_CHARACTER |
#EXTENSIBLE_CHARACTER_NUMERIC |
#EXTENSIBLE_ANY
Definition
SAP's structures and database tables can be enhanced by customers using customizing includes or append
structures.
Use
You use enhancement categories to predefine warnings to be displayed if your changes result in n problems.
You can use the following values to define enhancement categories in the source code:
Note
This value is only provided for structures that already exist. Therefore, it should not be used
when creating new structures or changing existing ones.
Note
This is the default value for creating structures in ADT.
#EXTENSIBLE_CHARA All structure/database table components and their enhancements must be character-like and flat.
CTER
#EXTENSIBLE_CHARA All structure/database table components and their enhancements must be flat.
CTER_NUMERIC
#EXTENSIBLE_ANY All structure/database table components and their enhancements can have any kind of data type.
Related Information
Syntax Form
@EndUserText.label: 'short_description'
Definition
The short text is used as an explanatory text for the entire structure/database table.
These texts are always displayed in the original language. If you change any text, the text is saved in the original
language as well.
If the logon language differs from the original language of the structure, a warning is displayed in the editor.
Related Information
Syntax Form
@AbapCatalog.decfloat.outputStyle : #NORMAL |
#SIGN_RIGHT |
#SCALE_PRESERVING |
#SCIENTIFIC |
#SCIENTIFIC_WITH_LEADING_ZERO |
#SCALE_PRESERVING_SIENTIFIC |
#ENGINEERING
Definition
This value determines the output style of a decimal floating point number.
You can use the following values to define the output style of a decimal floating point number in the source
code:
Note
This is the default value.
#SCIENTIFIC Scientific
#ENGINEERING Engineering
A component is, for example, a subunit of a structure. The components of a structure can be elementary (any
data type), a structure itself, an internal table, or a reference type.
Components can be created from scratch [page 807] or by including them from a structure [page 808] that
already exists.
Syntax Form
Syntax Form
Definition
A component always consists of a name and its type information, which can be followed optionally by a foreign
key or a value help assignment.
Notes
You can use the optional keywords REFERENCE TO for defining reference-like components directly in the
structure. Data references can be defined by a reference to any data type in ABAP Dictionary or to the generic
type DATA. Object references can be defined by a reference to classes or interfaces in the class library or to the
generic type OBJECT.
You can use the optional keyword KEY in front of a component definition to define it as a key field of the
structure. This is relevant for structures that are bound into database tables. Also, components of structures
used as lock parameters in a lock object must be defined as KEY fields.
You can use the optional NOT NULL keywords at the end of a component definition to define that the field
needs to have initial values and cannot be null in a database table. Therefore this is relevant for structures that
are bound into database tables only.
Example
Syntax Form
Definition
Components of a structure can be defined by including the components of other structures in ABAP
Dictionary, including database tables or views.
The name of the include structure thus follows after the INCLUDE keyword.
Use
● a group to address the whole include structure like a component inside of an ABAP program
● a suffix to resolve name conflicts with other components of the structure by using the WITH SUFFIX
keywords, followed by a suffix of up to three characters that is added to the included components
● component extensions to add/overrule value help or foreign key assignments to/of components from the
include structure
Example
● org_data
● address as the group office_address with the suffix off
...
INCLUDE org_data;
office_address : INCLUDE address WITH SUFFIX off;
private_address : INCLUDE address WITH SUFFIX pri;
...
Note
The following special characters are allowed in the field names $%/&#@!*()~?<>.{}_. If a field name
contains one of these characters, it must be written in double quotes. The same applies to group names
and include suffixes.
Related Information
In ABAP Development Tools (ADT), you can add the following annotations to a component/field:
● Short Description [page 809] if the component/field is typed with a predefined type
● Reference to a Currency Field [page 810] if the component/field is an amount
● Reference to a Unit Field [page 811] if the component/field is a quantity
● Reference to a Geographic Data Type [page 811] if the component/field is a geographical location
Syntax Form
@EndUserText.label: 'short_description'
Definition
The short text is used as an explanatory text for a component/field that is typed with a predefined ABAP
Dictionary type. For components/fields that are defined with a user-defined ABAP Dictionary type, the
corresponding short text is taken.
These texts are always displayed in the original language. If you change any text, the text is saved in the original
language as well.
If the logon language differs from the original language of the structure, a warning is displayed in the editor.
Related Information
Syntax Form
@Semantics.amount.currencyCode : 'structure.field_containing_currency_key'
Definition
If a component/field is based on the abap.curr predefined type, it has to be linked with a currency code field
based on the abap.cuky predefined type.
Example
The salary structure defines the unit component with the predefined data type abap.curr. Therefore, the
reference to the curreny_key component needs to be set. This is set through the given annotation.
Related Information
Syntax Form
@Semantics.quantity.unitOfMeasure: 'structure.field_containing_unit_key'
Definition
If a component/field is based on the abap.quan predefined data type, it has to be linked with a unit field based
on the abap.unit predefined type.
Example
The order structure defines the item_quantity component with the abap.quan predefined data type.
Therefore, the reference to the item_unit component needs to be set. This is set through the given
annotation.
Related Information
Syntax Form
@AbapCatalog.geo.spatialRefSystem : 'id'
This value determines the underlying spatial reference system of a geographic element that is typed with the
predefined ABAP data type abap.geom_ewkb as Extended Well Known Binary (EWKB).
Notes
If the annotation is not explicitly given when defining an element of the abap.geom_ewkb data type, the
annotation will be added with the default value '0' when saving the containing ABAP Dictionary object
automatically. If an element already exists in a structure, the annotation is always shown with the given value.
The underlying spatial reference system can no more be changed after activation.
Values
You can use, for example, the following values for defining the underlying geographic reference system in the
source code:
1000004326 Spatial reference system for the WGS84 planar standard for
spherical surfaces of the Earth
Note
Only relevant for SAP-internal use.
Related Information
Syntax Form
... abap.name[(n)|(n,m)]
Definition
Elementary components/fields can be typed with a user-defined data element or directly with a predefined
data type. In the latter case, you have to add the leading prefix abap., followed by the name of the predefined
dictionary type in a component/field definition. If the chosen type requires additional information on length
and decimal places, you will need to add this information in brackets.
Notes
You will find a list of the available predefined ABAP Dictionary types and their technical attributes in the ABAP
Keyword Documentation that is linked below.
Example
Both components are assigned to the predefined data types that begin with abap. as leading prefix. After the
value, the length and decimals places follow in brackets.
...
gender : abap.char(1);
cost_factor : abap.dec(2,1);
...
Related Information
Syntax Form
...
data element | structure | database table | view | table type | class | interface
...
Definition
Components can be typed with any user-defined dictionary type or with classes or interfaces from the class
library.
● Data element
● Structure
Note
The optional keyword BOXED can be added after the structure name. This component is then defined
as a boxed component within the surrounding structure.
● Database table
● View
● Table type
● ABAP class or interface: can only be used with the leading REFERENCE TO addition.
Example
...
employee_id : dtel_employee_id;
address : struct_address BOXED;
accounts : itab_accounts;
department : REFERENCE TO cl_department
...
Syntax Form
...
WITH VALUE HELP value_help
WHERE value_help_parameter1 = structure.component1
[AND value_help_parameter2 = structure.component2 ...];
...
Definition
You can add a value help to an elementary component/field. For this, you add the WITH VALUE HELP
keywords, followed by the name of the value help and the assignments, to the value help parameters as a
WHERE condition.
Notes
In the WHERE condition, you must provide all parameters of the value help.
Editor-Specific Information
You can only use value helps of the ABAP Dictionary. Value helps that are implemented with check tables or
similar technologies are maintained through a foreign key relationship.
The employee_number component is typed with the s_employee_id data element. For this component, the
z_department value help is defined. The id and depnumber value help parameters are supplied with
components of the surrounding structure. The language value help parameter receives a constant value.
...
employee_number : s_employee_id WITH VALUE HELP z_department
WHERE id = structure.id
AND depnumber = structure.dep_number
AND language = 'EN';
...
Related Information
A foreign key represents one or more columns of a database table (foreign check table) that contains primary
keys of another database table (check table). Both tables have a foreign key dependency.
If the component/field has a foreign key [page 819] relationship, the following foreign key annotations can be
added:
Note
You will find examples of all foreign key annotations in the Foreign Keys [page 819] chapter.
Related Information
Syntax Form
@AbapCatalog.foreignKey.keyType : #KEY |
#NON_KEY |
#TEXT_KEY
Definition
The foreign key field type of a foreign key describes the meaning of the foreign key fields in the foreign key
table. In structures, this information is used for documentation purposes only.
Notes
You can assign the following values of foreign key types to a component:
#NON_KEY No key fields / key candidates The foreign key fields are not primary key fields of
the foreign key table and do not uniquely identify a
record of the foreign key table.
#KEY Key fields / key candidates The foreign key fields are either primary key fields
of the foreign key table or they uniquely identify a
record of the foreign key table as a key candidate.
#TEXT_KEY Key fields of a text table If this type of foreign key field is defined, the for
eign key table is handled as a text table to the
check table. The primary key of the foreign key ta
ble must match the check table, plus a language
key field with the LANG type. There can be only
one text table for each check table. Otherwise, a
warning occurs at activation.
Foreign Key
Syntax Form
Definition
The input value check on dynpros and Web Dynpros tests whether the check table contains a record with the
key given by the values in the foreign key fields.
Notes
You can define the values true (for activation) and false (for deactivation).
Syntax Form
@AbapCatalog.foreignKey.messageClass : 'message_class_name'
@AbapCatalog.foreignKey.messageNumber : 'message_number'
Definition
If an input value check on a dynpro or Web Dynpro fails, a standard message is displayed. This standard
message can be replaced with any message in the definition of the foreign key. To define this, you can set a
message class and message number through its annotation.
You should only add a message class if the screenCheck annotation is set on true.
Related Information
Syntax Form
Definition
You can add a foreign key relationship to an elementary component. To do this, you add the WITH FOREIGN
KEY keywords, followed by the name of the check table and the assignments, to its check fields as a WHERE
condition. Single assignments are connected with the AND keyword.
Notes
If you define a foreign key for a component or on a component extension, you should add foreign key
annotations.
You can define an optional [n:m] cardinality for each foreign key. In structures, cardinalities serve for
documentation purposes only. In the source code editor,
● [1]: Precisely one record must exist for each row in the check table.
● [1]: Precisely one row in the check table must exist for each record.
● [0..1]: No assigned rows must exist in the check table for a record.
Example
The elementary component department_id has a foreign key relationship with the sdepartment check
table. In this relationship, the mandt component for entries in the check table must match the sy-mandt field
and the id component of the check table must match the department_id field of any record based on this
structure.
The cardinality defines that for each record an entry should exist in the check table, but not vice versa.
If the foreign key check fails, the message with the number 001 of the employee_messages message class is
displayed.
...
@AbapCatalog.foreignKey.label : 'Departments'
@AbapCatalog.foreignKey.keyType : #KEY
@AbapCatalog.foreignKey.screenCheck : true
@AbapCatalog.foreignKey.messageClass : 'employee_messages’
@AbapCatalog.foreignKey.messageNumber : '001'
department_id : dtel_department WITH FOREIGN KEY [0..*,1] sdepartment
WHERE mandt = syst.mandt
AND id = employee.department_id;
...
Related Information
Syntax Form
● to add/overrule value help or foreign key assignments to/of components from an include structure
● in append structures to add value help or foreign key assignments to components of the original structure
A component extension is introduced with the EXTEND keyword, followed by the name of the component, and a
foreign key or value help addition, or both.
Use
A component extension is used to add, overrule, or remove one or more components from another or the same
structure.
Notes
If a structure is included, you can remove existing value helps or foreign keys using the REMOVE VALUE HELP
or REMOVE FOREIGN KEY keywords.
Example
The zip_code and street components of the address include structure are extended:
...
office_address : INCLUDE address
EXTEND zip_code: WITH FOREIGN KEY subsideries
WHERE plz = employee.zip_code
EXTEND street:
REMOVE VALUE HELP;
...
Note
To find more information about how to use component extensions in an append structure, see an example
in the chapter Append Structures [page 822].
Syntax Form
Definition
Append structures are used to add components or component extensions to an existing structure without
modifying the latter. They are independent development objects that are edited separately.
An append structure is introduced with the EXTEND TYPE keywords, followed by the name of the original
structure, followed by the WITH keyword and the name of the append structure.
For append structures you use the same annotations as for regular structures.
Notes
Example
The employee_with_address append structure adds the street and city components.
In addition, the existing component department is extended by an assignment to the departments value help.
Related Information
Syntax Form
Definition
A database table is the set of data from a relational database. Each database table has technical and semantic
properties that are defined in ABAP Dictionary.
Use
A database table can be used to create, edit, or display database tables in a source-based editor.
All database tables defined in ABAP Dictionary can be referenced in ABAP programs as a structured data type.
You can access database tables defined in ABAP Dictionary directly in ABAP programs using ABAP SQL.
Notes
Database tables defined in ABAP Dictionary are instantiated as database objects in ABAP database schema of
the underlying database of the current AS ABAP.
Example
It consists of ...
Related Information
In ABAP Development Tools (ADT), you can use the following annotations for source-based database tables:
● Technical attributes:
○ Table Category [page 825]*
○ Enhancement Category [page 803]*
○ Activation Type [page 828]
● Semantic attributes:
○ Short Description [page 804]*
○ Data Maintenance [page 830]*
○ Delivery Class [page 831]*
● Replacement Object [page 833]
Note
*These annotations are mandatory when creating or editing database tables in ADT.
When the source code of a database table is activated, annotations and comments that cannot be mapped
to the database are removed.
Technical attributes describe information about the technical specification and implementation of a database
table. The technical attributes of a database table are the attributes of their structure and the database table-
specific properties.
The technical settings (data class, size category, buffering, and storage type) constitute a standalone object
and can be activated and transported separately from the table.
Note
To edit these technical settings or to create/edit indexes, open the integrated SAP GUI.
Syntax Form
@AbapCatalog.tableCategory: #TRANSPARENT |
#GLOBAL_TEMPORARY
The table category specifies the storage method and primary access method to the underlying database.
Note
ABAP Dictionary supports transforming database tables from one category to another.
Values
You can use the following values for defining the table category in the source code:
#TRANSPARE The database object of a transparent table has the identically named
NT characteristic with the same columns as the definition in ABAP Dic Note
tionary. This is the default value for
creating database tables in
ADT.
Related Information
Syntax Form
@AbapCatalog.enhancementCategory : #NOT_EXTENSIBLE |
#NOT_CLASSIFIED |
#EXTENSIBLE_CHARACTER |
#EXTENSIBLE_CHARACTER_NUMERIC |
#EXTENSIBLE_ANY
SAP's structures and database tables can be enhanced by customers using customizing includes or append
structures.
Use
You use enhancement categories to predefine warnings to be displayed if your changes result in n problems.
Values
You can use the following values to define enhancement categories in the source code:
Note
This value is only provided for structures that already exist. Therefore, it should not be used
when creating new structures or changing existing ones.
Note
This is the default value for creating structures in ADT.
#EXTENSIBLE_CHARA All structure/database table components and their enhancements must be character-like and flat.
CTER
#EXTENSIBLE_CHARA All structure/database table components and their enhancements must be flat.
CTER_NUMERIC
#EXTENSIBLE_ANY All structure/database table components and their enhancements can have any kind of data type.
Related Information
Syntax Form
@AbapCatalog.activationType : #NOT_CLASSIFIED |
#NAMETAB_GENERATION_OFFLINE |
#ADAPT_C_STRUCTURES |
#INITIAL_TABLE_REQUIRED
Definition
The activation type of a database table describes if a database table can be activated using the relevant tools in
ABAP Dictionary or if activation needs to be triggered by the ABAP runtime.
Use
Values
You can use the following values for defining activation types in the source code:
#NOT_CLASSIFIED The database table can be activated using with an ABAP Dictionary tool This is the default
interactively. value for creating data
base tables in ADT.
Recommendation
SAP recommends that database tables for application development
should use this default value.
#NAMETAB_GENERATI The runtime object of the database table must be created using an ABAP This value is used for
ON_OFFLINE kernel program before activating in ABAP Dictionary. This makes it im database tables that
possible to modify and activate important system tables directly. are needed from the
ABAP runtime. There
fore, it is only relevant
for SAP-internal devel
opment.
#ADAPT_C_STRUCTUR The database table is used from the ABAP kernel. Activation and there
ES fore creation of its runtime objects is despite possible in ABAP Diction
ary.
Check the programs in use from the kernel for possible adoptions.
#INITIAL_TABLE_RE The database table is required before other objects are modified as part
QUIRED of a transport.
Related Information
Semantic attributes provide additional information and specify the behavior of a database table. The semantic
attributes of a database table are the properties of their structure and the database table-specific properties.
Syntax Form
@EndUserText.label: 'short_description'
Definition
The short text is used as an explanatory text for the entire structure/database table.
Notes
These texts are always displayed in the original language. If you change any text, the text is saved in the original
language as well.
If the logon language differs from the original language of the structure, a warning is displayed in the editor.
Syntax Form
@AbapCatalog.dataMaintenance : #LIMITED |
#ALLOWED |
#NOT_ALLOWED
Definition
Data maintenance describes the possibilities if displaying and/or editing the content of a database table is
allowed or not.
Use
● Data Browser (transaction SE16) and Table View Maintenance (transactions SM30 and SM31) to maintain
database tables.
● Data Preview to access and display the content stored in a database table.
Note
In the current client version of ABAP Development Tools, the technical settings and maintenance features
can only be edited using the embedded SAP GUI.
You can use the following values for defining the data maintenance possibilities in the source code:
#LIMITED
Database tables can be displayed but not edited using Data Browser (transaction SE16).
Tables cannot be displayed and edited with transactions SM30 and SM31. Maintenance dialogs
can, however, be used in "View Cluster Maintenance" (transaction SM34).
Note
This is the default value for creating database tables in ADT.
#ALLOWED
Database tables can be displayed and edited using Data Browser (transaction SE16).
Tables cannot be displayed and edited with transactions SM30 and SM31. Maintenance dialogs
can, however, be used in "View Cluster Maintenance" (transaction SM34).
#NOT_ALLOWED
Database tables cannot be displayed or edited using Data Browser (transaction SE16).
No maintenance dialogs can be created using transaction SE54. This means that transactions
SM30 and SM31 cannot be used.
Related Information
Syntax Form
@AbapCatalog.deliveryClass : #A |
#C |
#L |
#G |
#E |
#S |
#W
● the transport of table data from installations, upgrades, or client copies, and
● the transports between customer systems.
Values
You can use the following values for the defining delivery class in the source code:
#A Application table for master data and transaction data. The data is written by application pro
grams.
Note
This is the default value for creating database tables in ADT.
Note
SAP delivers tables in the delivery class L as empty tables.
#G Customer table where SAP can add data but not modify or delete
Note
A customer table of this delivery class must be assigned a customer namespace in the data
base table TRESC using program RDDKOR54.
Note
A system table in the delivery class E must be assigned a customer namespace in the data
base table TRESC. To do this, you use program RDDKOR54.
#S System table delivered by SAP with predefined data as part of the system, such as
ABAPDOCU_TREE
Note
Data of the tables of this delivery class is transported and handled like repository objects. This
means that they have an original system. Any changes in other systems are handled as modi
fications or repairs.
#W System table for administration data of a system, such as TFDIR as a directory of all function
modules
Note
A system table in the delivery class W is usually delivered with entries from SAP. It can be af
fected by customer modifications. The content is transported using the transport objects as
signed to the objects in questions.
Example
R3TR FUNC for function modules
Related Information
Syntax Form
@AbapCatalog.replacementObject : 'cds_entity_name'
Definition
A CDS view can be defined as a replacement object for a transparent database table or a classic database view
in ABAP Dictionary. In this case, read access using ABAP SQL is carried out through the replacement object.
You can assign a transparent database table and a classic database view in ABAP Dictionary to a CDS view. To
do this, you assign the name of the relevant CDS entity to the @AbapCatalog.replacementObject
annotation as a replacement object.
This enables you to retrieve data using a substitute object instead of a database table or a classic database
view.
Recommendation
SAP might deliver a replacement object for database tables for aggregated data. But SAP does not
recommend you create your own replacement objects.
Note
You can only assign a replacement object if the structure type – defined by the CDS view – fulfills specific
requirements.
Value
Enter the name of the replacement object to be considered in quotation marks after the annotation name and
the colon.
Notes
Related Information
Definition
A database table field (short form field) describes the data to be stored in the database.
Use
Syntax Form
Syntax Form
Use
You can use the optional keyword KEY in front of a component definition to define it as a key field of the
structure. This is relevant for structures that are bound to database tables. Also, components of structures
used as lock parameters in a lock object must be defined as KEY fields.
You can use the optional NOT NULL SQL keywords at the end of a component definition to define that the field
needs to have initial values and cannot be null in a database table. This is relevant for structures that are bound
into database tables only.
Example
● pers_id is the key field of the table and typed to the predefined ABAP type abap.char(40)
● name is typed with the employee_name data element
Note
The following special characters are allowed in the group names $%/&#@!*()~?<>.{}_ where . and !
cannot be used in the first position. If a group name contains one of these characters, it must be written in
double quotes. The same applies to include suffixes.
Related Information
Syntax Form
Definition
Fields of a database table can be defined by including the components of other structures in ABAP Dictionary.
The name of an include structure (includes) comes after the INCLUDE keyword. The data type of an include
structure must be flat.
Use
● a group to address the whole include structure like a component inside of an ABAP program
● a suffix to resolve name conflicts with other components of the structure by using the WITH SUFFIX
keywords, followed by a suffix of up to three characters that is added to the included components
● field extensions to add/overrule value help or foreign key assignments to/of fields from an include
structure
Example
● org_data
● address as the group office_address with the suffix off
● address as the group private_address with the suffix pri
...
INCLUDE org_data;
office_address : INCLUDE address WITH SUFFIX off;
private_address : INCLUDE address WITH SUFFIX pri;
...
The following special characters are allowed in the group names $%&#@!*()~?<>.{}_. If a group name
contains one of these characters, it must be written in double quotes. The same applies to include suffixes.
Related Information
In ABAP Development Tools (ADT), you can add the following annotations to a component/field:
● Short Description [page 809] if the component/field is typed with a predefined type
● Reference to a Currency Field [page 810] if the component/field is an amount
● Reference to a Unit Field [page 811] if the component/field is a quantity
● Reference to a Geographic Data Type [page 811] if the component/field is a geographical location
Syntax Form
@EndUserText.label: 'short_description'
Definition
The short text is used as an explanatory text for a component/field that is typed with a predefined ABAP
Dictionary type. For components/fields that are defined with a user-defined ABAP Dictionary type, the
corresponding short text is taken.
Editor-Specific Information
These texts are always displayed in the original language. If you change any text, the text is saved in the original
language as well.
Related Information
Syntax Form
@Semantics.amount.currencyCode : 'structure.field_containing_currency_key'
Definition
If a component/field is based on the abap.curr predefined type, it has to be linked with a currency code field
based on the abap.cuky predefined type.
Example
The salary structure defines the unit component with the predefined data type abap.curr. Therefore, the
reference to the curreny_key component needs to be set. This is set through the given annotation.
Related Information
Syntax Form
@Semantics.quantity.unitOfMeasure: 'structure.field_containing_unit_key'
Definition
If a component/field is based on the abap.quan predefined data type, it has to be linked with a unit field based
on the abap.unit predefined type.
Example
The order structure defines the item_quantity component with the abap.quan predefined data type.
Therefore, the reference to the item_unit component needs to be set. This is set through the given
annotation.
Related Information
Syntax Form
@AbapCatalog.geo.spatialRefSystem : 'id'
This value determines the underlying spatial reference system of a geographic element that is typed with the
predefined ABAP data type abap.geom_ewkb as Extended Well Known Binary (EWKB).
Notes
If the annotation is not explicitly given when defining an element of the abap.geom_ewkb data type, the
annotation will be added with the default value '0' when saving the containing ABAP Dictionary object
automatically. If an element already exists in a structure, the annotation is always shown with the given value.
The underlying spatial reference system can no more be changed after activation.
Values
You can use, for example, the following values for defining the underlying geographic reference system in the
source code:
1000004326 Spatial reference system for the WGS84 planar standard for
spherical surfaces of the Earth
Note
Only relevant for SAP-internal use.
Related Information
Syntax Form
... abap.name[(n)|(n,m)]
Definition
Elementary components/fields can be typed with a user-defined data element or directly with a predefined
data type. In the latter case, you have to add the leading prefix abap., followed by the name of the predefined
dictionary type in a component/field definition. If the chosen type requires additional information on length
and decimal places, you will need to add this information in brackets.
Notes
You will find a list of the available predefined ABAP Dictionary types and their technical attributes in the ABAP
Keyword Documentation that is linked below.
Example
Both components are assigned to the predefined data types that begin with abap. as leading prefix. After the
value, the length and decimals places follow in brackets.
...
gender : abap.char(1);
cost_factor : abap.dec(2,1);
...
Related Information
Syntax Form
...
data element | predefined_abap_type [page 813]
...
Definition
● Data element
● Predefined ABAP types
Example
...
employee_id : dtel_employee_id;
date_birth : abap.dats;
...
Syntax Form
...
WITH VALUE HELP value_help
WHERE value_help_parameter1 = structure.component1
[AND value_help_parameter2 = structure.component2 ...];
...
You can add a value help to an elementary component/field. For this, you add the WITH VALUE HELP
keywords, followed by the name of the value help and the assignments, to the value help parameters as a
WHERE condition.
Notes
In the WHERE condition, you must provide all parameters of the value help.
Editor-Specific Information
You can only use value helps of the ABAP Dictionary. Value helps that are implemented with check tables or
similar technologies are maintained through a foreign key relationship.
Example
The employee_number component is typed with the s_employee_id data element. For this component, the
z_department value help is defined. The id and depnumber value help parameters are supplied with
components of the surrounding structure. The language value help parameter receives a constant value.
...
employee_number : s_employee_id WITH VALUE HELP z_department
WHERE id = structure.id
AND depnumber = structure.dep_number
AND language = 'EN';
...
Related Information
A foreign key represents one or more columns of a database table (foreign check table) that contains primary
keys of another database table (check table). Both tables have a foreign key dependency.
If the component/field has a foreign key [page 819] relationship, the following foreign key annotations can be
added:
Note
You will find examples of all foreign key annotations in the Foreign Keys [page 819] chapter.
Related Information
Syntax Form
@AbapCatalog.foreignKey.label: 'literal_string'
Definition
The short text is used as an explanatory text for a foreign key relationship.
Syntax Form
@AbapCatalog.foreignKey.keyType : #KEY |
#NON_KEY |
#TEXT_KEY
Definition
The foreign key field type of a foreign key describes the meaning of the foreign key fields in the foreign key
table. In structures, this information is used for documentation purposes only.
Notes
You can assign the following values of foreign key types to a component:
#NON_KEY No key fields / key candidates The foreign key fields are not primary key fields of
the foreign key table and do not uniquely identify a
record of the foreign key table.
#KEY Key fields / key candidates The foreign key fields are either primary key fields
of the foreign key table or they uniquely identify a
record of the foreign key table as a key candidate.
#TEXT_KEY Key fields of a text table If this type of foreign key field is defined, the for
eign key table is handled as a text table to the
check table. The primary key of the foreign key ta
ble must match the check table, plus a language
key field with the LANG type. There can be only
one text table for each check table. Otherwise, a
warning occurs at activation.
Foreign Key
Syntax Form
Definition
The input value check on dynpros and Web Dynpros tests whether the check table contains a record with the
key given by the values in the foreign key fields.
Notes
You can define the values true (for activation) and false (for deactivation).
Syntax Form
@AbapCatalog.foreignKey.messageClass : 'message_class_name'
@AbapCatalog.foreignKey.messageNumber : 'message_number'
Definition
If an input value check on a dynpro or Web Dynpro fails, a standard message is displayed. This standard
message can be replaced with any message in the definition of the foreign key. To define this, you can set a
message class and message number through its annotation.
You should only add a message class if the screenCheck annotation is set on true.
Related Information
Syntax Form
Definition
You can add a foreign key relationship to an elementary component. To do this, you add the WITH FOREIGN
KEY keywords, followed by the name of the check table and the assignments, to its check fields as a WHERE
condition. Single assignments are connected with the AND keyword.
Notes
If you define a foreign key for a component or on a component extension, you should add foreign key
annotations.
You can define an optional [n:m] cardinality for each foreign key. In structures, cardinalities serve for
documentation purposes only. In the source code editor,
● [1]: Precisely one record must exist for each row in the check table.
● [1]: Precisely one row in the check table must exist for each record.
● [0..1]: No assigned rows must exist in the check table for a record.
Example
The elementary component department_id has a foreign key relationship with the sdepartment check
table. In this relationship, the mandt component for entries in the check table must match the sy-mandt field
and the id component of the check table must match the department_id field of any record based on this
structure.
The cardinality defines that for each record an entry should exist in the check table, but not vice versa.
If the foreign key check fails, the message with the number 001 of the employee_messages message class is
displayed.
...
@AbapCatalog.foreignKey.label : 'Departments'
@AbapCatalog.foreignKey.keyType : #KEY
@AbapCatalog.foreignKey.screenCheck : true
@AbapCatalog.foreignKey.messageClass : 'employee_messages’
@AbapCatalog.foreignKey.messageNumber : '001'
department_id : dtel_department WITH FOREIGN KEY [0..*,1] sdepartment
WHERE mandt = syst.mandt
AND id = employee.department_id;
...
Related Information
Syntax Form
● to add/overrule value help or foreign key assignments to/of components from an include structure
● in append structures to add value help or foreign key assignments to components of the original structure
A component extension is introduced with the EXTEND keyword, followed by the name of the component, and a
foreign key or value help addition, or both.
Use
A component extension is used to add, overrule, or remove one or more components from another or the same
structure.
Notes
If a structure is included, you can remove existing value helps or foreign keys using the REMOVE VALUE HELP
or REMOVE FOREIGN KEY keywords.
Example
The zip_code and street components of the address include structure are extended:
...
office_address : INCLUDE address
EXTEND zip_code: WITH FOREIGN KEY subsideries
WHERE plz = employee.zip_code
EXTEND street:
REMOVE VALUE HELP;
...
Note
To find more information about how to use component extensions in an append structure, see an example
in the chapter Append Structures [page 822].
Contents
You can use the LOG-POINT statement to define a static logpoint whose activation is controlled using the
addition ID.
Related Information
To specify the condition, key definition, or resulting field values of a dynamic logpoint, uses the same notations
of ABAP data objects (variables, literals) that you would use during debugging at the same source position.
As you already know from using the ABAP Debugger, for displaying variable content you can use the variable
name you would use in the ABAP source code at that debugging position or you can use special debugger
notiations that are not valid in ABAP source code, for example:
itab[1]
{O:23!CL_BASE_CLASS}-private_attr
(SAPMSSY0)ORDERS
Note
As you already know from ABAP syntax, the following types of literals are also valid in logpoints:
Character Literals
‘123456789’
Note
String Literals
`This is a string`
`123456789`
Note
Numeric literals consist of only number characters, optionally introduced by a ‘-’ character, indicating a
negative value:
123456789
-123456789
A build-in function is a predefined function in ABAP that can be used in certain operand positions.
Built-in functions allow you, for example, to define key or field values of dynamic logpoints. All functions have a
return value and can include up to one argument. To find out what the type of the return value and the
argument is, read the detailed description of the functions below.
Note
The syntax of the built-in functions is based on ABAP formatting. For example, spaces are mandatory
before the argument and before the closing bracket.
Functions Available
In ABAP Development Tools (ADT), you can use the following built-in functions in logpoints:
5.4.2.1 INEXACT_DF()
Semantics Delivers information about the exactness of the last arithmetic operation with re
sult type DECFLOAT16 or DECFLOAT34
Semantics Returns the name of the current entry point, such as the
name of the current transaction, the URL of the currently
processed HTTP request, or the name of the submitted re
port.
Return value Has ABAP type C with the length of the name of the current
entry point.
Note
These constants are defined in the scope of the parame
ter list of built-in functions that are used in dynamic log
points only. This means they are not valid inside stand
ard ABAP code, nor can they be used as normal varia
bles in the condition, in the key definition, or in the field
values of dynamic logpoints (outside the parameter list
of built-in functions).
Semantics Returns the type of the current request entry point, such as
transaction, HTTP request, or SUBMIT <report>.
TA Transaction
The argument may contain the values ‘Q’ or ‘R‘, with the fol
lowing meaning:
Note
These constants are defined in the scope of the parame
ter list of built-in functions that are used in dynamic log
points only. This means they are not valid inside stand
ard ABAP code, nor can they be used as normal varia
bles in the condition, in the key definition, or in the field
values of dynamic logpoints (outside the parameter list
of built-in functions).
Semantics Switches the SQL trace on before the first statement in the
current ABAP source code line is processed. The trace is
switched off automatically before a next ABAP statement is
processed (that starts at any other line or is executed in an
other procedure call).
Note
It can also happen that the SQL trace has already been
activated with such an additional option (for switching
the ABAP stack on or off) by means of the transaction
ST05 - that is: independent from the function
SQL_TRACE () used by dynamic logpoints. The ABAP
stack is written to the SQL trace if, at least, one activa
tion has switched on the ABAP stack capability.
The argument may contain the values ‘X’ or ‘ ‘, with the fol
lowing meaning :
Note
that these built-in constants are defined in the scope of
the parameter list of built-in functions used in dynamic
logpoints only. This means they are not valid inside
standard ABAP code, nor can they be used as normal
variables in conditions of dynamic logpoints, in the key,
or in the results fields section outside the parameter list
of built-in functions.
Semantics Returns the ABAP stack for the current source code posi
tion.
< cont > - Byte code offset of the ABAP virtual machine.
Note
If an ABAP stack cannot be evaluated, the function re
turns the string < NO_STACK >.
Restrictions:
5.4.2.7 STACK_HASH( )
Note
If an ABAP stack cannot be evaluated, the function re
turns the string < NO_STACK_HASH >.
5.4.2.9 SYSTEM_INFO( )
If a value other than 'A', 'T' or 't' is specified, the string '<IN
VALID_SYMBOL>' is returned by the function.
● AppServName: 'A'
● TstmpS: 't'
● TstmpL: 'T'
Example
system_info( AppServName ) or system_info( TstmpL )
Note
These constants are defined in the scope of the parame
ter list of built-in functions that are used in dynamic log
points only. This means, they are not valid inside stand
ard ABAP code, nor can they be used as normal varia
bles in the condition, in the key definition, or in the field
values of dynamic logpoints (outside the parameter list
of built-in functions).
Semantics Switches the table buffer trace on before the first statement
in the current ABAP source code line is processed. The trace
is switched off automatically before a next ABAP statement
is processed (that starts at any other line or is executed in
another procedure).
Note
It can also happen that the table buffer trace has already
been activated with such an additional option (for
switching the ABAP stack on or off) by means of the
transaction ST05 - that is: independent from the func
tion TABLEBUF_TRACE () used by dynamic logpoints.
The ABAP stack is written to the table buffer trace if, at
least, one activation has switched on the ABAP stack ca
pability.
Return value 1 - If the table buffer trace has been switched on success
fully.
The argument may contain the values ‘X’ or ‘ ‘, with the fol
lowing meaning :
Note
that these built-in constants are defined in the scope of
the parameter list of built-in functions used in dynamic
logpoints only. This means they are not valid inside
standard ABAP code, nor can they be used as normal
variables in conditions of dynamic logpoints, in the key,
or in the results fields section outside the parameter list
of built-in functions.
Argument The function parameter <arg> can be typed with the technical types X and
XSTRING.
Semantics Delivers the current status of debugging for the currently executed request
Note
This function is for SAP-internal use only. SAP support may suggests using
this function.
This function writes a substantial amount of data (> 2 kB). Therefore, use this
function carefully.
Restriction
Usage of this function is restricted to the field value list only.
Return value Returns an internal table containing the debugging status information
5.4.2.13 _SET_DEVTRACE(<trace_activation>)
Semantics Changes the trace level and trace components as they can be set using profile pa
rameter 'rdisp/TRACE” and rdisp/TRACE_COMPS'. However, this func
tion results in changes for the currently executed request, only.
The current trace settings can be set to an arbitrary level for arbitrary compo
nents. At a later point in time, a second dynamic logpoint can be used to reset to
the default trace activation. If no reset has been configured, an implicit reset will
be performed at the next roll-out of the request.
Note
This function is for SAP-internal use only. SAP support may suggests using
this function.
Ensure that your user has the additional authorizations. If not, a syntax error
(without further explanations) will be raised, when you try to create a dy
namic logpoint, containing function '_set_devtrace()'.
Argument Can have only one argument of ABAP type C with arbitrary length
Example
Activation of trace level 2 for components ABAP (A), TaskHandler (M), and
Dynp processor (Y):
● _set_devtrace( '2|all'AMY' )
● _set_devtrace( DEFAULT )
● _set_devtrace( 'D' )
Note
The built-in constants, such as DEFAULT, are defined in the scope of the pa
rameter list of built-in functions used in dynamic logpoints, only. This means,
they are not valid in standard ABAP source code nor they can be used as
common variables in conditions of dynamic logpoints, in the key, or in the re
sults fields section outside the parameter list of built-in functions.
S_DYNLGPTS
OBJTYPE
OBJNAME
TRACING Tracing
ACTVT
01 Create
02 Change
03 Display
06 Delete
07 Activate, Deactivate
5.4.4 Glossary
Defining Logpoints
● Dynamic Logpoints
● Logpoint properties:
○ Source Code Location,
○ Key Definition (short: Key)
○ Condition,
○ Field Values
○ Activation
Processing Logpoints
● Evaluation of Condition
● Log event
● Log entry (log event writes a log entry)
● Aggregation
● Counter
The condition syntax allowed in breakpoint conditions is basically a subset of what is allowed in ABAP logical
expressions, such as an IF statement.
You can specify elementary logical expressions (for example,SY-SUBRC = 0) and combine them using the
keyword AND, OR.
In addition, you can change the order of valuation by using brackets - as you are familiar with from logical
expressions in ABAP.
Similar to ABAP, you can also make use of short-circuit evaluation semantics, just like in the in the following
example:
The second elementary logical expression oref->attr = 'abc' is evaluated only if the first expression oref
is bound has been evaluated to true.
● sy-index > 5
● sy-index = sy-tabix
● lines( itab ) > 0
● lines( itab ) <> sy-tabix
● lines( itab ) < lines( itab2 )
● strlen( s ) >= sy-index
● INEXACT_DF = 'X'
● oref is bound and oref->attr = 'abc'
● 'DEADBEEF' cs 'BEEF' and sy-fdpos = 4
● a > b AND (c > b OR c > d)
Related Topics
In breakpoint conditions, you can use both simple variables and components of structures as variables. In
addition, you can also access field symbols, class attributes and the content of internal table rows. Finally, you
have the option, to specify offset and length for strings, xstrings, and character fields.
In addition, to access variables, you can make use of some specific debugger notations (variable symbols) that
are not available in ABAP source code.
This symbol is only important for tables with a header row where itab identifies the header
row of the internal table.
You can use these symbols to access components as operands for breakpoint conditions, for example:
itab[100]-comp1 - Accesses the component comp1 of the internal table itab for the 100-th row
Breakpoint conditions support literals as operands. As you are already familiar with from ABAP syntax, the
following types of literals are also valid in breakpoint conditions:
Character Literals
Note
`This is a string`
Note
Numeric literals consist only of number characters, optionally introduced by a ‘-’ character, indicating a
negative value:
● 123456789
● -123456789
Note
Numeric values in the range of -2147483648 … 2147483647 have the ABAP type I, while all other numeric
values in the range of -9999999999999999999999999999999 ...
9999999999999999999999999999999 have the ABAP type P.
There are several built-in functions available for defining breakpoint conditions. All functions have a return
value and can include up to one argument. To find out what the type of the return value and the argument is,
read the detailed description of the functions below.
Note that the syntax of the built-in functions is based on ABAP style. For example, SPACES are mandatory
before the argument and before the closing bracket.
Functions Available:
LINES( itab )
If an argument type other than ABAP internal table or an invalid symbol is specified, the
program will stop when it reaches the breakpoint and a corresponding error message is
issued.
STRLEN( str )
Note
Trailing blanks in character fields with fixed lengths are not counted.
If an argument type other than CHARLIKE or an invalid symbol is specified, the pro
gram will stop when it reaches the breakpoint and a corresponding error message is is
sued.
XSTRLEN( str )
If an argument type other than X or XSTRING, or an invalid symbol is specified, the pro
gram will stop when it reaches the breakpoint and a corresponding error message is is
sued.
INEXACT_DF( )
Semantics This function is used to identify inexact arithmetic operations that are executed with the
numeric data type decfloat16 or decfloat34.
Return value 'X' - if the final result of the an operation (for example, COMPUTE or MOVE) is inexact
due to rounding
The operators you can use in your logical expression along with breakpoint conditions are a subset of what you
can use in ABAP source code. However, the syntax and semantics of this subset during runtime are the same:
● Standard comparison operators: =, <, >, <=, >=, <> or EQ, LT, GT, LE, GE, NE
● Logical operators: NOT, AND, OR and brackets to combine elementary conditions
● Operators for string analysis: CO, CN, CA, NA, CS, NS, CP, NP
● Special binary operators: IS [NOT] INITIAL, IS [NOT] BOUND, IS [NOT] ASSIGNED
Examples
sy-subrc <> 0
The following chapters answer frequently asked questions (FAQs) about the ABAP Development Tools (ADT) –
that is SAP’s Eclipse-based IDE. These FAQs are structured in tables that enable you to skim the features you
want to perform in ADT.
Scope
Focus is on SAP GUI-based functionality and its integration within the IDE for easy use and fast transition.
Each FAQ starts with a header containing the relevant keywords. Below, you will find a table, split into how to
information for SE80 and ADT. Each column describes the procedure in a text and screenshot. The ADT column
also provides a link to the relevant content in the official ADT help documentation to get further details.
Example
The FAQs describe use cases from your daily work, such as:
Note
This document will be continously supplemented in future. If you want to propose an FAQ that needs to be
added to this documentation, comment our SCN blog , please. Thank you for your help!
Target Group
● Are used to work with the ABAP Workbench so far and are now starting to work with ADT
● Already work with ADT and want to find out how a specific feature has been integrated
Contents
You will find here FAQs for the following development areas:
Related Information
Note
You can trigger most of the subsequent functions from the context menu of the selected development
object in Project Explorer, or alternatively from the open development object in the source-based editor.
Overview
In the context of creating and editing development objects, the following "how to" information is provided:
● How can I log on and get access to development objects? [page 876]
● How can I open a development object? [page 877]
● How can I open a development object from another SAP system? [page 878]
● How can I open a transaction? [page 879]
● How can I copy a development object? [page 880]
● How can I switch between the display and edit mode? [page 881]
● How can I unlock a development object? [page 882]
● How can I use code completion? [page 883]
● How can I add a comment? [page 883]
● How can I format (a.k.a. pretty printer) source code? [page 884]
● How can I navigate within source code? [page 884]
● How can I check the syntax of source code? [page 885]
● How can I trigger a where-used list? [page 885]
● Where I can see superclasses and subclasses from a usage? [page 886]
● How can I trigger method creation? [page 887]
● How can I delete the method of an ABAP class? [page 887]
● How can I insert and edit patterns in the source code? [page 888]
● How can I rename a development object? [page 889]
● How can I add favorites? [page 890]
● How can I redefine a method? [page 891]
● How can I open the SE80 browser from the active editor? [page 892]
● How can I execute an ABAP program (report)? [page 892]
● How can I compare versions of a development object? [page 893]
● How can I toggle between the active/inactive version of a development object? [page 894]
● Where can I find the attributes (and similar properties)? [page 895]
● Where can I find SE09 (Transport Organizer)? [page 896]
● How can I add short texts? [page 897]
● How can I find class documentation? [page 898]
● How can I check object type-specific properties, for example whether a function module is RFC-enabled?
[page 899]
● How can I change the package assignment of a development object? [page 900]
In the SAP Logon pad, create a new system entry using the You first need to establish a system connection. To do this,
create an ABAP project that represents the repository in a
New icon from the toolbar. Then open transaction SE80.
structured tree.
You then enter the system and logon credentials. Note that
this data is automatically copied from the system connec
tion of the SAP Logon pad.
From Object Navigator (SE80), choose the relevant mode You have several options for opening development objects.
and select your type from the dropdown menu. Then enter The most effective way is using Ctrl + Shift + A
the name in the input field and choose the Search or Display
from Project Explorer. Alternatively, you can click the
button.
Open ABAP Development Object icon from the toolbar.
Note
Using Ctrl + Shift + A , you can limit your se
lection, for example to the object name or object type.
To do this, use asterisks (such as *) or content assist
( Ctrl + Space ).
You have to open the other system and log on. From SE80, You can open, edit, and compare development objects from
open the development object manually. different SAP systems in parallel without logging on again.
Note
In theIn advance, you need to create a new ABAP project
for each system to establish the relevant system con
nection.
OK field, enter /O followed by the relevant transaction code In the editor, choose Alt F8 to open the Run ABAP
to open a new session. Press Enter . Application dialog. In the input field, enter the name of the
object to execute or the name of the transaction to perform.
Confirm with OK.
In Object Navigator (SE80), select the relevant object or ele In Project Explorer, select the relevant source-based object
ment and choose Copy from the context menu. and choose Copy from the context menu.
Note
In addition, you can also duplicate an object to create
the exact same entity in a selected ABAP project.
Choose then Duplicate... from the context menu.
From the toolbar in the editor, choose the Display/Change Initially, you are in display mode when opening an object in
icon. ADT. When you start typing in the editor, the object switches
to edit mode automatically.
Icon from the toolbar to switch between display and change Note that you can open and edit multiple objects from differ-
mode ent projects at the same time.
You can only edit development objects when they are un You can unlock a development object that you are currently
locked. editing, for example, to make its active version available for
other users.
Note
All changes added after activation are deleted.
In the source code of your development object, choose In the source code of your development object, choose
Ctrl + Space . Ctrl + Space . In addition to SE80, you can overwrite
methods from superclasses using code completion in ADT.
Select, for example, the relevant part of your source code You can add and remove comments in the same way as in
and choose Ctrl + < to add a comment, or > to re ABAP Workbench.
move it.
For more information, see Editing ABAP Comments [page
381]
From the menu bar, choose Utilities Settings ABAP To format the source code, choose Source Code
Editor Pretty Printer to define the settings. Format from the context menu in the source code editor.
Note
To use formatting, you need to configure the relevant
preferences for each ABAP project in advance.
Double-click an element or usage in the source-based editor. From an element or usage in the source code editor, choose
You then navigate, for example, to the relevant usage and an F3 or Ctrl + Click . You then directly navigate to the
other editor is then opened. selected element/object. The relevant position of the usage
is highlighted.
Open and edit the object in the source-based editor. Then You can check the syntax of a source-based development
choose the Check icon from toolbar. object:
From the context menu of the relevant development object From the context menu of the relevant development object
in the object tree, choose Where-Used List, or from the tool in the Project Explorer, choose Get Where-Used List....
bar in the editor, choose the Use of icon.
From Object Navigator (SE80), select the relevant node. You can display the ABAP type hierarchy in its specific view
or in the ABAP Element Info popup.
Note
If you choose T a second time, the superclass hier
Example of displaying the subclasses and superclasses in archy is displayed.
the object tree
From the form-based editor of Class Builder, you can trigger From the method name in the implementation or definition,
the creation of a method implementation by double-clicking you can trigger creation of the corresponding opposite using
the relevant name of the method to be created in the the Add implementation or definition for quick fix. Optionally,
Methods tab. you can directly choose Ctrl + 1 from the editor.
In the form-based editor of the class builder, select the rele In the source code editor, position the cursor on the relevant
vant method and choose the Delete Method icon from the method name and choose Ctrl 1 . Then double-click
toolbar. the Delete entry in the Quick Fix dialog box.
In source code of a method implementation, for example, You can add default patterns by using code completion or by
choose the Pattern button from the toolbar. double-clicking from the Templates view.
You want to, for example, rename the name of a method that is used in an ABAP class.
In Object Navigator (SE80), select the relevant method and In the source code editor, select the method and choose
choose Rename... from the context menu. Source Rename from the context menu.
In Object Navigator (SE80), select the relevant ABAP object, In Project Explorer, you have the options for adding ABAP
object, users, or packages as favorites:
users, or packages. Then choose Favorites Add from
the toolbar. ● Select the Favorite Packages tree
and choose Add Packages... from the context menu. Se
lect the relevant package. The package is then listed in
the Favorite Packages tree.
● Select the ABAP package and choose Add to favorites
from the context menu. The package is then displayed
in the Favorite Packages tree.
● You can define ABAP repository trees to represent a
Menu from the toolbar to add or edit favorites
specific structure of development objects.
● Select the Local Objects ($TMP) tree
and choose Add Local Objects of User... from the con
text menu. Select the relevant package. Select the user.
The user is then listed in the Local Objects ($TMP) tree.
● Select the development object and choose Add
Bookmark... from the context menu. The object is then
listed in the Bookmark tree.
Note
You can also define a bookmark for a specific posi
tion within the source code. To do this, choose Add
Bookmark... from the context menu at the begin
ning of the specific line in the ruler bar. A bookmark
decorator is then added.
In Class Builder (SE24), select the relevant method in the You can trigger the Override code completion ( Ctrl +
Methods tab. Then choose the Redefine Method icon from Space ) from the possible positions within the implementa
the toolbar. tion of the relevant subclass.
From the toolbar of the editor, choose the Display object list
icon. The object tree then displays the relevant object/ Choose the icon from the toolbar of Project Explorer or
element in the tree. most of the views. When you then select an development ob
ject, for example, in the Project Explorer, the relevant opened
editor is automatically focused. Alternatively, if you select an
opened editor, for example, the relevant development object
Icon from the toolbar to display the object list is selected in the ABAP Repository tree.
Note
The "Link with Editor" functional is set by default.
From the toolbar of the editor, choose the Direct Processing From the source code editor of an ABAP program, choose
icon or F8 directly. F8 . The integrated SAP GUI is then opened.
From the menu bar, choose Utilities Version Version From the context menu in the source code editor, choose
Compare With
Management .
From the toolbar, choose the Active <-> Inactive icon. In the editor of an inactive object version, choose Show
Active Version or Show Inactive Version from the context
menu.
From the menu bar, choose Goto Object directory This information is displayed in the Properties view. To dis
play attributes, open the relevant object. Then choose
entry
Window Show View Properties from the menu bar.
From the menu bar, choose Environment Transport From the menu bar, choose Window Show View
From the Methods tab in the form-based editor, for example, You use ABAP Doc comments to document code elements
add your short text in the Description tab. (for example, attributes, methods, or local variables).
Example
...
PRIVATE SECTION.
"! <p class="shorttext synchronized"
lang="en">
Short Text to be synchronized with the
backend</p>
"!
METHODS description.
...
Open the relevant ABAP class in the source-based editor and Open the class and then select the relevant class name.
then choose the Open Class Documentation icon from tool Choose F2 .
bar.
To add ABAP Doc comments, add "! characters one row be
fore the relevant statement. Start then typing your com
ment.
From the Attributes tab, check the Remote-Enabled Module From the Properties view, open the Specific subtap. Then
radio button in the Processing Type area. check the entry for the Processing TypeExample of displaying
attributes in the specific subtap of the Properties
viewProcessing Type dropdown listbox.
●
●
●
In Object Navigator (SE80), select the object and choose In Project Explorer, select the object and choose Change
Additional Functions Change Package Assignment Package Assignment from the context menu.
Related Information
In the context of creating and editing ABAP Dictionary objects, the following "how to" information is provided:
From the Repository Information System mode or using From the relevant ABAP project in the Project Explorer,
SE11: Select the relevant tree, object type, and object name choose Ctrl + Shift + A and enter the object name
to be opened. or open the relevant tree from the Dictionary folder.
The relevant editor is opened. From here you can start your
work.
● Structures
● Domains
● Data elements
In the context of testing ABAP source code, the following "how to" information is provided:
● How can I perform the ABAP Test Cockpit (ATC) for a class, program, or function module? [page 902]
● Where can I find details about errors? [page 903]
● How and where can I get further information about error handling? [page 903]
How can I perform the ABAP Test Cockpit (ATC) for a class, program, or
function module?
In the Object Navigator, select the relevant class, program, In the source code editor, open your class, program, or func
or function module. From its context menu, choose Check tion module. From the context menu, choose Run As +
+ ABAP Test Cockpit. ABAP Test Cockpit.
Perform the ATC for the relevant object. To get further details about an error, open the Problems view.
How and where can I get further information about error handling?
Double-click the relevant error. Double-click the relevant error in the Problems view.
Related Information
In the context of debugging ABAP source code, the following "how to" information is provided:
In the source code editor of an ABAP program, set the break In the source code editor of an ABAP program, set the break
point by selecting the relevant line of code and then clicking point by clicking in the ruler in the relevant position.
the Set/Delete Session Breakpoint icon in the toolbar.
Set the breakpoint(s) in your program. Then choose the Set the breakpoint(s) in the ruler bar of your program.
Debugging button from the toolbar of SE38. Choose F8 to run your application and check the position
where you have set the breakpoint.
Open your function module in SE37. Set the breakpoint(s) Open your function module and set the breakpoint(s) for an
and start the ABAP Debugger. From the menu, choose executable ABAP statement by clicking in the ruler bar at the
Breakpoints + Breakpoint at + Breakpoint at beginning of the row.
Function Module .
Menu path for setting a breakpoint for an ABAP function Example for setting a breakpoint in an ABAP function
module module in ADT
Related Information
Target Audience
● System administrators
● ABAP developers
With the increasing use of distributed systems for managing business data, the demands on security are also
on the rise. When using a distributed system, you need to be sure that your data and processes support your
business needs without allowing unauthorized access to critical information.
This Security Guide assists you in making the ABAP development process secure using the ABAP Development
Tools (ADT).
● User Authentication on Front-End Client [page 908] provides an overview of the authentication aspects.
● Role and Authorization Concept [page 909] introduces the authorization concept that applies to ABAP
Development Tools
● Resource Protection on Front-End Client [page 911] explains how you can protect local resources of ABAP
projects
● Installing Plug-ins from Third Parties [page 911] points to risks caused by installing third party plug-ins
Additional Information
For more information about specific topics, see the Quick Links as shown in the table below.
SAP NetWeaver Guide Finder Guide Finder for SAP NetWeaver and ABAP Platform
Note
To find the relevant guide(s), search for Security.
In ABAP Development Tools, you always work with ABAP projects to access development objects from back-
end systems. Such a project represents a real system connection and therefore it requires an authorized user
to access the corresponding system. Every time you work with a project, you must first log on to the front-end
client. Then, with a logon method for the SAP system, you connect to the back-end system via the project. For
the logon method, also known as standard authentication, the user enters his or her logon credentials on the
front-end client in order to log on to the ABAP back-end system.
Risks
Standard authentication with explicit specification of logon credentials means that user data entered at the
front-end client is loaded into the main memory of the local host as clear text.
A password that is buffered locally, however, represents a potential security gap because it could be extracted
in some way from the memory by a third party.
Protection Measures
In addition to Secure Network Communication (SNC), ABAP Development Tools support the Single Sign-On
(SSO) mechanism. Using SSO, the user does not need to enter a user ID and password for authentication but
can access the system directly after the system has checked the logon ticket. Therefore, besides SNC
(recommended to be enabled for security reasons), we recommend using the SSO mechanism for
authentication when working with ABAP projects on the front-end client.
Note
The ABAP Development Tools support the measures recommended: Every time you want to create a new
ABAP project for a system connection for which the SNC is not enabled, you will be faced with a
corresponding warning message in the creation wizard.
Recommendation
You can use assertion tickets for communication destinations between various other systems to perform
the authentication of frequent tasks or functions. Assertion tickets provide the highest level of security
when creating an RFC or HTTP connection and easiest usability for working with an ABAP system. We
therefore recommend that you use assertion tickets to allow ABAP developers to log onto an ABAP system.
To use assertion tickets, your ABAP system administrator needs to configure the profile parameters of the
relevant ABAP systems.
Related Information
Configuration Guide for Configuring the ABAP Back-end for ABAP Development Tools
The identification of development objects belonging to the ABAP Repository takes place in the back-end with
the specification of the object type and the object name.
The ABAP Development Tools, however, represent a front-end client and it makes use of the HTTP-based REST
architecture when communicating with the back-end. From the viewpoint of this architecture, ABAP
development objects are addressed as resources and identified through URIs. A front-end request keeps a URI
ready whenever a development object is accessed and it is passed first to a router in the back-end. The router,
in turn, transfers the request to the responsible resource controller. The latter uses the incoming URI to ensure
the identification of the matching development object in the ABAP Repository.
The registration of resource controllers takes place with the help of BAdIs. The actual BAdI implementation is
performed for a given URI on the basis of predefined filter values. A filter value contains the respective static
URI path, which is used to gain access to the resource in the back end (that is, to the development object).
There is a potential possibility of backdoors being introduced in the application server during the registration
of resource controllers. This could happen when specific BAdI enhancements that were implemented for
handling random, even "malicious" URIs are registered in the system.
Protection Measures
To provide protection against such backdoors, the proven SAP NetWeaver authorization concept is brought
into operation. This allows for the assignment of authorizations to system users on the basis of predefined
roles. The system administrator, therefore, assigns to the system users one or several roles that, in turn, are
based-at a technical level-on authorization objects.
When you are assigning user authorizations for access to development objects, we strongly recommend using
the standard roles (see the table below) and authorization default values that are provided for working with
ABAP Development Tools. The standard roles are linked with the standard authorization object S_ADT_RES,
which you can use to check a random incoming URI against a predefined URI list-that is, a white list. This
authorization object, therefore, retains as an attribute the list of all allowed URIs. A "malicious" URI would then
be discovered through the authorization check.
Standard Roles
The table below shows the standard roles that should be assigned for users of the ABAP Development Tools:
Role Description
In ABAP Development Tools (ADT), an ABAP project provides a user-specific view of all development objects of
the back-end system.
Like all other projects under Eclipse, projects, too, have a local representation of their data on the front-end and
are managed in a workspace. In other words: When you have a project, local copies of development objects also
exist on the front-end. This, in turn, means that both the metadata and the source code of development objects
are also accessible outside the ABAP Repository at the level of the local file system.
Risks
● Metadata and sources of development objects being spied out by third parties
● ABAP source code being manipulated locally on the front-end by third parties. If external users have access
to the local workspace folder, they have the chance to manipulate the development objects on the file
system level. Data changed at this level could be then propagated into the ABAP Repository as "hidden
changes". In this way, even "malicious" ABAP source code could find its way in to the business application
system.
Protection Measures
For the protection of local project resources, we strongly recommend the following protection measure:
Create your workspace folder for local storage of project resources in such a way that it cannot be read by third
parties. Use the protection measures that are already provided at operating-system level.
Note
Files that are located under WindowsTM in the user's private folder subtree can only be accessed by the
user himself/herself, and by any user who is a local administrator.
In particular, we recommend making use of the default workspace that has been created with the IDE
installation.
Your installation of ABAP Development Tools can be enriched with additional plug-ins from various providers
(3rd parties).
These plug-ins can gain control over your client installation or even your complete front-end PC.
Protection Measures
You should carefully decide on plug-ins that you are going to install. For this, only use plug-ins from trusted
sources and which are using signatures.
ABAP Development Tools (ADT) is released to customers in combination with the Application Server ABAP 7.53
SP00 shipment. This means, in order to use certain ADT functionalities, you need to provide the corresponding
back end.
ABAP Platform
The following table gives you an overview of the released ADT versions and ABAP back ends:
SP02 2.7
Get an overview of the most significant changes in ABAP core development that relate to the following:
Note
All the features that are highlighted with a '*' are client-specific and are therefore available for all supported
ABAP systems.
● Using System Connections from the SAP Logon Pad [page 915]
● Working with Problems View [page 915]
● Working with Business Add-Ins [page 916]
● Working with Number Range Objects [page 917]
● Working with Transport Organizer [page 918]
● Ensuring Quality of ABAP Code [page 919]
Support for reading the legacy SAPLOGON.INI file format has been discontinued. The reason is that all SAP
GUI for Windows versions that are currently in maintenance also do not support this file format anymore. As of
now, only the current Landscape XML format is supported.
Recommendation
If you still use system connections based on the SAPLOGON.INI file format, SAP recommends to migrate
them to the Landscape XML format
● SAP note 2107181 - SAP Logon (Pad) 7.40: Collective SAP Note regarding SAP UI Landscape format
● Using System Connections from the SAP Logon Pad [page 119]
● SAP GUI for Windows 7.60: New Features & Lifecycle Information
The Problems View displays problems (errors and warnings) with an icon and a message text. Sometimes an
additional long text exists that can be displayed by selecting Problem Description from the context menu.
New: Now an additional decorator on the icon informs you about the existence of the long text. It simplifies
reading and understanding the problem messages.
For more information, see Troubleshooting for ABAP Syntax Errors and Warnings [page 186]
You can now create BAdI Enhancement Spots and define BAdI definitions using the BAdI Enhancement Spot
Editor.
To implement BAdI definitions you can now create BAdI Enhancement Implementations, where you can add
BAdI Implementations using the BAdI Implementation Editor.
You can now create Number Range Objects and edit them in the Number Range Object Editor.
When creating a class, you can now add one or more interfaces within the class creation wizard.
You can now change the task type of a task that is added under a transport request.
Supporting CDS View Entities and Projection Views in Test Double Frameworks
The CDS test double framework and ABAP SQL test double framework now supports the CDS view entities and
projection views.
Until now, there was limited support for testing role-based functionality using an AUTHORITY-CHECK
statement in ABAP. Writing unit tests by configuring various users with the required roles and authorizations is
complex. The ABAP Authority Check Test Helper API is a secure API-based approach that can be used in an
ABAP Unit test class.
With ABAP Authority Check Test Helper API, you can now configure authorizations for single or multiple users,
set combination of expectations, and get comprehensive log summary of the AUTHORITY-CHECK statements.
For more information, see Managing Dependencies on ABAP Authority Checks with ABAP Unit [page 604].
Get an overview of the most significant changes in ABAP core development that relate to the following:
Note
All the features that are highlighted with a '*' are client-specific and are therefore available for all supported
ABAP systems.
In this topic, you will find release information about the following:
You can use the generated source code in the ABAP code to work with internal tables.
For more information, see Copying Rows as ABAP Value Statement [page 555].
Get an overview of the most significant changes in ABAP core development that relate to the following:
Note
All the features that are highlighted with a '*' are client-specific and are therefore available for all supported
ABAP systems.
In this topic, you will find the release information about the following areas:
You can now copy the title from the form-based editor to your clipboard.
Note
This feature is available in an ADT client installed on the latest Eclipse 2019-06 platform.
Sometimes you might be interested in more CDS-specific aspects and want to see access control lists or test
classes. You can achieve this by switching the context from Business Object to Core Data Services context, as
you can see in the following animation.
This means, when clicking an ADT link, the relevant development object is opened in ADT directly.
Before you can click ADT links, select the adt schema on the new General Link Handlers preference page
in advance.
Link handlers enable you to handle custom URL schemas, such as the adt schema.
You can now create enhancement implementations to implement available enhancement options.
For the object to be enhanced, you can now display enhancement options as a marker. Enhancement options
that already contain an implementation are displayed with the marker . Enhancement options without
implementations are displayed with the marker . You can right-click the relevant marker to create an
enhancement implementation or to add an enhancement implementation element to an existing
implementation.
You can now change the contact person of ATC findings, if you want to assign the ATC findings to a certain
developer.
To do so, select the ATC findings in question in the ATC Problems view and choose Change Contact Person in
the context menu.
For more information, see Changing the Contact Person of ATC Findings [page 646]
When releasing a transport request in the Transport Organizer view, an ATC check run is launched
automatically in the background. If the ATC check run reports ATC findings, the Release Transport Request
dialog is displayed. Choose Display ATC Findings to display the ATC findings in the ATC Problems view.
For more information, see Launching ATC Check Implicitly [page 660]
Analyzing SQL Statements Using the SQL Trace and the Technical Monitoring Cockpit
You can now create an SQL Trace and display it in the Technical Monitoring Cockpit. This enables you to analyze
the performance of SQL statements.
To open the SQL Trace dialog, open the context menu of an ABAP project and choose SQL Trace....
For more information, see Using the SQL Trace and the Technical Monitoring Cockpit [page 745]
You can now install the ADT client also on the latest Eclipse 2019-06 (4.12) platform.
● 2019-06 (4.12)
● 2019-03 (4.11)
Get an overview of the most significant changes in ABAP core development that relate to the following:
Note
All the features that are highlighted with a '*' are client-specific and are therefore available for all supported
ABAP systems.
You can now install the ADT client on the latest Eclipse 2019-03 (4.11) platform.
● 2018-09 (4.9)
● 2018-12 (4.10)
● 2019-03 (4.11)
Note
Contrary to SAP's support and maintenance strategy, this ADT client version currently supports three
Eclipse platform versions temporary.
The ADT Installation Guide now contains information on how to prepare an Eclipse IDE package, including
ABAP Development Tools, that can be used for central distribution. This includes a description on how to
automate the preparation.
For more information, see Installing ABAP Development Tools (6.3 Recommendations for the System
Administrator).
Here is an overview of the most significant changes in the context of ABAP core development that relate to the
following:
Note
The following features that are highlighted with a '*' are client-specific and are therefore available for all
supported ABAP systems.
In this topic, you will find the release information about the following areas:
Quick Fixes provide functions that enable you to resolve errors and warnings without adapting your source
code manually.
For more information, see: Applying Recommended Quick Fixes for Multiple ATC Findings [page 652]
You can now install the ADT client also on the latest Eclipse 2018-12 (4.10) platform.
● 4.8 (Photon)
● 2018-09 (4.9)
● 2018-12 (4.10)
Note
Contrary to SAP's support and maintenance strategy, this ADT client versions supports 3 Eclipse platform
versions temporary.
As of ADT 3.0, on Microsoft Windows© operating systems only the 64-bit Eclipse version is supported.
Here is an overview of the most significant changes in the context of ABAP core development that relate to the
following:
Note
The following features that are highlighted with a '*' are client-specific and are therefore available for all
supported ABAP systems.
In this topic, you will find the release information about the following areas:
●
● Working with Transport Organizer [page 931]
● Installing ADT on the Open Eclipse 4.8 (Photon) Platform [page 931]
Merge Requests
You can now move all the objects and tasks under one request to another request.
For more information, see Including Objects in a Request Manually [page 521]
You can now install the ADT client also on the latest Eclipse 4.8 (Photon) platform.
● 4.7 (Oxygen)
● 4.8 (Photon)
Here is an overview of the most significant changes in the context of ABAP core development that relate to the
following:
Note
The following features that are highlighted with a '*' are client-specific and are therefore available for all
supported ABAP systems.
In this topic, you will find the release information about the following areas:
To do this, write a specific @testing link as an ABAP Doc comment in front of the test method or test class.
In the Scope section, you can select your own tests and/or any foreign tests that you want to execute. You can
also define restrictions such as the Risk Level and Duration. This makes, for example, the tests run faster.
In addition, you can enable coverage measurement or trace recording of the tests.
For more information, see: ABAP Unit Launch Dialog [page 624]
ATC findings that can be fixed with a Quick Fix are displayed with a lightbulb icon .
There are two ways of applying Quick Fixes for ATC findings:
● Select an ATC finding in the ATC Problems view and choose Quick Fix in the context menu.
● Jump to your source code at the position where the ATC has found a problem and choose Quick Fix in the
context menu.
For more information, see: Applying Quick Fixes for ATC Findings [page 649]
Note
If you need to enhance the SAP standard, SAP recommends using customer enhancements instead of
modifications.
Available enhancement implementations are indicated by the source code plug-in marker . The source code
plug-ins are displayed in the popup when you hover over the marker.
For more information, see: Editing Source Code Plug-Ins [page 277]
For more information, see: Modifying Development Objects Using Modification Assistant [page 166]
For more information, see: Working with Lock Objects [page 253].
You can open Runtime Error Viewer by clicking Show in the dialog that appears when a runtime error occurs.
Alternatively you can open it from Feed Reader.
For more information, see: Displaying ABAP Runtime Errors [page 766]
For more information, see: Working with Transport Organizer [page 503]
Here is an overview of the most significant changes in ABAP core development that relate to the:
Note
Following features that are highlighted with a '*' are available for all ABAP systems supported by ADT.
If system connections are missing from the SAP Logon pad when creating ABAP projects, you can now open
the ABAP Development System Connection preference page. Here you can override the detection of file
locations.
For more information, see: Using System Connections from the SAP Logon Pad [page 119]
Here is an overview of the most significant changes in the context of ABAP core development that relate to the
current ABAP Development Tools (ADT) client and the SAP NetWeaver AS for ABAP 7.52 SP00 back-end.
Note
Following features that are highlighted with a '*' are available for all ABAP systems supported by ADT.
For more information, look here: Debugging Dynpro Flow Logic [page 690]
For more information, look here: Debugging Enhancement Implementation [page 692]
For more information, see: Resetting Logs for a Logpoint [page 765]
Copying Logpoints
As of ADT version 2.83, you have the option of using copy, cut and paste functions on logpoints.
AMDP Debugger
"..." at the end of the value presentation indicates that the value has been truncated
As of ADT 2.83 (and NW 7.52), it is possible to inspect the whole variable value.
To do this, open the context menu from the first tree level, and chooseExpand Tree by....
From the dialog to be opened, you can choose one of the following radio buttons for sorting:
For more information, see: Expanding an ABAP Repository Tree [page 147]
The form-based editor provides the following information about an ABAP pacakge:
Note
3. Package Properties displaying package-relating information, such as possible superpackages and package
types
4. Transport Properties containing transport-relating information, such as transport layer, software
component,
5. The Properties is no part of the form-based editor, but it also displays additional properties, such as
package breadcrumb, version status, creation date
Note
The package breadcrump and application component are only provided if your ABAP system is
connected with an SAP HANA database.
To do this, open the relevant program in the source-based editor. Choose Run ABAP Application
(Console) from the context menu.
● Creation date
● Object description
● Pagination
● Program result
Note
For more information, see: Launching an ABAP Program (Console) [page 209]
To store properties of a database table in the database, metadata is represented and defined by annotations in
the source-based editor.
The source code is generated when it is read from the database. When you save or activate a structure, the
source code is converted to the existing persistence.
Note
To edit technical settings (data class, size category, buffering, and storage type) or to create/edit indexes,
open the integrated SAP GUI.
Getting Support from the Content Assist when Editing AMDP Method Implementations
When editing AMDP method implementations in ABAP classes, the content assist now proposes datasources,
columns, variable declarations, and so on.
For more information,see : Using Code Completion for ABAP-Managed Database Procedures [page 335]
For more information, see: Defining ABAP Formatting Options [page 361]
Linking to ABAP Repository Objects Out of the Element Information Popup and the ABAP
Element Info View
To use this new language element, add the ... {@link [[[kind:]name.]...][kind:]name} ...
syntax to your comment.
The ABAP SQL test double framework is available to manage database dependencies. This framework is an
addition to the existing ABAP unit test framework, which enables testing of ABAP SQL statements present in
your ABAP code through the normal ABAP unit test classes. For more information, see ABAP SQL Test Double
Framework [page 598].
You can now install the ADT client also on the latest Eclipse 4.7 (Oxygen) platform.
● 4.6 (Neon)
● 4.7 (Oxygen)
Here is an overview of the most significant changes in the context of ABAP core development that relate to the
current ABAP Development Tools (ADT) client and the SAP NetWeaver AS for ABAP 7.51 innovation package
SP03 back end.
Note
The following features that are highlighted with an '*' are available for all ABAP systems supported by ADT.
You can start an ATC check run with the Run As ABAP Test Cockpit With... to specify an arbitrary global
check variant.
As developer, you can use this option to override the predefined ATC check variant for a specific check run.
For more information, see: Launching ATC Check Run from the Project Explorer [page 640]
This is an overview of the most significant changes in the context of ABAP core development that relate to the
current ABAP Development Tools (ADT) client, and the SAP NetWeaver AS for ABAP 7.51 innovation package
SP02 back end.
Note
Features highlighted with an asterisk ('*') are available for all ABAP systems supported by ADT.
● Upper/Lower Case Conversion to define formatting of ABAP keywords and identifiers in lower and upper
case more transparently.
● Preview to see what the result of the formatting options will look like before publishing. An example code
snippet is used and displayed for this.
You can now display the previously performed test runs in the ABAP Unit Test history. This enables you to
switch between different test runs without performing them again. The advantage is that you save time and will
immediately have the already evaluated test run(s) back at your disposal.
To display the history, choose the arrow from the History... icon displayed in the toolbar for the ABAP Unit
Runner view. To open the relevant test run, double-click it in the ABAP Unit Test History.
Note
When you perform a test run, the previous result will be overwritten but not deleted.
You can preconfigure to display up to the last 99 test runs. To do this, enter the relevant number in the
Maximum number of remembered test runs input field.
For more information, see: Using the History to Switch Between Results of ABAP Unit Tests [page 633]
In the ABAP Unit Runner view, you can now restrict the number, for example, to display only unit tests that have
errors.
To do this, select one or more of the following checkboxes from the bar above the result tree for the tested
development object:
Note
If you deselect a checkbox, the corresponding test methods are hidden. This improves readability and
makes it easier for you to focus on the relevant test results.
If you right-click one of the selected checkboxes, the remaining selections are deselected. This enables you
to deselect the remaining checkboxes in one step.
For more information, see: Evaluating ABAP Unit Test Results [page 628]
The number of test methods in a test class is now displayed at result tree level of the tested development
object. This enables you to investigate where and how many test methods exist.
The number is displayed in total for each main program and test class in blue brackets.
For more information, see: Evaluating ABAP Unit Test Results [page 628]
ADT now displays the total execution time of a test run in the bar above the result tree for the tested
development object.
For more information, see: Evaluating ABAP Unit Test Results [page 628]
You can run now different test runs in parallel. This makes it possible to trigger several test runs if another test
run is already in progress.
ADT will always overwrite the results of the last test run. Using the ABAP unit test history, you can now select
and open the relevant result.
Here is an overview of the most significant changes in the context of ABAP core development that relate to the
current ABAP Development Tools (ADT) client and the SAP NetWeaver AS for ABAP 7.51 innovation package
SP01 back end.
The following features that are highlighted with an '*' are available for all ABAP systems supported by ADT.
Searching within the Element Info Popup and Element Information View*
The Element Info popup and Element Information view now provide a search input field at the bottom. This
enables you to search for elements within the element info.
The relevant search results are then highlighted in the element info. To browse through the search results, you
can use shortcuts and icons.
For more information, see: Displaying Details in the Element Info Popup and the ABAP Element Info View [page
387]
Browsing within the Element Info Popup and Element Information View*
You can now use shortcuts to browse in the history and the usages in the Element Info popup and Element
Information view.
For more information, see: Displaying Details in the Element Info Popup and the ABAP Element Info View [page
387]
Getting Support from the Content Assist when Editing AMDP Method Implementations
When editing AMDP method implementations in ABAP classes, the content assist now proposes datasources,
columns, variable declarations, and so on.
For more information, see: Using Code Completion for ABAP-Managed Database Procedures [page 335]
In the breadcrumb bar of the ABAP source code editors, information about control structures is now provided.
This helps you to orientate within a processing block and to navigate to other branches of a control structure.
For more information, see: Getting Orientation in the Source Code Using Breadcrumbs [page 394]
To launch an ABAP class, you have to add the if_oo_adt_classrun ABAP interface to its definition and
implement the relevant main method. You can then perform Run As + ABAP Application (Console) from
the context menu of the source code editor. Alternatively you can choose F9 .
For more information, see: Launching an ABAP Application (Console) [page 205]
You use domains to define a value range. You can now create, edit, and delete domains in the integrated form-
based editor of your Eclipse-based IDE.
Help Contents
Providing "How to" Information for SE80 Experts who are Switching to ADT
If you are an SE80 expert who has started working with ADT, you will now find the following information in the
Help Contents:
● Eclipse basics in the Getting Started chapter that describe the most relevant elements of the Eclipse UI in
general.
● FAQs in the Reference chapter that compare the "how to" information of the most relevant ABAP
development activities in environment SE80 and in ADT.
The FAQ list is divided into different development areas.
Here is an overview of the most significant changes in the context of ABAP core development that relate to the
current ABAP Development Tools (ADT) client and the SAP NetWeaver AS for ABAP 7.51 innovation package
SP00 back end.
Note
Following features that are highlighted with a '*' are available for all ABAP systems supported by ADT.
ABAP repository trees enable you to define your own selection of the development objects in the Project
Browser. In addition, they display for each level the number of containing objects and a short text.
Note
This functionality requires working on SAP NetWeaver AS for ABAP 7.51 innovation package SP00 that is
connected with a SAP HANA database.
So far, the Favorite Packages and the System Library with all development objects are displayed by default in
the Project Explorer.
● Local Objects ($TMP) displays your local objects sorted in accordance to the user and object type.
● System Library displays all development objects sorted in accordance to the corresponding ABAP package.
You can now specify the documentation status of a data element to defines whether documentation has
already been written or whether it is still required.
For more information, look here: Changing the Documentation Status [page 236]
The ABAP Source Search now also supports the IBM Db2 database type.
For more information, look here: Searching ABAP Source Code [page 319]
You can now open a development object directly from the position where it is displayed in the Element Info
Popup.
Example of the context menu entry in the Element Info popup from where you can navigate to a development object
To do this, select the relevant usage in the Element Info Popup and open the context menu. Choose then
Navigate.
For more information, look here Displaying Details in the Element Info Popup and the ABAP Element Info View
[page 387]
You, as a developer, can now check which APIs are released and stable for usage – and which are not.
Consequently, customer objects that only use released APIs do not need to be adapted after the next SAP
NetWeaver support package or upgrade.
Using Quick Fixes and Code Completion to Format ABAP Doc Comment*
You can add formatting using code completion ( Ctrl + Space ). In addition, you can also use quick fixes
( Ctrl + 1 ) to adapt formatting to existing comments.
To perform both, position the cursor at the corresponding position or select the relevant text. Press then the
shortcut and choose the relevant formatting from the popup.
You have now the option to debug CDS table functions using the AMDP debugger. A table function consists of a
CDS definition and a SQLScript procedure implementation that is used for data retrieval once the table
function is accessed (for example using OpenSQL).
Now, you cannot only debug AMDPs with ABAP Development Tools (ADT). The integrated debugger that is part
of the ADT client installation, allows you also to debug the CDS table functions within the ABAP development
IDE.
ABAP Development Tools now provides a form-based editor to create and edit APC applications. Using this
editor you can configure an APC application that enables bi-directional communication with user agents
through the integration of WebSockets or TCP Sockets.
For more information, look here Working with ABAP Push Channels [page 296]
Here is an overview of the most significant changes in the context of ABAP core development that relate to the
current ABAP Development Tools (ADT) client and the SAP NetWeaver 7.5 SP04 back end.
Note
The features below that are highlighted with an '*' are available for all ABAP systems supported by ADT.
You can now install the ADT client also on the latest Eclipse 4.6 (Neon) platform.
● 4.5 (Mars)
● 4.6 (Neon)
You can now navigate from the Element Information Popup of a usage to the Element Information Popup of
another usage by clicking its name. Note that the same functionality is also provided for the ABAP Element Info
view.
Example of an Element Information popup from where you can open the corresponding information of another usage
For more information, look here Displaying Details in the Element Info Popup and the ABAP Element Info View
[page 387]
You can generate the code snippet for the method redefinition and its implementation block in one step. To do
this, position the cursor between the CLASS implementation and the ENDCLASS statement. Then trigger the
code completion. As a result, a list with all methods that can be overridden is displayed. From here you can
choose the relevant method.
Note
The supercall is not added by default. You will have to add it to the method implementation block manually.
For more information, see Overriding Methods from Superclasses [page 333]
Adding ABAP Doc Comments for Methods Using The Quick Assist
In the definition of an ABAP class, you can document a method. When using the <p class="shorttext
synchronized"> tag, the short texts between the form-based Class Builder in the backend and the ADT
source code editor are synchronized automatically.
In the definition of an ABAP class, you can now document a method by using the Add ABAP Doc quick assist.
The <p class="shorttext synchronized"> tag is then added in an ABAP Doc comment block. When
activating, the short texts will be synchronized with the back end.
Here is an overview of the most significant changes in the context of ABAP core development that relate to the
current ABAP Development Tools (ADT) client and the SAP NetWeaver 7.5 SP03 back end.
Note
The features below that are highlighted with an '*' are available for all ABAP systems supported by ADT.
Now you can configure the syntax coloring preference for each single ABAP keyword or the sequence of several
ABAP keywords, for example, "call method", used within a statement. This enables you to highlight all
relevant occurrences and to improve readability when you skim through ABAP source code objects such as
ABAP classes, interfaces, programs, and so on.
To proceed, open ABAP Development Editors Source Code Editors ABAP Keyword Colors preference
page. From here you can use a set of predefined syntax coloring configurations provided by SAP.
Note
To make these default configurations visible in your ABAP source code, you also have to apply your
preference.
For more information, look here Changing The Color of Individual ABAP Keywords [page 364]
Now you can predefine a background color to highlight the implementation of a method in the source code
editor. Then, between the METHOD and ENDMETHOD statement, the background color of a method body is
displayed in the predefined color.
To proceed, open the General Appearance Colors and Fonts preference page and expand the ABAP
Syntax Coloring folders. From here you edit the ABAP method block entry.
For more information, look here Changing the Font Color of Texts [page 363]
Here is an overview of the most significant changes in the context of ABAP core development that relate to the
current ABAP Development Tools (ADT) client and the SAP NetWeaver 7.5 SP02 back end.
Note
Following features that are highlighted with a '*' are available for all ABAP systems supported by ADT.
On the first page of the creation wizard for ABAP projects, is now a tabular overview displayed. Here, you can
find all system connections that are configured in the SAP Logon.
● You can choose an existing system connection. Then, on the second page, all connection details are
displayed. From here, you can review or, if required, modify them.
● You can configure a new system connection for your ABAP project from scratch.
For more information, look here Creating ABAP Projects [page 115]
Here is an overview of the most significant changes in the context of ABAP core development that relate to the
current ABAP Development Tools the (ADT) client and the SAP NetWeaver 7.5 SP01 back end.
Note
The following features that are highlighted with an '*' are available for all ABAP systems supported by ADT.
When debugging ABAP code, you have now the option to specify a condition for an ABAP breakpoint. The
condition is evaluated at runtime whenever the source code position of the related breakpoint is reached. If the
condition is fulfilled, the debugger will stop execution at the breakpoint.
For more information, look here: Adding Conditions to Breakpoints [page 674]
From the toolbar, you can provide additional supplementary documentation for each data element in order to
provide individual program-specific and dynpro-specific field help.
For more information, look here: Providing Supplementary Documentation [page 237]
When using Ctrl + Shift + A , you can now define the following defaults for the search text field:
To fill these defaults in the search text field, define the following Search preferences:
● Use as initial search pattern to enter a default search pattern in the input field.
● Use pattern from previous search to reuse the previously entered search string.
For more information, look here: 'Open ABAP Development Object' Dialog [page 157]
You can now indicate for which scenario (such as Unicode program (default) and ABAP for Key Users) the
syntax rules and language elements of ABAP programs and classes need to be checked.
For more information, look here Defining the ABAP Language Version of ABAP Programs and Classes [page
536]
This is an overview of the most significant changes in ABAP core development, that relate to the current ABAP
Development Tools (ADT) client and SAP NetWeaver 7.5 SP00 back end.
Note
The features listed below that are highlighted with an asterisk (*) are available for all ABAP systems
supported by ADT.
You can now access, create, edit, transport, and delete structures from the ABAP Dictionary. For this purpose,
the source-based editor is provided where you can work with structures in the same way as you are used to for
ABAP classes, programs, and so on.
● Syntax highlighting
● Code completion
● Navigation
● Where-used list
● Code element info
● Automatic syntax check
● Context-sensitive ABAP keyword documentation
You can now access, create, edit, transport, and delete data elements from the ABAP Dictionary. For this
purpose, the form-based editor is provided.
To do this, select the object in the Project Browser and choose Change Package Assignment. Then define the
new package.
For more information, see Changing the Package Assignment of Development Objects [page 191]
You can edit a class that consists of several subobjects, such as a public section, method implementation, or
local class includes. You can then assign each change made to a subobject to a transport request separately.
If you want to edit an ABAP class where the changes have already been assigned to a transport request by
another user, the Link Up of Transport Request dialog opens automatically:
Example of a dialog where you select the assignment of the transport request
For more information, look here Working with ABAP Classes Assigned to Multiple Transport Requests [page
202]
If you edit an existing function module with untyped parameters, the editor automatically adds the
##ADT_PARAMETER_UNTYPED pragma to the definition. When you perform save, the parameter is kept
untyped and unchanged in the back end – that is, the system does not explicitly add TYPE ANY or TYPE
STANDARD in transaction SE37.
You can specify whether you want to generate your own or the standard comment block before the REPORT
statement.
You can now synchronize ABAP Doc from descriptions of the Class Builder using the source-code editor in
ABAP Development Tools (ADT) and vice versa.
For more information, see Synchronizing ABAP Doc Comments [page 374]
You can now export source code documentation of ABAP classes and ABAP interfaces – for example, if you
want to have a backup for them for audits.
For more information, see Exporting ABAP Doc Comments [page 378]
When you activate several development objects, the inactive objects are now automatically sorted according to
the transport requests to which the changes are assigned. As a result, the inactive objects are sorted upwards
according to the names of the transport tasks in the Activate inactive ABAP development objects dialog.
Example
You want to test an ABAP class that refers to a class of the same transport request that was modified by
another user.
Deselect the Group object list by transport request checkbox if you only want to perform sort for the inactive
objects.
In the General and Specific tab of the Properties view, you can now display and change the properties of the
following ABAP development objects:
● Classes
● Interfaces
● Function groups
● Function modules
● Programs
● Includes
● Type groups
● Transformations (read-only)
For more information, see Displaying Properties of Development Objects [page 179]
When performing Ctrl+Shift+A, you can now limit the number of displayed entries by entering "<". Then,
only the development objects are displayed whose name ends on the value that you entered before the "<"
character.
Example
To see all the development objects ending with "Test", use "*Test<"
You can now create and edit simple transformations (ST) and XSL transformations in their own source-based
XML editor. For the creation function, you can use the corresponding templates.
You can display the system information of an ABAP project in the System tab of the Properties view. This
enables you to find out, for example, whether the requirements for a certain functionality are supported.
For more information, see Displaying System Connection and Database Configuration [page 125]
Refactoring Aids
You can surround the selected block of statements with a TRY CATCH statement in order to handle raised
exception(s) as a single or multiple TRY CATCH block.
For more information, see Surrounding with TRY CATCH [page 451]
You can add a local variable to the method signature. Its type refers to the raised exception of the calling
method. In addition, this local variable is added as an INTO clause to the already existing CATCH block. This
enables you to handle the result of the exception in order, for example, to display it in a message.
You can add a new CATCH block to an existing TRY CATCH statement. This enables you to handle another
exception in an existing TRY CATCH statement.
For more information, look here Extending a TRY CATCH Statement [page 459]
You can replace an existing MULTI CATCH block by individual CATCH blocks for each exception separately.
You can remove an entire TRY CATCH statement if you no longer want to handle the exceptions.
For more information, see Removing a TRY CATCH Statement [page 463]
You can now generate the getter and/or setter method stubs from an attribute in the definition of an ABAP
class in the implementation. In addition, the corresponding importing and/or returning parameter(s) are set.
For more information, see Generating Getters and Setters [page 491]
Exception classes have special constructor methods. If they implement the interface IF_T100_MESSAGE, the
signature and the implementation have a special logic.
You can now regenerate their constructor if you have added or removed:
For more information, see Regenerating a Constructor for Exception Classes [page 493]
Logpoints indicate to the ABAP runtime that an ABAP program is to execute a custom action at a certain point
within the program. Dynamic logpoints have been introduced in order to support logging in quality or
productive systems where the source code cannot be changed.
You can now use the Condensed Hit List to find top consumers with regard to procedure calls, such as
methods, function modules, subroutines, or other kinds of calls.
Finding Top Consumers Using the Condensed Hit List [page 711]
For more information, see Analyzing Trace Events in the Aggregated Call Tree [page 726]
ABAP Debugger
You can now use project-specific debug settings to change the user for which ABAP breakpoints are in effect. In
the special case where several people are using the same user name and password (group users) the new
option. This project only within the project-specific settings allows you to handle technical conflicts during
debugging.
AMDP Debugger
ABAP Managed Database Procedures (AMDP) are a new feature in AS ABAP that enable developers to write
database procedures directly in ABAP. You can now debug AMDPs using ABAP Development Tools (ADT).
The integrated AMDP Debugger is used to debug the execution of DB procedures running on HANA DB and
provides the developer with the following activity options:
Here is an overview of the most significant changes in the context of ABAP core development that relate to the:
You can now install the ADT client also on the latest Eclipse 4.5 (Mars) platform.
● 4.4 (Luna)
● 4.5 (Mars)
Here is an overview of the most significant changes in the context of ABAP core development that relate to the:
Note
The following features that are highlighted with a '*' are available for all ABAP systems supported by ADT.
When you perform code completion, you can now configure the preferences to insert the full signature of a
method, function module, or form routine automatically.
Note
This functionality is not enabled by default. To use it, you need to select the Always insert full signature on
completion option in the Code Completion preferences.
For more information, look here Inserting a Full Signature Automatically [page 331]
When you perform code completion, you can now configure the preferences to overwrite the existing keyword
or identifier with the selected proposal from the code completion list.
Note
This functionality is not enabled by default. To use it, you need to select the Completion overwrites radio
button in the Code Completion preferences.
Here is an overview of the most significant changes in the context of ABAP core development that relate to the:
Note
The following features that are highlighted with a '*' are available for all ABAP systems supported by ADT.
You can open an executable object like an ABAP program in a new or in the same SAP GUI window. If you want
to open it in the same window, select the Open SAP GUI as separate window option on the SAP GUI
Integration preference page. To do this, choose the Window Preferences ABAP Development SAP GUI
Integration menu.
For more information, look here Running as ABAP Development Object [page 188]
Firstly, you can edit and merge versions of the same development objects in the Compare Editor.
This enables you to adopt individual or all changes, for example, from one system into another or from a
previous version into the inactive version of the object.
Secondly, if you use the new Alt Shift C shortcut, ADT automatically:
1. Evaluates the ABAP project that you selected previously for comparing code versions across ABAP
projects.
2. Triggers the compare editor using the evaluated ABAP project.
For more information, look here Comparing Source Code [page 218] and Comparing Across ABAP Projects
(ABAP Systems) [page 221]
BAdI definitions are now displayed underneath their enhancement spots in the Project Explorer. This enables
you to open, and directly navigate to, the selected BAdI definition in the SAP GUI.
ADT now provides help content for people with a physical disability, such as restricted mobility or limited vision,
or those with special needs to use its features successfully.
For more information, look here Accessibility Features in ADT [page 112]
You can correct misspelled variables using a quick fix if another variable with a similar name exists.
For more information, look here Correcting Misspelled Variables [page 431]
You can reuse existing interface members by adding the corresponding interface name and the '~' component
selector.
For more information, look here Adding the Interface Name [page 433]
You can generate and reuse an alias from a variable that points to the ~ component selector of an interface.
Here is an overview of the most significant changes in the context of ABAP core development that relate to the:
Note
Following features that are highlighted with a '*' are available for all ABAP systems supported by ADT.
If you open an ABAP include that is used in several main programs, the following dialog is opened that depends
on where the include is displayed in the node structure of the Project Explorer:
● If the main program is not assigned to an include and the include is displayed directly beneath the Include
node, the dialog for selecting a main program is opened as follows:
If you open the Properties view, the General tab and the Specific tab are provided. In the Specific tab your
previous selection is displayed. Here, you can also select a main program from the dropdown list.
Note
Now, the selection is valid until you close the include editor.
For more information, look here: Selecting a Main Program for Multiple-Use ABAP Includes [page 207]
When you create an ABAP project from an existing system connection, the icon of the ABAP project in the
Project Explorer is displayed with a decorator. Because, the project is referencing a system connection in the
For more information, look here: Using a Predefined System Connection from the SAP Logon [page 116]
You create an ABAP project from an existing ABAP project in order to modify or reuse the existing system
connection.
For more information, look here: Duplicating an Existing System Connection [page 124]
If you are, for example, working on an object in an ABAP project and debugging it at the same object in another
project, you can now directly jump between these projects. For jumping, open the object and select Open in
Project from the context menu.
For more information, look here Opening in Another System [page 160]
Refactoring Aids
You can move member definitions (for example, constants, attributes, methods, types, and events) from a
subclass and to its superclass.
For more information, look here Pull-up Members to Superclass [page 442]
You can move member definitions from a class and add them to the implemented interface. To avoid
invalidation of existing usages, aliases are declared.
For more information, look here Pull-up Members to Interface [page 444]
Here is an overview of the most significant changes in the context of ABAP core development that relate to the:
Note
Following features that are highlighted with a '*' are available for all ABAP systems supported by ADT.
You can toggle between the inactive and active version of any source-based objects such as ABAP classes,
function modules, or programs. This functionality enables you to read the inactive version that is saved by
another user and not available in your working area.
For more information, look here: Switching between Inactive and Active Versions of a Source-based Object
[page 400]
From the context menu in the Project Browser, you can copy the hyperlink of a development object and paste it
into an email or any document. This enables you to create a hyperlink so that the receiver can open the ABAP
source code of the development object in a Web browser.
Note
● ABAP programs
● ABAP includes
● ABAP function groups
● ABAP function group includes
● ABAP function modules
● ABAP classes
● ABAP interfaces
For more information, look here: Linking for Displaying ABAP Source Code in a Web Browser [page 171]
You want to share a hyperlink to a development object or a part of ABAP source code through an email. To do
this, you can now select Email link in the Share Link dialog. A new email is then generated from your default
email client where the hyperlink is added.
For more information, look here where this functionality is provided for the following functions:
Typically, an include program is used by exactly one main program. If an include program is used in several
main programs, you need to select a specific main program in order for the functionality to be executed.
You can now select a specific main program for a multiple-use include program in the Properties view. Note that
this selection is valid until you close your Eclipse-based IDE.
Whenever a specific functionality (for example, ABAP syntax check, navigation, and so on) is executed that
requires a main program, but none is selected, a dialog is opened. You then need to select a main program in
the Properties view.
For more information, look here: Selecting a Main Program for Multiple-Use ABAP Includes [page 207]
In the Element Info view and Element Info popup, the following details are now displayed:
● Texts that are provided for message classes and text elements
● If a long text exists for any ABAP function module, a link to the corresponding documentation is provided:
You want to define the connection of your Eclipse-based IDE to an ABAP system directly without using the SAP
Logon Pad. This enables you to adopt certain properties like the connection type, message server, instance
number, and so on.
For more information, look here: Defining a Manual System Connection [page 120]
The Quick Assist view supports you in executing refactorings and ABAP quick fixes, or when generating ABAP
source code. It interacts directly with the ABAP source code editor. At every position where a quick assist can
be applied, the content of the Quick Assist view is therefore automatically updated according to the selection
made.
● Proposal overview that displays the possible quick assists at the current cursor position in the source
code.
● Description per proposalIn the source code editor, the following other quick assists are now provided for
that provides details about the operating steps of the quick assist that is selected in the Proposal overview.
● Previous Result that displays the changes performed by the recently applied quick assist.
From the toolbar, you can execute several operations like applying the selected proposal, disabling link with
editor, clearing the result history, and so on.
For more information, look here: Quick Assist View [page 91]
In the source code of an ABAP program, you can now also create a local ABAP class or interface directly from
the name of the missing class or interface. The creation of global classes is already possible.
For more information, look here: Creating ABAP Classes or ABAP Interfaces from Usage [page 481]
Using a text symbol makes a development object translateable and easier to maintain.
● Creating a Text Symbol in the Text Pool [page 496] to add new text symbols to the text pool
● Editing Text Symbols [page 499] to adopt the text content or text key
● Correcting Inconsistencies Within Text Symbols [page 500] to adopt changes between the text pool and
source code editor
● Switching Notations [page 501] to substitute a fully-qualified literal of a text symbol with a notation
For more information, look here: Creating and Editing Text Symbols (Quick Assists) [page 495]
Now, in the Search view, the number of matches and the development objects that contain at least one match
are displayed. The matches themselves are structured according to ABAP packages, development objects, and
the subobjects where the actual matches are highlighted.
From the context menu of a selected development object or element, you can:
In the Search Filter input field, you can now limit the search for the name of the responsible user provided in
table TADIR, field AUTHOR.
For more information, look here: Searching ABAP Source Code [page 319]
ABAP developers have various new options at their disposal for using ATC in ABAP Development Tools. In the
current shipment, they can use ATC in the following use cases:
For more information, look here: Checking Quality of ABAP Code with ATC [page 638]
Here is an overview of the most significant changes in the context of ABAP core development that relate to the:
Note
Following features that are highlighted with a '*' are available for all ABAP systems supported by ADT.
It is now possible for you to manually define the connection of your Eclipse-based IDE to an ABAP system. This
will enable you to adopt certain properties like the connection type, message server, instance number, and so
on. For this, no existing connection from the SAP Logon Pad is required.
Here is an overview of the most significant changes in the context of ABAP core development that relate to the:
Note
Following features that are highlighted with a '*' are available for all ABAP systems supported by ADT.
The breadcrumb functionality helps you to orientate yourself and navigate within the source code of a
development object. It provides you with the same structural information as the Outline view.
● ABAP classes
● ABAP interfaces
● ABAP programs
● ABAP includes
● ABAP function group main inlcudes
● ABAP function group inlcudes
● ABAP function modules
More on this: Getting Orientation in the Source Code Using Breadcrumbs [page 394]
Currently, in a source code-based object, the content assist function also proposes non-keywords such as
element names or type definitions. This enables you to add the corresponding names or definitions that are
already used in this particular development object. Note that only non-keywords that are already used in the
same development object are proposed.
To activate this functionality, select: Window Preferences ABAP Development Editors Source Code
Editors Typing Also suggest non-keywords
Feature Explorer
The Feature Explorer is a new interactive view. It provides a tutorial for ABAP programmers who come from the
classic ABAP Workbench and now want to start working with ADT.
The tutorial is grouped into tours in accordance with the ADT features that are most relevant for your daily
work. In addition, a link to the corresponding help content is provided if you want to learn more about a
Here is an overview of the most significant changes in the context of ABAP core development that relate to the:
In the message class editor, you can display the long text of a message that was added through the back end in
an ABAP project. For this purpose, select the Preview button in the toolbar.
Note
Refactoring Aids
Converting local inline declarations of one or several variables into explicit declarations
Declaring a new variable and assigning the result of a statement to this variable
Moving an expression to a new method and replace it with the call of a new method
Adding an exception to the method signature based on an existing RAISE EXCEPTION statement in the
method implementation
Creating an ABAP function module from the name of the missing repository object. For this purpose, the
corresponding creation wizard is opened.
More on this: Creating ABAP Function Modules from Usage [page 484]
Creating an ABAP include from the name of the missing repository object. For this purpose, the corresponding
creation wizard is opened.
Creating a instance method in the public section of the current ABAP class.
Note
If the class has attributes, a dialog is opened where you can select the attributes that should be
instantiated.
Creating a static create method in the public section of the current ABAP class
Note
If the class has attributes, a dialog is opened where you can select the attributes that should be
instantiated.
The SAP HANA-based ABAP Source Search enables you to find text that is developed in source-based
repository objects (like classes, programs, function pools) of an ABAP project.
Note
In order to enable the ABAP code search functionality, your ABAP system must use a SAP HANA database.
In the source code editor of an ABAP class, ABAP program, or an ABAP function group, you can display the
source code plug-ins of the available enhancement implementations in the enhancement popup. If there are
several enhancement implementation elements available, the hierarchy of the source code plug-ins is
displayed in addition.
Example
The following enhancement popup is displayed if one source code plug-in is added at an enhancement option:
When debugging ABAP code, you can use watchpoints to track the value of individual ABAP variables. The
ABAP debugger stops as soon as the value of a watched variable has changed. Furthermore, you can specify
conditions for watchpoints. The debugger then additionally checks whether this condition is fulfilled.
The tables view of the ABAP Debugger has been enhanced to support changing, deleting, and inserting rows in
internal tables.
Here is an overview of the most significant changes in the context of ABAP core development scenario that
relate to the:
● Back end: SAP NetWeaver 7.3 EHP1 SP4 vs. SP7 and SAP NetWeaver 7.4 SP00 vs. SP03
● Client: ABAP Development Tools (ADT) 2.13
Note
Following features that are highlighted with a '*' are available for all ABAP systems supported by ADT.
Now, the ABAP source code editor automatically checks the syntax of a development object you are currently
working on.
Note
Now, the ABAP source code editor automatically triggers the code completion if you enter one of the following
component selectors: -, ~, -> , =>
Note
More on this: Getting Support from the Content Assist [page 325]
For registering a developer and manual changes to SAP objects like database procedure proxies, SAP HANA
transport container, external views, Core Date Services (CDS) entities in an ABAP system an access key is
required.
Moving a definition of a local variable, type or constant to the private section of the current class. This enables
you, to make the variables available for all methods within an ABAP class. More on this: Converting Locals to
Class Members [page 420]
Converting inline declarations of one or several variables to a local variable in the corresponding method
definition.More on this: Declaring Variables from Usage [page 428]
Moving a member definition between the public, protected and private section to change its visibility in your
source code. More on this: Changing Visibility of Members [page 439]
Extracting constants
In the source code editor, you can now substitute literals with constants in order to:
● Create a local constant from a literal to make it available in a certain method. The corresponding literals are
replaced with the added constant.
● Create a member constant by extracting a constant to make it available for all methods of an ABAP class.
The corresponding literals are replaced with the added constant.
● Reuse an existing constant that has already been declared for the same value.
Extracting variables
In the source code editor, you can substitute literals with variables in order to:
● Create and extract a local variable from a literal to make it available in a certain method. The corresponding
literals are replaced with the added variable.
● Create and extract an attribute from a variable to make it available for all methods of an ABAP class. The
corresponding literals are replaced with the new attribute.
Generating the implementation part of a method from an existing declaration in the definition part of an ABAP
class
More on this: Creating Method Implementations from the Method Definition [page 468]
Generating the declaration of a method directly out of the implementation part of the corresponding method of
an ABAP class
More on this: Creating Method Definitions from Implementation Parts [page 470]
In an ABAP class, generating the implementation part of methods that are defined in an ABAP interface as well
as method stubs of other unimplemented methods More on this: Creating Implementation Parts for
Unimplemented Methods [page 472]
Note
In SAP NetWeaver 7.0 EHP3 / 7.31, you can only create the implementations for unimplemented interface
methods.
In SAP NetWeaver 7.4 and subsequent releases, you can only create the method implementations in certain
situations.
In an ABAP class, generating the missing method definition and implementation part from the method call
In the source code of an ABAP program, triggering the creation of a global ABAP class or interface directly from
the usage of the missing class or interface
More on this: Creating ABAP Classes or ABAP Interfaces from Usage [page 481]
Now, the Transport Organizer view is integrated with the basic functions of the SAP GUI-based Transport
Organizer. For each system node, it provides access to the complete object list of the logged-on user. This
allows you, to perform the basic developer operations such as running consistency checks or releasing
transport requests and tasks.
Example of a folder structure in the transport organzier view that represents two transport requests
ABAP doc comments are additional information that can be added or imported to ABAP classes, ABAP
interfaces, ABAP programs, or ABAP function groups. ABAP doc comments are added with ''! in the ABAP
source code and can be rendered in the ABAP element info view or in a tooltip.
ABAP Profiler
The ABAP Profiler comes along with a Call Timeline tool, which visualizes the trace events and time consumed
in form of a diagram. In general, the appearance of the trace events in this graphical tool corresponds to those
in the Call Tree tool. The horizontal of the diagram displays the temporal sequence of each trace event
measured, whereas the horizontal represents the call depth within a call hierarchy. In contrast to the Call Tree,
the trace events however are represented not as discrete tree nodes, but as a continuous sequence. The
advantage of the new tool is the graphical representation and a quick detection of eye-catching patterns.
The ABAP Profiler provides you with a further analysis feature, which is especially relevant for central or
framework components. Starting from the Hit List, you can Display All Executions of a performance hotspot in
the list. The resulting view displays more details for each individual trace event execution. The new property
Stack Id allows you to analyze the executions in relation to their call stack. Furthermore, the context menu
action Show Stack Aggregation allows you find out how, for each individual stack, the trace event executions are
distributed.
Whenever the database portion of the overall runtime distribution is (unexpected) high, you may want to find
out, which database accesses cause it to happen. The Database Accesses tool allows you to identify and
analyze the top consumers during the database accesses. It provides you with a list of tables that are used
when running the application in question. In addition, detailed information for each database access (such as,
access type, buffer settings, duration of table accesses) is provided.
The Variables view of the Debugger now allows you to open an ABAP Exception view to analyze details of a
selected ABAP exception object.
Hyperlinks
Some links are classified by an icon and/or a mouseover text. These links provide additional information.
About the icons:
● Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your
agreements with SAP) to this:
● The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information.
● SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any
damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.
● Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering a SAP-hosted Web site. By using such
links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this
information.
Example Code
Any software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax
and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of
example code unless damages have been caused by SAP's gross negligence or willful misconduct.
Gender-Related Language
We try not to use gender-specific word forms and formulations. As appropriate for context and readability, SAP may use masculine word forms to refer to all genders.
SAP and other SAP products and services mentioned herein as well as
their respective logos are trademarks or registered trademarks of SAP
SE (or an SAP affiliate company) in Germany and other countries. All
other product and service names mentioned are the trademarks of their
respective companies.