In this exercise, you start your ABAP cloud project and analyze some existing ABAP code to get familiar with some basic features of the ABAP development environment.
Task 1: Create an ABAP Cloud Project
Open Eclipse, switch to the ABAP perspective and create an ABAP cloud project.
Steps
Open Eclipse and switch to the ABAP perspective.
Open Eclipse and close all tabs.
Choose Window → Perspective → Open Perspective → Other.
In the dialog box, double-click ABAP.
Create an ABAP Cloud Project.
Choose File → New → ABAP Cloud Project.
Select Use a Service Key and choose Next.
Choose Import and select the file containing the service key that you have been given.
Choose Open Logon Page in Browser.
You will be prompted to logon to the system.
Enter the user and password that you used to register to SAP Learning Hub.
When you see the message, You have been successfully logged on, close the browser window and return to Eclipse.
To finish creating the project, choose Finish.
Task 2: Analyze ABAP Class /DMO/CL_FLIGHT_LEGACY
Use some functions of the ABAP Development Tools to analyze the source code of ABAP class /DMO/CL_FLIGHT_LEGACY.
Note
You are not required to read the code in this exercise. Instead, concentrate on the navigation and display functions in the development environment.Steps
Open the ABAP class /DMO/CL_FLIGHT_LEGACY in the editor view.
In the Eclipse menu, choose Navigate → Open ABAP Development Object ... or press Ctrl + Shift + A
In the input field, enter /DMO/CL_FLIGHT as search string.
In the list of matching items, click on /DMO/CL_FLIGHT_LEGACY (Global Class) and choose OK.
Open the Properties tab to display the administrative data of development object /DMO/CL_FLIGHT_LEGACY.
Place the cursor anywhere in the source code of class /DMO/CL_FLIGHT_LEGACY.
In the tab strip below the editor view, navigate to tab Properties.
Analyze the administrative data that are displayed there, for example the original language, the time stamp of the last change or the user that at first created the object.
Locate the ABAP class /DMO/CL_FLIGHT_LEGACY in the Project Explorer view on the left of the display.
Place the cursor anywhere in the source code of the class /DMO/CL_FLIGHT_LEGACY.
On the tool bar of the project explorer, choose Link with Editor. This should expand a part of the tree under your ABAP project with the ABAP class /DMO/CL_FLIGHT_LEGACY as its end point.
Find the string get_instance( )->get in the source code of ABAP class /DMO/CL_FLIGHT_LEGACY.
Note
There has to be exactly one blank between the brackets.Place the cursor in the first row of the source code of class /DMO/CL_FLIGHT_LEGACY.
Press Ctrl + F to open the Find/Replace dialog.
In the input field labeled with Find: enter get_instance( )->get and choose Find.
Navigate to the definition of code element get(.
In the current code line, place the cursor on get( and choose Navigate → Navigate to. Alternatively, press F3.
A few code lines down there is a line starting with SELECT. Without navigating away, display some information about code element /dmo/travel after keyword FROM.
In the code line starting with SELECT, place the cursor on /dmo/booking and choose Source Code → Show Code Element Information. Alternatively, press F2.
Display the ABAP Language help for the keyword SELECT.
At the beginning of the current code line, place the cursor on SELECT and choose Source Code → Show ABAP Language Help. Alternatively, press F1.
Note
There is no need to read or understand the documentation at this point. If you are familiar with the Structured Query Language (SQL) you can have a look at the first paragraph in section Effect.