0% found this document useful (0 votes)
252 views69 pages

ABAP Development Tools Features

Uploaded by

Jamila Hamdi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
252 views69 pages

ABAP Development Tools Features

Uploaded by

Jamila Hamdi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 69

ABAP Development Tools

features
Table of Contents

Table of Contents 2

Overview 4

The benefits of using ABAP development tools 4

Features of ABAP development tools 5


1. Perspectives 6
What is a Perspective? 6
ABAP perspective 6
How to open an ABAP Perspective 7
ABAP profiling perspective 10
Debug perspective 17
Modeler perspective 20
2. ABAP Perspective views 21
Project Explorer View 23
Outline View 25
Advantages of Using the Outline View: 26
Transport Organizer View 27
Templates view 30
What is ABAP Templates? 30
How to access ABAP templates? 31
ABAP Templates in Eclipse creation Steps 32
How to use ABAP Template? 33
Where to use ABAP Templates? 34
3. ABAP Repository Objects 35
4. Working together 36
5. ATC Quality Checking 36
6. Pretty printer / Source code formatting 38
7. Version history 39

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

Smaller features, but practical 72

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:

● Build, extend, and run ABAP applications on SAP Business


Technology Platform (BTP) to extend SAP products.
● Access SAP BTP services such as integration, machine learning,
streaming, and Internet of Things (IoT).

The benefits of using ABAP development tools


ADT offers superior open and extensible ABAP toolset for the whole
development lifecycle, which enables us to develop with high productivity:
powerful source code editor with fast search and navigation, Quick Fixes and
Quick Assists, refactoring support, test-driven development with ABAP Units and
ABAP Test Doubles, integrated quality assurance and troubleshooting tools,
version management and lifecycle management tools which help to transport the
code through the system landscape. In some development projects, we may also
get in touch with the classic SAPGUI-based ABAP Workbench.

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.

This summary highlights some features of ADT.

1. Perspectives

5
What is a Perspective?

An eclipse perspective is the name given to an initial collection and arrangement


of views and an editor area. The default perspective is called java. An eclipse
window can have multiple perspectives open in it but only one perspective is
active at any point of time. A user can switch between open perspectives or open
a new perspective. The active perspective controls what appears in some menus
and tool bars.

For example:

● The Java perspective combines views commonly used when editing


Java source files.
● The Debug perspective contains the views commonly used when
debugging Java programs.

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.

When using ABAP perspectives, you always have to establish a system


connection that is managed by a corresponding ABAP project.

How to open an ABAP Perspective


In order to switch to the ABAP perspective:

● select Window > Perspective > Other Perspective > Other.

6
You can open the ABAP perspective from the toolbar:

This is a dialog to open the ABAP perspective.

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:

ABAP profiling perspective

9
ABAP Profiling: ABAP profiling lets you analyze the runtime behavior of an
ABAP program.

ABAP code Profiling is a very important tool to analyze performance of code.


However, ABAP Code Profiling with Eclipse ADT works a little different than
classical Transactions SE30 or SAT.

ABAP Profiling in Eclipse is equivalent to old SE30 or SAT transactions in SAP


GUI. SAP decided to dedicate a separate perspective for ABAP Profiling. This
Perspective can be opened using Menu > Window > Perspective > Open
Perspective > Others > ABAP Profiling

As shown below, Profiling Setting can be accessed via Menu > Window >
Preferences > ABAP Development > Profiling:

A Developer can set preference before doing ABAP 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.

ABAP Cross Trace:

Use: The ABAP Cross Trace ...

● 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).

Tracing Sensitive Data:

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

Components are used to configure the framework layers to be traced, for


example, SAP Gateway. Components can have sub-components for more
detailed classification.

A trace record contains information about the component from which it results. A
trace record is written for a certain trace level.

After that, Let’s understand ABAP Profiling Step by Step:

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.

Note: There is no need to open Debugger perspective separately as Eclipse


runtime automatically determines if Debugger perspective needs to be
opened(on encountering a breakpoint) and it offers a pop-up for the information
that the Perspective will be changed from ABAP perspective to Debug
perspective.

Refer Diagram 1 & 2 for an idea of look & feel:

Diagram 2: Debugger Perspective overview

The Debug perspective allows you to manage the debugging of ABAP


