Structure of ABAP Program

ABAP program consists the following structure

  1. Header
  2. Global Declarations
  3. Processing Logic
  4. Definition of Reusable Blocks
ABAP Program structure


Header section provides the detailed information about the development and which is the standard template for all custom ABAP developments. The first statement of ABAP program starts with a word PROGRAM or REPORT. It is not mandatory to mention the program name, but for documentation purpose correct name of ABAP program should be used.

When the user creates a program, by default system inserts the first ABAP statement

  • For module pools – PROGRAM <name of program>
  • For executable pools – REPORT <name of report>

Global Declaration

Global declaration declares all the global variables

Processing Logic

Processing logic block is used to implement the business logic and it is written for declaration.

Definition of Reusable Blocks

You can define reusable components once and you can call components wherever they are need for business logic.

Pre-requisites to create an ABAP programs

  1. Every SAP ABAP program should have a name and should begin with a letter Y or Z. The letters from A to X is reserved for SAP programs.
  2. Title : – Description of the program
  3. Type : – Types of ABAP program are
    • Executable program,
    • Include program and
    • module pool program.
  4. Package : – Package a place where the program has to be created and stored. In real time package is created for each module/sub-module but not individuals.

Characteristics of ABAP program 

  1. ABAP programming language is not a case sensitive. But it is a space sensitive, it should have space between the programming words.
  2. ABAP is only case sensitive during camparison
  3. Every ABAP statement should end with a period (full stop).
  4. The program name should not contain a special characters such as ” , – ( ) “, spaces, etc.
  5. The program name should be unique and description length upto 30 characters long.

An Example of SAP ABAP Program

SAP ABAP Program example

Where ABAP programs are stored?

ABAP Repository is a special memory in the database of SAP R/3 system and ABAP programs are stored in this memory.