ABAP Development Tools Features
ABAP Development Tools Features
features
Table of Contents
Table of Contents 2
Overview 4
2
8. Code Element Information 42
9. Searching in Eclipse ADT 45
Object Search 45
Local Code Search 46
15. Embedded SAP GUI 51
16. Shortcuts 51
17. Refactoring 54
Rename (Shortcut Alt + Shift + R) 56
Extract a Method (Shortcut Alt + Shift + M) 59
Delete Unused Variables (Shortcut Alt + U) 59
18. ABAP Unit Test & Code coverage 60
19. Help 62
20. Feed reader 64
21. Task managment 65
22. Accessibility Features 66
23. Unit Testing 67
24. Relation Explorer 68
Features Top 10 71
Conclusion 72
Overview
ABAP Development Tools (ADT) is the Eclipse-based development
environment for ABAP. They are characterized by the same look and feel and the
3
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 Dictionary objects, CDS editors, the integration in
Outline, and Tasks, Problems, Project Explorer, ABAP Unit views.
ABAP development tools are the integrated development environment (IDE) for
ABAP development on the open Eclipse platform. It enables SAP developers to
do the following:
4
Features of ABAP development tools
From the very first versions the ABAP Development Tools in Eclipse already had
a rich set of features for the efficient ABAP development but there was still some
room for improvement.
1. Perspectives
5
What is a Perspective?
For example:
Within the window, you can open multiple perspectives and switch between them
by clicking their icons in the perspectives toolbar.
ABAP perspective
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.
6
You can open the ABAP perspective from the toolbar:
To set a perspective and all views back to default, choose Window >
Perspective> Reset> Perspective from the menu bar.
7
To store a perspective, choose Window> Perspective> Save Perspective from
the menu bar and select the relevant folder on your drive.
➔ The result :
In the ABAP Perspective, the ABAP tools are ideally positioned in the IDE to
facilitate your development tasks. Nevertheless you are free to rearrange all
views and editors to your personal needs.
8
Example of the screen when editing an ABAP class with ABAP Development Tools:
9
ABAP Profiling: ABAP profiling lets you analyze the runtime behavior of an
ABAP program.
As shown below, Profiling Setting can be accessed via Menu > Window >
Preferences > ABAP Development > Profiling:
10
ABAP Trace: The ABAP Trace has been integrated into 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, which can be useful when you are
trying to understand a problem or learn about code you must analyze or
maintain.
● Is designed for ABAP developers who build OData Services or other ABAP
functionality related to the ABAP RESTful Application Programming Model
(RAP).
● Provides insights into the RAP runtime framework. This includes the
processing of OData requests, for example, in SAP Fiori applications.
● Includes functionality which is similar to the payload trace of SAP Gateway
trace in SAP GUI. However, it does not include a replay functionality for
OData requests.
The ABAP Cross Trace has been integrated into ABAP Developer Tools (ADT).
To trace potentially sensitive data, you need the authorization object S_XTRACE
with the appropriate configuration. However, tracing of potentially sensitive data
can also be restricted through an authorization configuration or deactivated by
the user.
The ABAP Cross Trace differentiates between sensitive data (for example
financial data, personal data, or business data) and non-sensitive data. The
11
transferred data might contain sensitive data. Consequently, a user needs
specific authorizations to trace or view sensitive data.
Tracing Scope
A trace record contains information about the component from which it results. A
trace record is written for a certain trace level.
Step 1:
Go to ABAP Perspective > Right click on Program > Profile As > ABAP
Application (or Use Shortcut Ctrl + Shift + F9)
12
Step 2:
Go to ABAP Profiling Perspective: Go to ABAP Traces Tab > Refresh Project >
Double click performed Trace entry > Analyse Trace with different Profiling tools
13
Step 3:
After that, Go to Hit List tab > Select Trace event > Double click > Stack can be
reviewed in Properties view > Drill down possible for further information
Step 4:
After that, Go to Call sequence tab > Select Trace event > Double click > Stack
can be reviewed in Properties view
Step 5:
Similarly, Go to Call timeline tab > Select Required Timeline> Double click >
Stack can be reviewed in Properties view
14
Step 6:
In addition, Go to Database Accesses tab > Select DB hit entry > Double click
Debug perspective
Debugging is Eclipse ADT is a little different as that of Classical SAP GUI
debugging. Eclipse provides a dedicated separate “Debugger Perspective” for
debugging purpose. Debugger perspective, just like other perspectives, has
many views for different purposes.
15
Diagram 1.
16
When ABAP encounters an active breakpoint, ABAP Development Tools (ADT)
opens the Debug perspective. The Debug perspective may automatically start,
or you may be asked to confirm the start.
● The navigation toolbar 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.
● The editor displays the code that you are debugging. You can follow
debugger execution in the code, show the values of variables by hovering
with the cursor over them, or open them in the Variables view by clicking
on them.
17
● You can correct mistakes in your coding directly in the editor; there's no
need to switch to the ABAP perspective to edit your code.
Modeler perspective
18
2. ABAP Perspective views
Views are an essential part of a Perspective which enables it to do a certain task.
There are generally multiple views in a perspective. e.g. in ABAP perspective:
● “Problem” view to provide the detail of any Error, Warning or Information.
● “Transport Organizer” view, which helps to check current and past
Transports.
● Project Explorer
19
● ABAP Element Info.
20
Project Explorer View
By default, Project Explorer view is available in the top of left side frame(as given
in top Eclipse Organization diagram). Every project added in Eclipse has a
Parent node in Project Explorer view.
Each ABAP project is a unique combination of SAP system, Client, and User
ID(let’s say default language is EN always). This means that a User with same
User ID in two different clients of the same system will have to create two ABAP
projects in project explorer view to access respective system.
Navigation is also a bit different which is mainly done using Project Explorer
View. Generally, there are three nodes under an ABAP project(depends on
usage):
1. Local Objects($TMP): All the local objects created by the user are
under this node. It also shows the number of local objects created. Try
expanding this and you can easily figure out that Objects inside this
node are already categorized depends on their Object type. e.g. All
Classes will be in Source Code Library > Class node and all Programs
will be in Source Code Library > Program node.
2. Favorite Packages: Developers generally work under given custom
package. It is a good idea to add frequently used packages in Favorite
Packages. To add a Package as Favorite, Right click on Favorite
Packages > Add a Package > Search and Select > Press OK.
3. System Library: This node has pretty everything that is not custom
SAP. It is very easy to get lost if you try to navigate through this node
while trying to find an Object if you are already not aware of object’s
location(package).
Tip: If you need to open any SAP Object(e.g. Program, Function Module, Class,
DDIC Table etc.), the best way is to use the shortcut Ctrl + Shift + A. On using
this shortcut, a dialog opens up and you need to start typing the object
name(wildcard * can be used) and auto assist helps with the patterned match.
We are going to discuss some more handy shortcuts in later part of this Tutorial.
If you are curious right now to know more, feel free to jump and go to
Index(button on top of this page) > Eclipse ABAP Shortcuts!
21
Some more features of Project Explorer view:
Outline View
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.
22
Display of an internal structure of an ABAP class in the Outline view
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:
23
Synchronized navigation from the Outline view to an element
Each TR contains one or more change jobs, also known as change Tasks
(minimum unit of transportable change). Tasks are stored inside a TR, just
24
like multiple files are stored in some folder. TR can be released only once
all the tasks inside a TR are completed, released or deleted.
Transport Organizer:
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.
25
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.
Display of a request that is selected in the Transport Organizer view and the
Request Editor is opened in ADT.
26
The Transport Organizer view displays for each ABAP project the following
columns:
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..
27
Templates view
Menu >> Windows >> Preferences >> ABAP Development >> Editors >> ABAP
Templates >> New or Change or Import
28
New project should define new ABAP Templates as a part of project convention
and good practices. In addition, it allows ABAP Developers to Edit, Remove,
Export and Import ABAP Templates in Eclipse.
Steps:
29
4. Enter Pattern
5. Take help of Variables if contextual dynamic variables to be inserted in
Pattern
6. Click OK
7. Create ABAP Template as below:
30
3. After that, Use arrow keys to select correct template and press Enter.
Template is inserted as below:
Note: There are Import and Export options available to share and reuse
templates across the team.
31
Development Tools (ADT). Each repository object is assigned to a package and
hence to the Change and Transport System.
4. Working together
Use Case: Sharing and opening an ADT link to a development object with/from
another ABAP developer.
You can open an ADT link by choosing Navigate + Open ADT Link from the
menu bar or with Ctrl + Alt + O.
32
5. ATC Quality Checking
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):
33
● Tool integration for handling exemptions for ATC findings.
The ATC reports problems as findings, messages that describe the problem.
Findings have a priority, where by 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.
34
6. Pretty printer / Source code formatting
What Does Pretty Printer Mean?
Pretty Printer is a code beautifier provided for source codes in SAP ABAP
programs. The source code in ABAP, although stored in the database in the
same manner as in ABAP Editor, is not standardized automatically.
Pretty Printer helps to standardize the layout of the program. The functionality
provided by Pretty Printer helps in arranging the associated keywords in groups,
indents the programming statements and meets the guidelines of readability
according to the ABAP user’s guide.
35
7. Version history
36
Eclipse offers below the screen with Date, Author, Transport request number,
and Description.
It is also possible to compare two versions of same code in this view. Just right-
click on any Transport request and comparison with other versions can be
selected.
37
Eclipse ADT also offers to see and compare local changes done in Eclipse. This
is a powerful feature where a developer can’t lose his past code accidentally
even if the code was local and/or not recorded in a version separately. The only
condition is: Changes must be done on the same system, same developer, and
same workspace.
38
Here Developer can compare different versions of the code!
Definition:
● development object,
● subobject of a development object (for example, a method),
● subobject of a subobject (for example, methods in test classes),
● and so on.
Each element has a name and a type and may have further properties.
39
Each subelement has a parent element. Elements may be related to other
elements.
Overview:
The Element Information popup is available for the following object types and
their subobjects:
The content that is displayed depends on the object type for which you display it.
Examples:
40
41
9. Searching in Eclipse ADT
Searching is one of the most important activities which an ABAPer needs to do
during development as well as troubleshooting. We may try to search an ABAP
Object, a transaction, Where-used-List etc. To be able to effectively use Eclipse
ADT for everyday development tasks, it is essential that a developer should be
aware of Searching basics in Eclipse and thankfully it is very easy to learn.
There are some variants of search which work differently. Let’s try to understand
them one by one:
Object Search
Use Search Ctrl + H for global search. This has the capability to search in either
in Workspace or Project.
42
Ctrl + H global search
Local Code Search
Ctrl + F local search/replace: This search is available in almost every local editor
and it is handy with Eclipse development-artifact files to open in the editor also:
43
Find/Replace dialog
● Where-used-list: Use ABAP’s where-used-list using Ctrl + Shift + G
shortcut. To use Where-used-list, the developer needs to put the cursor
on the object for which s/he needs to find where-used and then press
the shortcut or click the button in top button toolbar.
44
● Navigation: Forward navigation is supported in ADT by Ctrl + Click.
There are two types of quick views also supported:
Outline
○ Quick type hierarchy(Ctrl + T): Displays type hierarchy of a
class/interface
○ Quick outline(Ctrl + O): Displays internal structure of
class/program/interface. The quick outline provides a short
overview of Source code. As you can see in this diagram, the
source methods are clearly outlined and it makes it very easy
to navigate them as and when required.
In addition to the Eclipse search functionalities, you can also investigate findings
and usages in the context of ABAP development in your ABAP projects.
45
● Searching for usages ( Where-Used): To find development objects
and their subobjects using Ctrl + Shift + G .
● Searching for ABAP source code: To find a term or text that is used
within an ABAP project using Ctrl + H .
● Opening or searching development objects: To open a
development object using the Open ABAP Development Object dialog
with Ctrl + Shift + A from any tree in the Project Explorer or in the ABAP
source code editor.
● Navigating to a development from its occurrence: To navigate to a
development object from its element name that is used in the source code
or displayed in the Element Information popup using F3.
Example:
46
Sample for the structure of structure an Element Information popup
In this Element Information popup, you can find the following information:
10. Element/subobject
11. List with the subelements
12. Short text with link to the long text
13. List with the parameters
14. Integrated toolbar
47
16. Shortcuts
A quick start with Eclipse with shortcuts:
● Ctrl + Shift + A : Open an ABAP object ► This is probably the best way
to search an object . Search can be further refined based on Object type
● Ctrl + 6 : Comment / Un-comment
● F8 : Execute object ► Normally other tab/window opens to show output
if screen is called
48
● Ctrl + 1 : Quick fix suggestions
● Debug F5, F6, F7, F8 : Step into, Step over, Return, Resume ► Just
like SAP GUI
● Ctrl + Space : Code completion ► This feature also works as
“Templates” feature in SAP GUI
● Alt + Left : Go back in history one step
● Ctrl + F2 : Syntax check of object
● Ctrl + F3 : Activate an Object
● Shift + F1 : Format / Pretty Printer ► There is no dedicated Pretty
Printer button, so this is the only way in Eclipse to easy format the code
● Ctrl + Shift + F3 : Activate all objects
● Alt + Right : Go forward in history one step
● Ctrl + Shift + G : Where Used List ► There is a look alike button also
available in Eclipse in case you don’t remember the shortcut.
49
17. Refactoring
Refactoring is also known as Quickfix in Eclipse. Quickfix Allows:
50
visibility of the component. Analyze the options proposed by Eclipse and
use them if they fit.
3. Delete methods/attributes: If some of the method/attributes are extra
and not needed, Quickfix also proposes them to delete. Just selecting
this option will delete required methods/attributes.
51
literals (note that this function is only available in SAP NetWeaver 7.40 or
higher).
Eclipse ADT provides a clever feature here which can save a lot for developer
time with a lesser chance of errors. Follow following steps for rename:
52
3. Eclipse asks to choose new method/attribute/variable name
4. Click Next and Eclipse ask to choose Transport. The option will be
disabled in case of Local transport.
53
correction
54
changes carefully before s/he proceeds.
6. Click Finish and Renaming are done for all selected dependencies.
7. Activate the code!
55
Extract a method to move a code block to a new method and replacing the block
with a call to that new method.
Just Select the block of code and press Shortcut Alt + Shift + M. This is fun to
move a piece of code. Try it yourself and trust me, it is going to help you in
future.
Just press Shortcuts Alt + U(Delete all unused variables) or Alt + Shift + U(Delete
unused variables in selection) and ADT does the work for you.
Example:
- Press CTRL + 1
- Wizard
56
18. ABAP Unit Test & Code coverage
Context
To run ABAP Unit tests with code coverage measurement, do the following:
Procedure
57
2. Use the View Menu of the ABAP Coverage view to switch to branch
coverage or procedure (processing block) coverage.
3. Click on a class, method, or other processing block in the ABAP Coverage
view to navigate to the code.
There, you can see the coverage at the source-code level. You can easily
detect gaps in your testing:
○ Green shading: Lines of code that were executed during the coverage
measurement. In branch coverage, conditional statements that
evaluated to both true and false during testing.
○ Red shading: Lines of code that were not executed at all during the
coverage measurement.
○ Yellow shading: Branches that were executed, but which did not
evaluate to both true and false.
58
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'll
see how often the branch resolved to 'true' and 'false'.
Once you are in the code-level coverage display, you can navigate as
usual (with F3). The code coverage shadings are applied to the code you
navigate to as well.
For more information about how to check ABAP Unit Code Coverage visit:
Checking ABAP Unit Code Coverage
19. Help
Using ABAP help with Eclipse is, as expected, tightly integrated with ABAP
backend server. ABAP documentation can be called from within Eclipse. For
showing help content, Eclipse is equipped with a dedicated Help view.
59
F1 Help – In this case, F1 help is taken on SELECT SQL keyword
2. Element help: Use F2 help on variables/elements for inline help
60
3. Feeds proactive help: System messages e.g. ABAP runtime errors are
delivered via feeds and can be accessed with Quick access box. This
helps Developer to know dumps caused by his/her code.
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.
61
Feeds are updated automatically only if you have opened an ABAP project.
Otherwise, the feeds are dormant. Dormant feeds are shown in gray type in the
Feed Reader view.
- Syntax errors
- System messages
• No separate to do lists
• Integration with code: click on task, all relevant screens (context) opens
• Bugzilla, Mantis,…
62
22. Accessibility Features
Accessibility at SAP refers to the possibility for everyone, including and
especially people with disabilities, to access and use technology and information
products.
● 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.
● By setting specific window configurations and Eclipse preferences to adjust
font size or contrast of text to the background. So, you can improve
readability.
23. Unit Testing
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.
63
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.
64
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're 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.
Additionally, you might be interested in objects that use the entry object.
Therefore, switch to the Using Objects context.
65
Contexts:
66
Features Top 10
• Split view + View & edit more than one SAP object at the same time (no
multiple sessions)
• Code completion
67
• Feed reader
• Plugins
• Fully personalizable
• Templates
• Search functionality
• Task management
• Refactoring capabilities
Conclusion
• All in one (ABAP, Web, HANA/Database/DDIC, Web services,…) & split view
working parallel
• Still some bugs (e.g. request to register Z-object – access key - on deletion)
• Direct web browser integration (e.g. for web testing, SCN, object registration,…)
• Integration on the way for a lot of SAP ABAP objects (now switch to SAP GUI)
68
• Working with text code is faster than completing dialog forms
• Not a lot of graphical development at the moment (e.g. se24 class builder), if
you would still like to work that way.
69