development objects.

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 Debug perspective provides you the following information:

● 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.

For more information about debug perspective , visit: Debugging in Eclipse.

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:

● Link with Editor: This is a button on the top right side of


Project Explorer view. This is a useful button at times. If the main editor
opens an object with “Ctrl + Shift + A” shortcut(or any other way), the
project explorer view doesn’t point to that object and Editor remains out
of sync with Project Explorer. Turing this toggle button on keeps Editor
and Project Explorer in sync.
● Focus on Active Task: This is also a button sitting just
next to “Link with Editor” button. It is possible to create “Tasks” in
Eclipse. On clicking this button, focus immediately transfers to active
task.

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:

● All non-public members of ABAP classes


● All members that are not methods, such as attributes, data types, and
events

23
Synchronized navigation from the Outline view to an element

The Outline view is opened in the ABAP perspective by default.

Advantages of Using the Outline View:

The Outline view supports you by providing the following advantages:

● 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.

Transport Organizer View

Transport Requests (TRs) is a kind of ‘Container / Collection’ of changes that


are made in the development system. It also records the information regarding
the type of change, the purpose of transport, request category and the target
system. It is also known as Change Requests.

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.

Only creation, selection and overview.

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.

Transport Organizer View:

Transport Organizer View.

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..

Workbench Request: Contains repository objects and also ‘cross-client‘


customizing objects. These requests are responsible for making changes in the
ABAP workbench objects.

Customizing Request: Contains objects that belong to ‘client-specific‘


customizing. As per client settings, these requests are automatically recorded as
per when users perform customizing settings and a target system is
automatically assigned as per the transport layer (if defined).

27
Templates view

What is ABAP Templates?


● ABAP Design templates help programmers to create/modify standard as
well as with custom code/comment snippets
● Every project must follow certain design templates as per established
coding standards
● Use Design templates across the team and imported to the Eclipse of
every developer and use them for different kind of coding constructs
● In addition, ABAP templates complement the “Pattern” available in SAP
GUI development workbench.

How to access ABAP templates?


Steps:

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.

ABAP Templates in Eclipse creation Steps

Steps:

1. Click New button


2. After that, Enter Name of ABAP Template in Eclipse
3. Provide Description of Template

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:

How to use ABAP Template?


1. Open any code where template to be applied.
2. Enter initial letters of Template and Press Ctrl + Space for auto
assistance

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.

Where to use ABAP Templates?


Every good project should establish a set of good coding practices for
developers. For instance, how to start a code and how to change a code. ABAP
templates in Eclipse help to achieve one of these aspects. ABAP templates can
be used to create header comments or change logs. Similarly, this can also be
used as a personal coding assistant to increase productivity. In addition, this
makes the code more manageable and ready for future understanding and
changes. Above all, using templates can help reduce development turnaround
time.

In conclusion, ABAP templates in Eclipse bring development homogeneity in a


given project. Therefore, all project leads should encourage developers to utilize
ABAP templates more effectively.

3. ABAP Repository Objects

Repository objects are development objects such as ABAP programs, classes, or


CDS objects. They are edited using ABAP Workbench tools or using ABAP

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.

Description: Generate, for example, an ADT link to share a development with


another ABAP developer of your team. To do this, choose Share Link from the
context menu of a development object.

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):

● 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

33
● Tool integration for handling exemptions for ATC findings.

More Details on the ATC:

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.

Example of Syntax highlighting:

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

To check Change History of a Program:

➔ Open the Program/Include/Class/FM > Right click on Editor > Compare


with > Revision 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.

The result of checking Local history can be something like below:

38
Here Developer can compare different versions of the code!

8. Code Element Information

The Element Information popup provides all information about a selected


element and its relation to other development object(s).

Definition:

An element can be a ...

● 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.

An element may have a short text and/or a long text.

Overview:

The Element Information popup 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 Code Library (ABAP classes, interfaces)
● Other objects (ABAP packages, function modules, messages, and so on)

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.

In ADT, you have the following additional search possibilities:

● Searching for development objects: To find ABAP development


objects on base of the object name using Ctrl + H .

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

15. Embedded SAP GUI

47
16. Shortcuts
A quick start with Eclipse with shortcuts:

Taking Help – Eclipse shortcuts with ADT:

