Developing the First ABAP Program
Summary: In this tutorial, we show you how to develop the first simple but famous ABAP program called “Hello World” in ABAP editor.
Step 1. From SAP first screen type SE38 in the command field to call ABAP Editor.
Step 2. In the ABAP Editor, type program name ZDEMO_HELLOWORLD. As the SAP naming convention, every customer’s program must start with Z or Y.
Step 3. Click Create button to create a new program. SAP will popup a new window and ask you fill some program’s attributes such as program title and program type… Just fill the program title “Hello World”, program type “Executable program” and click Save button.
Step 4. System will ask you for “Object directory entry” of the new program. To make it simple, just click on “Local Object” button. Basically by doing this, you specify that you don’t want to import this program to another SAP systems such as QA or Production system.
Step 5. System will display ABAP Editor for you to start writing ABAP code.
Step 6. You just type the code as below and click on Activate button. When you activate the program, SAP system checks the program syntax and generates run-time version. You can click on the “Direct Processing” button to run the program.
*&---------------------------------------------------------------------* *& Report ZDEMO_HELLOWORLD *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT zdemo_helloworld. WRITE 'Hello World'.
We will examine the ABAP Hello World program in details as below:
- The REPORT keyword indicate that this program is a report or executable program. Meaning you can invoke it directly from SE38. Followed by the keyword REPORT is the program name.
- Every ABAP statement ends with a full-stop (.)
- The WRITE statement is used to write a message on screen. In this case, WRITE statement accept a string ‘Hello World” as a data object.
Here is the output of the program. As you see, you have program title “Hello World” and a message Hello World on screen.
Congratulation! You’ve developed the first ABAP program that generate a greeting message “Hello World”.
In this tutorial, you’ve learned how to launch ABAP Editor by using transaction code SE38 and developed a simple but famous ABAP program called “Hello World”.








