Explore the ABAP Repository
- How to find development objects in the ABAP Repository
And that’s it. You should now be familiar with the most important ABAP Repository objects and the relationship between them.
You can now work through the tutorial mission Get Started with ABAP Development.
- Step 1
You will start by opening a package with various ABAP Repository object types.
In ABAP Development Tools, expand the project that you created, by choosing the arrow on the left:
Select Favorite Packages, then choose Add Package… from the context menu:
SABAPin the search field, then choose the package
SABAPDEMOSfrom the matching items box:
The package is added to your favorites:
- Step 2
Expand the package SABAPDEMOS again by choosing the arrow, then expanding the Source Code Library folder:
You will see a list of folders of objects in alphabetical order. For the moment you will focus on just 3:
- Executable programs also known as reports
- Classes (part of the object-oriented ABAP Objects)
- Function modules (now obsolete - see below)
You will now explore how these concepts fit together.
- Step 3
Expand the Programs folder, scroll down and choose (double-click) the program
Alternatively, choose Open development object (
Ctrl+Shift+A) from the toolbar and choose the program
The program opens in a text-based editor:
Click on the editor and choose Link to Editor from the Project Explorer toolbar.
The relevant folders and packages will now open, showing the program in its package in the Project Explorer. This works for any Repository object.
The outline also appears:
Also, if you choose the Properties tab, you can see the package and application component:
In the Outline, you can see that the program contains a local class, Demo, with a method, Main, and, crucially, an event keyword
START-OF-SELECTION. If you look in the main editor, you will see that when the associated event is triggered by the ABAP runtime environment, the program calls the method
Mainof the class
Without a processing block such as this, the program would not do anything. Also note, if you are completely new to ABAP, but experienced in other languages, that every ABAP statement ends with a period (.).
For more information, see ABAP Keyword Documentation: START-OF-SELECTION.
- Step 4
Now run your program by choosing Run (
F8) from the toolbar (ignore the other options for now):
An ABAP console appears. Change the name of the database table, or number of rows if you want, then choose Enter:
The console displays 10 rows of the table in a new tab:
Close the console.
- Step 5
You will now explore ABAP global classes:
Back in the main text editor for the program, scroll down till you find the class
This is a global class. Select it and choose Navigate (
F3) from the context menu. The definition appears in a text-based editor. (The outline also appears):
- Step 6
If you looked in the Project Explorer for the class
CL_DEMO_INPUT, you will not find it in the package
SABAPDEMOS. If you look in the Properties tab, you will see that
CL_DEMO_INPUTbelongs to another package. You can display it in the hierarchy by right-clicking in the text editor and choosing Show In > Project Explorer:
The class appears in its package,
- Step 7
Finally you will look at function modules.
Function modules are managed in function groups and provide two main benefits:
They allow you to encapsulate and reuse global functions in an ABAP system.
They are also a very powerful feature, in that SAP delivers many built-in function modules – both general such as date and time, or remote system information, and module specific, such as HCM or FI. See these two lists for more details:
Function modules are now obsolete for new development. You should now use ABAP Objects for modularization. However, you should be familiar with them, since you may need to maintain them or use an existing function module. For more information on obsolete ABAP language elements, see the ABAP Keyword Documentation: Function Modules.
Now you will inspect a function module:
In the Project Explorer, in the package
SABAPDEMOS, expand Source Code Library > Function Groups, then expand the group
DEMO_SPFLI> Function Modules. You will see 2 function modules:
Choose (double-click on)
READ_SPFLI_INTO_TABLE. The function module opens in a text-based editor:
Now run your function module by choosing Run (
F8) from the toolbar (ignore the other options for now).
The initial screen should look like this. Choose Run (
Double-click on the text 4 entries.
The output should look roughly like this.
- Step 8
Which code fragment below will turn your ABAP program into an executable program?
Choose the best match and choose "Submit Answer".