What is an ABAP Report? — Theory + Your First Program

ABAP report beginner guide cover showing a blank title card and tech illustration for Blog 1 of the ABAP Reports Zero to Hero series
What is an ABAP Report? Theory + Your First Program | ABAP Reports Series
ABAP Reports Series · Blog 1 of 15

What is an ABAP Report? Theory + Your First Program

Beginner · 10 min read · No prior ABAP needed

1. What is an ABAP report?

An ABAP report is a program that reads data from the SAP database, processes it, and shows the result to the user as a list. Think of it as a question you ask the system: “Show me all sales orders created this month.”

Reports are the most common thing a new ABAP developer builds. Almost every business team asks for them: finance, sales, warehouse, HR.

In one line

Report = input (selection screen) + data (SELECT) + processing (internal tables) + output (list or ALV).

Classical vs. ALV reports

TypeOutputUsed for
Classical reportPlain text list using WRITESimple output, learning the basics
Interactive reportList with double-click drill-downSummary then detail views
ALV reportGrid with sort, filter, exportAlmost all real projects

This series starts with classical reports and builds up to production-ready ALV.

2. The ABAP development environment

You can write ABAP in two places:

ToolWhat it isBest for
SE38 (ABAP Editor)Built into SAP GUI. Type SE38 in the command field.Learning, quick edits
Eclipse ADTABAP Development Tools plugin for EclipseModern development, CDS, RAP

In this series, examples work in both. We will use SE38 because it is available in every SAP system.

Create a program in SE38

  1. Open SAP GUI and type SE38 in the command field. Press Enter.
  2. Enter the program name, for example ZHELLO_ABAP. Custom programs must start with Z or Y.
  3. Click Create. Enter a title and choose type Executable program.
  4. Save as a local object (package $TMP) while you practise.
  5. Write your code, then press Ctrl+F3 to activate and F8 to run.
Activate before you run

If your changes do not show up, you probably saved but did not activate. Always press Ctrl+F3.

3. Anatomy of a report program

Every report starts with the REPORT statement. After that you add code and output statements.

StatementWhat it does
REPORT zname.First line. Declares the program name.
* at line start, or " mid-lineComments. The system ignores them.
WRITE 'text'.Prints text to the output list.
WRITE: / 'text'.The / starts a new line first.
NEW-LINE.Moves to the next line.
SKIP n.Inserts n blank lines.
ULINE.Draws a horizontal line.
Every statement ends with a period

ABAP uses . to end a statement. Forgetting it is the number one beginner error.

4. Your first program: Hello ABAP

Copy this into SE38, activate, and run it.

*&---------------------------------------------------------------------*
*& Report ZHELLO_ABAP
*& My first ABAP report
*&---------------------------------------------------------------------*
REPORT zhello_abap.

" Declare a variable
DATA lv_name TYPE string VALUE 'ABAP Learner'.

" Print a heading
WRITE: / 'Hello ABAP!'.
ULINE.

" Print using the variable
WRITE: / 'Welcome,', lv_name.
SKIP 1.

" Print system information
WRITE: / 'User      :', sy-uname,
       / 'Date      :', sy-datum,
       / 'Time      :', sy-uzeit,
       / 'System ID :', sy-sysid.

What happens, line by line

  • REPORT zhello_abap. names the program.
  • DATA lv_name TYPE string VALUE '...'. creates a text variable with a starting value.
  • WRITE: / ... prints on a new line. The colon lets you chain several outputs.
  • sy-uname, sy-datum and sy-uzeit are system fields filled automatically by SAP.
Expected output
Hello ABAP!
-----------------------------------
Welcome, ABAP Learner

User      : YOUR_USER
Date      : 31.10.2026
Time      : 14:05:22
System ID : DEV

Your values will differ based on your login and system.

5. System fields you must know

System fields live in the structure SY (also written SYST). SAP fills them for you. You only read them.

FieldMeaning
sy-unameLogged-in user name
sy-datumCurrent date
sy-uzeitCurrent time
sy-sysidSystem ID (DEV, QAS, PRD)
sy-mandtClient number
sy-repidCurrent program name
sy-subrcReturn code of the last statement. 0 = success, anything else = problem.
sy-tabixCurrent row index of an internal table
sy-dbcntNumber of rows touched by the last database statement
sy-lsindCurrent list level (used in interactive reports)
Remember this one

sy-subrc is the field you will check most often. After a SELECT or READ TABLE, always test whether it equals 0.

6. Try it yourself

  • Change lv_name to your own name and run again.
  • Add WRITE: / sy-repid. to show the program name.
  • Use SKIP 3. and see the blank lines.
  • Add a second ULINE. at the end.
  • Create a variable lv_year TYPE i VALUE 2026. and print it.

7. Common mistakes

  • Missing period. Every statement must end with .
  • Not activating. Save is not enough. Press Ctrl+F3.
  • Wrong program name. Custom programs must start with Z or Y.
  • Quotes mismatch. Text uses single quotes: 'text'. Double quotes start a comment.
  • Forgetting the colon. Chained WRITE: needs the colon after the keyword.
  • Ignoring sy-subrc. Later you will read data. Always check the return code.

8. Featured courses

Hand-picked courses to go deeper after this blog.

Up next: Blog 2

Selection Screens. Learn PARAMETERS and SELECT-OPTIONS so users can enter values, and build a calculator report.

Read Blog 2: Selection Screens →
ABAP Reports: Zero to Hero · Blog 1 of 15
WhatsApp WhatsApp us
Call Now Button