After completing this lesson, you will be able to:
Create a 'Hello World' application
A 'Hello World' App in ABAP
As in all other programming languages, the first thing that you should do in ABAP is familiarize yourself with the development environment and the most elementary aspects of the language by writing a short "Hello World" app.
The main user interface technology that you will use in modern ABAP programming is Fiori Elements. However, ADT provides a console for you to create output quickly and simply in test applications.
In your package, create an new ABAP class. Let the class implement interface IF_OO_ADT_CLASSRUN so that you can use the class as the main program for an Eclipse console app.
Steps
In your package, create a new ABAP class with the name ZCL_##_HELLO_WORLD. Ensure that it uses the interface IF_OO_ADT_CLASSRUN. When you are prompted to assign the class to a transport request, use the transport request that you created in the previous task.
Choose File → New → ABAP Class.
Enter your package ZS4D400_##, where ## is your group number.
Enter the name ZCL_##_HELLO_WORLD where ## is your group number, and enter a description for your class.
Choose Add... (next to the Interfaces group box).
Enter the filter text IF_OO_ADT_CLASSRUN. Double-click the matching entry in the hit list.
Choose Next.
Select Choose from requests in which I am involved and your own transport request.
Choose Finish.
In the if_oo_adt_classrun~main( ) method, use out->write( ) to output the phrase Hello World.
In the editor, enter the following coding between METHOD if_oo_adt_classrun~main and ENDMETHOD.: