First ABAP program to print Hello World

Hi all,

Welcome to saplearningzone.com

presenting you the basic/ first abap program to print something on screen

  • Look at the above screeshot so we have basically created a report name ZBASICPROG(name of all reports/ codes in sap abap starts with either ‘Z’ or ‘Y’).
  • so moving onto the next step we have written a line (line 8) for printing data on screen

for displaying something on output screen we have to use ‘write’ statement so syntax for that goes something like this,

syntax – WRITE : ‘text you want to display on screen’.

  • so first you have to type ‘Write’ followed by a colon (:) and then Whitin a set of single quote ( ‘ ‘ ) you can write whatever you want to display on output screen.
  • also all the statements on abap ends with a fullstop or period (.) , at the end of line 8 we have written a period (.) which basically let the compiler knows that the statement has come to an end now it can move onto the next line.

Below is the code for your reference:

REPORT ZBASICPROG.

WRITE : 'hello world'.

replace the report the name with your report name.

Below is the output of the above code:

Hope you found this post helpful, thanks 🙂

Be the first to comment

Leave a Reply

Your email address will not be published.


*