Using System Variables


After completing this lesson, you will be able to:

  • Use system variables in a program

Frequently Used System Variables

System Variables

System VariableDescription
SY-DATUMCurrent date
SY-UZEITCurrent time
SY-UNAMEUser ID of current user

So far, you have declared all variables that you work with in your ABAP programs. However, the system contains special system variables (or system fields) that you can use in your source code without explicitly declaring them. The ABAP runtime system manages these system variables, and they are available to any ABAP program that wants to use them.

You can recognize a system variable by its name. All system variable names begin with (SY-).

System variables provide information about the actual system status. The ABAP runtime system populates and changes the values of the system fields when necessary.

For example, the system variable SY-DATUM is always filled with the current date, and SY-UZEIT is filled with the current time.

For a complete list of system variables, see the ABAP keyword documentation for System Fields.

System variables are intended for read access only.

Log in to track your progress & complete quizzes