You must already have an SAP BTP account with an ABAP service and service key. You must also have installed Eclipse and the SAP ABAP Development Tools.
Task 1: Create an ABAP Cloud Project
In your local installation of SAP ABAP Development Tools (ADT) in Eclipse, create an ABAP Cloud Project and link it to the ABAP Instance in your SAP BTP subaccount.
Steps
Log on to your subaccount in SAP BTP and copy the ABAP service key into your clipboard.
Start the SAP BTP Cockpit and choose the subaccount containing your ABAP service.
Choose Instances and Subscriptions.
In the Instances box, select the Key(s) entry under Credentials.
Choose Copy JSON, and then select Close.
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.
Choose File → New → ABAP Cloud Project.
Select Use a Service Key and choose Next
Paste the service key into the editor with the key combination, Ctrl + V, and choose Next.
Choose Open Logon Page in Browser. 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 ADT to analyze the source code of ABAP class /DMO/CL_FLIGHT_LEGACY.
NoteYou are not supposed to actually read the code you are going to see in this exercise. Concentrate on the navigation and display functions in the development environment.
Steps
Open ABAP class /DMO/CL_FLIGHT_LEGACY in the editor view.
NoteIf you cannot find class
/DMO/CL_FLIGHT_LEGACY or any other development object starting with /DMO/, you have to import the
ABAP Flight Reference Scenario for the ABAP RESTful Application Programming Model into your system. To do so, please follow the instructions under the following link:
https://github.com/SAP-samples/abap-platform-refscen-flightIn 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 ABAP class /DMO/CL_FLIGHT_LEGACY in the Project Explorer view on the left.
Place the cursor anywhere in the source code of 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 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.
NoteThere has to be exactly one blank between the brackets.
Place the cursor anywhere in the source code of class /DMO/CL_FLIGHT_LEGACY.
Press Ctrl + F to open the Find/Replace dialog.
In the input field labelled 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/booking
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 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.
NoteThere is no need to read or understand the documentation at this point. If you are familiar with Structured Query Language (SQL) you can have a look at the first paragraph in section Effect.