Hello World [ABAP]
One of the first and most well known attempts to tackle any programming language is to write a ‘Hello World’ application. Lets begin by creating a new program Z_HELLO_WORLD.
Note: use transaction SE38 to gain access to ABAP editor.
Every program written in ABAP has to begin with a specific line:
REPORT <PROGRAM NAME>.
REPORT Z_HELLO_WORLD.
Notice that ABAP has its own particular syntax. Every statement must be concluded with a period, just like in Java you would use a semicolon.
To finish off our program we will use a write command.
WRITE <format> <field> <options>
<format> output format specifications. The ‘/’ symbol signifies the new line symbol.
<field> can be data variables, text literals, or numbered text.
<options> specify a number of formatting options.
WRITE / ‘Hello World’.