● F1 : ABAP keyword Documentation ► F1 help works in Eclipse as good


as SAP GUI. Help opens either in floating window or in a separate view.
● F2 : Code element information ► Gives inline information about Code
element
● Ctrl + Shift + L : Shows all keyboard shortcuts ► By default, this
shortcut open in Right bottom corner and gives a very good overview of
ADT as well as native Eclipse shortcuts

Start working with Editor:

● 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:

1. To create an implementation of a Class definition and vice versa:


When a developer, starts writing a class in Eclipse ADT, s/he starts
writing definition and implementations are to be separately written which
is time-consuming. Eclipse helps here and make it easier. Just press
Ctrl + 1 after writing definition and Eclipse analyzes and suggests that
implementation is missing and also offers if Eclipse should create an
implementation for you! Go for it and save some precious time.
2. Changing visibility of components: Sometimes we forget to assign
right visibility of methods/attributes. This may produce a compile-time
syntax error. Quickfix comes in handy here. Just put the cursor on
method/attribute, Press Ctrl + 1 and Eclipse suggests changing the

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.

Renaming source code entities, method extraction and unused variable


deletion are forms of refactoring.

Here are some other refactoring options:

● Aided conversion of local variables to make them components of a class, and


therefore available for all methods of the class. This could be extracting
constants to substitute literals with a constant or extracting variables to substitute

51
literals (note that this function is only available in SAP NetWeaver 7.40 or
higher).

● Changing visibility of components, by moving component definitions between


the public, protected and private sections.

● Implementation of unimplemented methods.

Rename (Shortcut Alt + Shift + R)


We all ABAPers have faced this situation where we may need to change method
or attribute name after the development is complete… & we hate it! Getting this
done in Classical SAP GUI Workbench can be a long and tedious task.

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:

1. Just select the variable where it is declared


2. Press Shortcut Alt + Shift + R or right-click on the source code for
context Menu > Select 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.

5. Click Next. There can be two scenarios here:


1. Syntax Error: If renaming causes a syntax error, Dialog shows
it and Developer has the option to go back and make

53
correction

2. Check changes and Confirm: If renaming is not causing any


syntax error, Eclipse ADT offers a dialog where it shows File-
wise changes to be made. A developer should check all

54
changes carefully before s/he proceeds.

6. Click Finish and Renaming are done for all selected dependencies.
7. Activate the code!

Extract a Method (Shortcut Alt + Shift + M)

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.

Delete Unused Variables (Shortcut Alt + U)


Deleting unused variables can’t be easier now with Eclipse ADT. Unused
variables are always reported in SLIN(Extended Program Check) and ATC(ABAP
Test Cockpit) results, so it is better to always get rid of them once development is
complete.

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:

Creating new method really fast using CTRL + 1

- Type your method call & parameters

- 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

1. Start a code coverage measurement. Choose Coverage As ABAP Unit


Test from the context menu of the 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.

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.

Types of Eclipse Help:

1. The F1 help of ABAP keywords: Select the keyword and press F1

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

F2 Help – Here help is taken on custom CDS view

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.

An automatic Feed is reported to Eclipse to the developer if Dump’s code owner


is developer.

20. Feed reader


A feed reader enables you to automatically subscribe and display feeds.

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

- ST22, SM12, SM13,…

- System messages

21. Task managment


Task management:

• No separate to do lists

• No to do’s in comment anymore in the code

• Integration with code: click on task, all relevant screens (context) opens

• Integration with tools: Scrum, Jira,…

• Bugzilla, Mantis,…

• Auto time tracking per task

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.

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.
● 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.

24. Relation Explorer


The Relation Explorer helps you to understand how the objects are related to
each other.

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.

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.

65
Contexts:

The following contexts are available in the Relation Explorer:

66
Features Top 10

• One integrated IDE for all types of development

• Split view + View & edit more than one SAP object at the same time (no
multiple sessions)

• Instant syntax check

• Code completion

67
• Feed reader

• Plugins

• Fully personalizable

• Templates

• Search functionality

• Task management

Smaller features, but practical

• Refactoring capabilities

• Last edit location

• No display / change button anymore

• Outline always available

• Code coverage check

• Full navigation historys

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,…)

• Working offline – development shift

• 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

You might also like