ABAP Eclipse
ABAP Eclipse
ABAP Eclipse
.....................................................................................................................3
...........................................................................................................................4
...................................................................................................................................6
..........................................................................................................................................14
............................................................................................................................................18
...............................................................................................................19
...............................................................................................20
............................................................................................................................21
......................................................................................................................22
................................................................................................................23
.....................................................................................................25
.................................................................................................................27
The next few pages will give you a short summary of some of the differences between the
work in ABAP Workbench and ABAP in Eclipse. In addition, it serves as a documentation
which shows you interesting information when you start with ABAP in Eclipse.
Chapter 1 is written for ABAP Newbies,so maybe you can skip this.
Attention: Please read the symbol explanation, it will save your time.
Eclipse
ABAP Workbench
So now enjoy the guide and we wish you a great experience with ABAP in Eclipse.
You are an ABAP Newbie: no problem. In this chapter we will start with the basics of Eclipse.
You will learn how you can customize your workspace so you can develop with ABAP.
The First Login:
1. Open Eclipse
If you open Eclipse for the first time the Welcome Help opens so you can click on
the arrow to navigate to the workspace. Further information to the help you can find in
chapter 5.
2. Customize your workspace for ABAP.
Add an ABAP perspective (You will learn in chapter 2 what a perspective is.)
In the right upper corner you can see Open Perspective Symbol" ( ), choose
the ABAP perspective.
You only need to perform this step at the first Logon, Eclipse save the perspective for
all other Logons.
1. Open Eclipse
2. Click on your project
3. Enter your password
4. Enjoy the work.
Now we have laid the foundations for working with ABAP in Eclipse. So you can work in the
next chapter like an expert.
Structure
In the first step you will become familiar with the work athmosphere in Eclipse.
The Eclipse Workbench contains perspectives and views.
A perspective is a group of views and editors. It defines the layout of views.
The relevant perspectives for this documentation are the ABAP and Debug perspectives.
How to open a new perspective
In the right upper corner you can see Open Perspective Symbol ( ).
Also there is an overview of which perspectives are open and where you work. You can
switch/change between the perspectives there.
A view displays a tool of the ABAP Development Tools or supports an editor. The following
picture shows you the standard organization of views in the ABAP perpsective.
You can adapt your window for your personal work by adding, closing and deleting views.
So the view also influences your navigation and how you can receive information.
How to add a view
In the menu bar Window Show View choose the view or use the Shortcut Alt+ Shift +Q.
In the first step you learned how the Eclipse workspace is organized. Now I will show you
relevant navigation tools.
One interesting point is that you can work in Eclipse with in more than 1 project at the same
time. Furthermore, you can open more than six editor tabs, if you remember, in SAP GUI
the maximum is six modes.
Display <-> Change-mode (Shortcut Ctrl+F1) doesnt exist, in Eclipse, you are
always in change-mode.
Basic navigation:
In ABAP Workbench these are the important navigation tools. In Eclipse other tools are
more important. However it does not mean that these tools are gone.
In Eclipse you can go back to our Last Edit Location (Shortcut Ctrl+ Q) with the arrow.
The other arrows allow you to navigate between your last open programs or annotations.
In addition to that you have a search field Quick Access to navigate very quickly.
Furthermore you will see in the next chapters that you can open / create / go to items in
Eclipse in more than one way. You have the possibility to use the menu bar, the search field
Quick Access, Shortcuts and sometimes a symbol exists for your task. So feel free to try
out which way is the best for you.
In the next steps I show you navigation tools and useful shortcuts, which make the work and
navigation in Eclipse easier.
Transaction:
Proposal List:
You know Shortcut F4 for value help? Not needed anymore. In Eclipse proposal list are
directly integrated. The list shows you a proposal of all different element types.
Link with Editor combines the current editor tab with your Project Explorer list. You can find
the actual data element in your Project Explorer View when you use Link with Editor.
When Link with Editor is activated all the time, your Project Explorer View always shows
the tab where are currently working. This means that it is automatically updated.
Shortcuts make development in Eclipse much faster and can make your ABAP life easier.
Need information on code elements in ABAP Workbench? You must use transactions and
the ABAP Dictionary. In Eclipse the shortcut F2 shows code element information directly.
For example, it is useful when you look up type information.
Formatter:
Formatter (Shortcut Shift+F1) is a tool to format your source code. In ABAP Workbench it is
well-known as Pretty Printer.
You can specify the Formatter settings in properties for your project. How can you do that?
In the Project Explorer View mark your project and right-click. Then choose properties (or
use the Shortcut Alt + Enter or menu bar Project Properties).
In the properties dialog, choose ABAP Development Editors Source Code Editors
ABAP Formatter and then you can choose our favorite code style.
The Pretty Printer symbol is gone. Use the familiar Shortcut Shift+F1.
Keyboard Shortcuts:
Different use:
Shortcut Ctrl+ Shift+ L deletes lines in ABAP Workbench
Quick Assist help you to complete your source-code. It contains ABAP Refactorings, ABAP
Quick Fixes and help to generate elements. You can use the Quick Fix with the Shortcut
Ctrl+1 or use the Shortcut Ctrl+Shift+1 for open the Quick Fix View. Work with the Quick
Assist and you will see to code is easier and faster than before.
Quick Fixes
Quick Fixes help you to code much faster. You can resolve errors and warnings with Quick
Fixes. For example, if you write a method in your source-code but the method is not
declared, you can declare it very fast with a Quick fix. You can see this example (create a
method) in the chapter Class Builder (Page).
How to use Quick Fixes?
Click the line or the item and then choose Shortcut Ctrl+1. Now the Quick Fix Assistant is
open und you can choose an action.
If you prefer the Quick Assist View you can use the Shortcut Ctrl+Shift+1 to open it. An
advantage of the view is that you can change the object and see directly which action is
possible. Normally you must use the Shortcut again when you change the element but here it
is automatically updated.
General Information:
Each view has its own menu. You can look in it by clicking on the arrow.
2. In the new view you can create our task with deadline, reminder and add details in
the comment field.
3. If you finish our task you can change here the status to Complete.
In the Task List View there is an overview of your Tasks. Also you have Mouse-Over-
information, which shows you information pertaining to your task, or you can choose the task
and see all information.
Open ABAP Keyword Documentation (Shortcut F1). In the ABAP Workbench a new
window is opened.
In Eclipse you can find the help directly in a view. So it is easier to work with the help
information.
In addition to that you have a Feature Explorer View (Shortcut Alt +Shift+ Q Q
Search and choose Feature Explorer View) to get familiar with the basic
features in Eclipse. In the Feature Explorer View you have documentation for
Eclipse, Java, ABAP in Eclipse and so on.
Welcome Help:
If you are a newbie you can use the Welcome Help in Eclipse. Here you can find
an overview information or first step tutorials to get familiar with Eclipse. Open this
with Help in the menu bar Welcome; then you can choose, for example, tutorials.
Scroll down and on the left side you can find an ABAP information tutorials.
Feel free to try it out.
If you Check ABAP Development Object (Shortcut Ctrl+F2) now you have more information
features.
In an additional view you see all problems of the system with all information.
When you double click on a specific problem you directly navigate to it.
Also at the beginning of the line you can see little symbols
In the ABAP Workbench source- code-based and Form-based options are possible.
In Eclipse there is only the source- code-based option to create a class.
But Stop! It is not a problem. If you dont like it, you can open the Class Builder in SAP GUI
and use your familiar form-based option.
But to create a method now the source- code-based version is very easy, because you can
directly create a method with Quick Assist.
Build a method:
Write the normal method statement, then click on the method and use the Quick Fix
(Shortcut Ctrl+1) or Open Quick Assist view (Shortcut Ctrl+Shift+1).
Now you can choose create a method. In the next step your method is declared.
When you need more information about the two types of CDS here is a good link
for you: https://blogs.sap.com/2015/07/20/cds-one-model-two-flavors/
ABAP CDS is the Core Data Service concept integrated in the ABAP Development tools.
With SAP NetWeaver 7.4 SPS 05 it is completely implemented in AS ABAP. Until now the
ABAP Dictionary was used to define tables, views and data types. So the natural way to
introduce CDS on the ABAP Application Server is to add it to the ABAP Dictionary. You
define and work with CDS-artefacts in a DDL-Editor, which is included in ABAP Development
Tools. CDS artefacts are stored in the ABAP Dictionary and can be accessed in ABAP
programs via Open SQL in the same way as ordinary ABAP tables and views. The definition
of the data model is done with the SQL-based Data Definition Language (DDL). DDL
contains annotations for linking existing tables with new technologies like ODATA or UI5.
Furthermore it contains associations, which define the relationship between CDS-Views and
annotations. An additional difference is that in CDS you can use special operator like UNION
to combine Select-statements. Furthermore a new client authorization concept based on
roles is integrated in CDS. You therefore use a DCL-source code.
With ABAP CDS, a developer can work on the ABAP layer and the code is pushed down to
the database. In contrast to HANA CDS, ABAP CDS operates on all database platform s
(including SAP HANA).
How does our source-code look:
To create a CDS-view you can find so many tutorials in the internet; there is documentation
in the Feature Explorer View (for example, How can I create a Data Definition?)? For this
reason I will not show you how you can create it but I will give you a short insight in the
source-code.
First you create a Data Definition with the define View statement. For the new authorization
concept you can use the operator define role.
With Annotations you can add core and framework-specific metadata to a CDS object. In
CDS there are view -, table function-, element annotations and parameter annotations; each
existing piece of metadata is valid for the whole View, Table function parameters etc.
depending on the annotation scope. You can add annotations direct on the DDL source-code
(Data Definition) but do not forget the @-character at the beginning. Also you can write
annotations in front of the define view statement. With association you can define the
relationship between CDS- entities. Add associations like this:
Managed Associations Association [ <cardinality> ] to <targetEntity> [ <forwardLink> ]
Unmanaged Associations Association [ <cardinality> ] to <targetEntity> <unmanagedJoin>
This is a short insight in the source-code but if you need more detailed information look in the
ABAP Language Help and the ADT Help.
When you code you will see learned facts from the other chapters can help you. So you do
not need to know long table names exactly because the code-completion can help. Also you
do not navigate in the DDIC because with Quick Fix F2 you can look direct in the table
content.
Here you can find a video tutorial for build a CDS-View in ABAP on SAP
HANA:
https://www.youtube.com/watch?v=aYRduGG_kL4
Interesting information and useful tips to create our CDS elements you can
find in the CDS Tooling Guide:
http://go.sap.com/germany/documents/2016/06/361ddcf3-787c-0010-
82c7-eda71af511fa.html
I am sure that this chapter information is not really new for you because it is common ground
between ABAP Workbench and ABAP in Eclipse. Nevertheless I will show you this so you
have an easy access to it, since in Eclipse the design is a little bit changed.
ABAP development projects are created in the development system but if they are finished
they must be transported. They are transported to the: test system, quality system and
productive system. For this reason you must assign the project to a transport request. To
transport all objects in the development project together you must create a change order. A
change order includes all objects of a development project. Another positive aspect, is that
all developers can see what they have to do. To have a simple transport organization you
can use the Transport Organizer View.
Transport Organizer View:
Here you can see our projects, transport requests and tasks. To find object faster you can
use the search field.
You can also add users to our transport request, but it is only available when it is in the
modifiable folder. To add a user right-click in our transport request choose add user. Now a
new transport task can be created.
If you are finished and will release your transport request and task you can to this also by
right-clicking.
Familiar Shortcuts
New Shortcuts
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8037f180-
b0a5-2f10-949a-dd6a4acf8d96?QuickLink=index&57844619554684
Disclaimer
This document outlines our general product direction and should not be relied on in making a
purchase decision. This document is not subject to your license agreement or any other
agreement with SAP. SAP has no obligation to pursue any course of business outlined in this
document or to develop or release any functionality mentioned in this docum ent. This
document and SAP's strategy and possible future developments are subject to change and
may be changed by SAP at any time for any reason without notice. This document is
provided without a warranty of any kind, either express or implied, including but not limited to,
the implied warranties of merchantability, fitness for a particular purpose, or non-
infringement. SAP assumes no responsibility for errors or omissions in this document, except
if such damages were caused by SAP intentionally or grossly negligent.