SAP S/4
ABAP Programming
for non-Technical Users
Create first ABAP Program
‘Hello World!’
using SE38
introduction to ABAP Syntax
WRITE
use SE38 to write the first ABAP Program
‘Hello World!’
Traditionally, Hello World programs are used to illustrate how the process of coding works, as well as to ensure that a language or system is operating correctly. They are usually the first programs that new coders learn, because even those with little or no experience can execute Hello World both easily and correctly.
In the Program field, enter ZABAP_001, then choose [Create].
in ABAP documentation, you are suppose to
use name for user-defined ABAPs which starts with Y or Z
and:
Program name starts with : Y-- is used for Local Development.
Program name starts with : Z-- is used for Actual Development.
(but
really does not matter as long as it starts with Y or Z as it is to differentiate with
other SAP delivered Standard ABAP programs which will use first character from A to X for the 1st letter of the Program names)
This specifies the type of program.
1 Executable Programs
Can be started without a transaction code,
either directly or in the background.
Executable programs are controlled by an invisible system program.
The system program calls processing blocks in the program in a pre-defined order. It displays the selection screen at the
beginning of the program and outputs a list at the end. Executable programs allow you to work with logical databases.
Status
The program Status specifies whether the program is a test program, a system program or a production program.
Depending on the Status, some of the utilities cannot be used. For example, you cannot use ABAP/4 debugging with System programs.
The language version Standard ABAP (Unicode) includes the entire ABAP language scope. The Unicode checks for programs in Unicode systems are applied.
The Editor begins with a template
.. this section is the comment section
Executable programs are introduced with the REPORT followed with the Program_name
and
Module pool programs are introduced with the PROGRAM statement.
Program syntax
WRITE ‘type text here’.
at the end of the code, press enter to append line.
green color shows hints of no error the syntax.
Step 1: Write Syntax
Step 2: Syntax check
Step 3: Corrections
Step 4: Syntax check
Step 5: Save
Step 6: Activate
Step 7: Test
Step 8: IF Change or Add ABAP coding (go back to Step 2)
Program syntax
WRITE ‘type text here’.
at the end of the code, press enter to append line.
green color shows hints of no error the syntax.
Program syntax
WRITE ‘type text here’.
at the end of the code, press enter to append line.
(with a missing ‘ before the . at the at the code line)
red color shows hints of some form of error the syntax.
Syntax check,
note below show error on Line 9 with some hints
Added the missing ‘
(note immediate green even before the syntax check)
Step 1: Write Syntax
Step 2: Syntax check
Step 3: Corrections
Step 4: Syntax check
Step 5: Save
Step 6: Activate
Step 7: TestStep 8: Change code (go back to Step 2)
NO more
syntax errors
Step 1: Write Syntax
Step 2: Syntax check
Step 3: Corrections
Step 4: Syntax check
Step 5: Save
Step 6: Activate
Step 7: Test
Step 8: IF Change or Add ABAP coding (go back to Step 2)
SAVE the Program
Step 1: Write Syntax
Step 2: Syntax check
Step 3: Corrections
Step 4: Syntax check
Step 5: Save
Step 6: Activate
Step 7: Test
Step 8: IF Change or Add ABAP coding (go back to Step 2)
ACTIVATE the Program
Step 1: Write Syntax
Step 2: Syntax check
Step 3: Corrections
Step 4: Syntax check
Step 5: Save
Step 6: Activate
Step 7: Test
Step 8: IF Change or Add ABAP coding (go back to Step 2)
click “Direct Processing”
Step 1: Write Syntax
Step 2: Syntax check
Step 3: Corrections
Step 4: Syntax check
Step 5: Save
Step 6: Activate
Step 7: Test
Step 8: IF Change or Add ABAP coding (go back to Step 2)
result of
Hello World
1st program
Title of the Program
create a T-code
the Program name
SAVE
create a new
T-code
Execute the Program
1st ABAP Program