Sunteți pe pagina 1din 3

There are two kinds of editors in ADT those for which there is a native Eclipse

implementation and others that appear in-place in the SAP GUI. The figure above
shows each kind the ABAP Editor as an example of an Eclipse editor and the
ABAP Dictionary showing how the classic SAP GUI visualization appears within
the Eclipse environment.
Generally speaking, there is no requirement to use ADT for ABAP Development,
and each developer is free to choose whether to use ADT or the classic ABAP
Workbench. The functions and features of Eclipse in general and ADT in
particular lend themselves particularly well to object-oriented programming, wit
h
various built-in refactoring functions and support for unit testing. There are o
ther
tasks to which the ABAP Workbench is better suited in particular working with
module pools and the Screen Painter.
34
2014 SAP AG or an SAP affiliate company.
All rights reserved. 2014
HA400 Lesson: Introduction to ABAP Development Tools (ADT)
Some new functions, however, are only provided within ADT and do not have
an equivalent function in the ABAP Workbench. Serveral of these pertain to
ABAP development for SAP HANA.
Working with ADT
Figure 28: ABAP Project
Figure 29: Native with Eclipse Look & Feel
2014 2014 SAP AG or an SAP affiliate company. All rights reserved. 35
Unit 1: Introduction HA400
Figure 30: ADT Quick Reference Card
ADT provides a large number of keyboard shortcuts that can make you
more productive. You can download a quick reference card with the
most important shortcuts from SCN page http://scn.sap.com/community/
abap/eclipse/blog/2012/07/02/adt-quick-reference-card.
Examples for keyboard shortcuts ABAP developers new to ADT often don t find
quickly are:
Shift+F1 to format the source code, i.e. use the pretty printer
Ctrl+< and Ctrl+> to turn a line of code into a comment or to remove a
comment, or Ctrl+7 to toggle between commenting/de-commenting a line
F3 to navigate to the definition of the currently selected object (forward
navigation).Pressing the Ctrl key while positioning the mouse over an object,
e.g. a class or method name, adds a link and allows to navigate to the
definition or implementation of the object.
36
2014 SAP AG or an SAP affiliate company.
All rights reserved. 2014
HA400 Lesson: Introduction to ABAP Development Tools (ADT)
Figure 31: Editing Source Code
The source code editor in ADT provides many helpful features, for example:
Code completion, which includes keyword completion, using code templates
for completion and Content Assist to suggest completions for variable
names, method names etc. while typing.
Quick Fix, which allows to quickly resolve errors or warnings reported about
the code.There are many quick fixes available for ABAP e.g.:
Creating Method Implementations from the Method Definition
Creating Method Definitions from Implementation Parts
Creating Implementation Parts for Interface Methods
Creating Method Definitions from Method Calls
Creating ABAP Classes or ABAP Interfaces from the Source Code and
many, many more.
For a complete list please check the documentation.
2014 2014 SAP AG or an SAP affiliate company. All rights reserved. 37
Unit 1: Introduction HA400
Figure 32: Troubleshooting Tools ABAP Debugger in Eclipse
Debugging ABAP Code
The latest ABAP debugger is completely integrated in the Eclipse debug
framework. It is an ABAP debugger, but behaves like all other debuggers in
Eclipse you might be familiar with because the look, feel, and functionality are
all
Eclipse. In other words, you can now debug your reports, transactions, classes,
Web Dynpro applications etc. natively in Eclipse.
The ABAP Debugger in the ABAP Development Tools can satisfy most of your
debugging requirements. For special purposes other than observing running
code you may still want to use the New ABAP Debugger in the SAP GUI.
Note: The Run > Debug menu function in Eclipse is not enabled in the
ABAP perspective.
Start the debugger by setting a breakpoint in your code and then run the ABAP
program, e.g. start it directly with F8.
The debugger offers, among other features editing in the debugger. You can
correct a bug right when you find it. Debugging in the IDE is not supported if y
ou
are working with a 7.0 EHP3 backend system. For more information please visit
the latest information on the Service Market Place.
38
2014 SAP AG or an SAP affiliate company.
All rights reserved. 2014
HA400 Lesson: Introduction to ABAP Development Tools (ADT)
Figure 33: Information Sources
If you want to get a local installation of the SAP Development Tools for Eclipse
,
there are several sources you can choose from, e.g.:
The SAP Software Download Center: http://service.sap.com/swdc, part of the
SAP Service Marketplace.
The SAP Development Tools for Eclipse Web site: http://tools.hana.ondemand.com
You can also find other products like the SAP HANA studio or the tools for SAP
UI5 development via this site. It describes the how to install or update the SAP
Development Tools for Eclipse using the SAP Development Tools for Eclipse
Update Site.
Hint: A good idea is also to check the SAP Community
Network pages http://scn.sap.com/community/abap/eclipse and
http://scn.sap.com/community/abap/hana. They provide documentation
and support on how to install the SAP Development Tools for Eclipse.
2014 2014 SAP AG or an SAP affiliate company. All rights reserved. 39
Unit 1: Introduction HA400
Figure 34: Installed Features
The About item in the Help menu provides information about installed features
and plugins.
Figure 35: Installing and Updating Features
The Check for Updates and Install New Software commands in the Help menu
provide the ability to update existing features and to find, download, and insta
ll
new features (provided you configured suitable update sites in Eclipse).
40
2014 SAP AG or an SAP affiliate company.
All rights reserved. 2014
HA400 Lesson: Introduction to ABAP Development Tools (ADT)
Exercise 3: Create a Project in ABAP
Development Tools
Exercise Objectives
After completing this exercise, you will be able to:
Open ABAP Development Tools and connect to an Application Server ABAP
Make a development package a favorite in your project
Business Example
Your company has recognized SAP HANA as an important strategic topic and
has asked you to refresh your ABAP skills, paying particular attention to those
required to develop or review code that leverages the strengths of SAP HANA.
Task 1: Create a Project in ABAP Development Tools
Open ABAP Development Tools and create a project in the Application Server
ABAP that uses SAP HANA as primary database. Use the System ID, user
and password provided by your instructor. Add your development package
ZHA400_##, to the favorites of this project.
1. Open ABAP Development Tools (i.e. ABAP perspective in Eclipse).
2. Create a project. Use the system ID, user ID and Password provided by
your instructor.
3. Add your package ZHA400_## as a favorite under your project.
4. Using the ABAP Development Tools, create a report
ZHA400_##_HELLO_WORLD, where ## is your group number.
5. In your report, define a variable lv_name of type STRING with some constant
value, and add a simple WRITE statement for this variable. Save the report.
6. Execute the syntax check via toolbar button (or STRG+F2). Activate and run
the report. To run, you can also press F8.
Task 2: Debug a report using ABAP Development
Tools
1. Set a breakpoint in your report.
2. Run the report again. This should result in a popup asking if you want to
switch to the Debug perspective. Choose Yes.
Continued on next page
2014 2014 SAP AG or an SAP affiliate company. All rights reserved. 41
Unit 1: Introduction HA400
3. Inspect the value of variable lv_name.
4. Resume execution.
5. Close the Debug perspective.
42
2014 SAP AG or an SAP affiliate company.
All rights reserved. 2014
HA400 Lesson: Introduction to ABAP Development Tools (ADT)
Solution 3: Create a Project in ABAP
Development Tools
Task 1: Create a Project in ABAP Development Tools
Open ABAP Development Tools and create a project in the Application Server
ABAP that uses SAP HANA as primary database. Use the System ID, user

S-ar putea să vă placă și