Friday, November 23, 2007

Running ABAP Programs

Quelltext-Modulen

ABAP programs can only be executed in an R/3 System. The R/3 Basis system contains a component called Kernel & Basis Services that provides a cross-platform runtime environment for ABAP programs (see also The Basis System).

Each ABAP program consists of self-contained processing blocks, which may occur in any order in the source code. Processing blocks are sections of programs, made up of structure blocks. They are processed sequentially. A processing block can be called either from outside the ABAP program, or from a processing block within the same ABAP program (see also Structure of ABAP Programs). When a processing block is called from outside the program, it can be called either by the ABAP runtime environment or another ABAP program.

This graphic is explained in the accompanying text

To start an ABAP program, at least one of its processing blocks must be started from outside the program itself. Each ABAP program has a program type, which determines whether and how a program can be run.

Programs that can be run

These programs can be run by a user by entering the program name or a transaction code. They are they actual application programs within the R/3 System, and are explained in more depth later on.

Type 1

You can start a type 1 program by entering its program name. For this reason, they are also known as executable programs. When you start a type 1 program, processors are started in the runtime environment that call a series of processing blocks (event blocks) in a predefined sequence. The sequence is oriented towards reporting tasks. This is why executable programs are also known as reports. For further information, refer to Running Programs Directly - Reports.

A special type of type 1 program is a logical database. You can start logical databases together with reports. A logical database contains subroutines that are called by an invisible system program in a prescribed sequence for type 1 programs. The subroutines make certain reporting functions reusable. For further information, refer to Logical Databases.

Type M

Type M programs can only be started using a transaction code. A transaction code starts a screen, which consists of the screen itself and its flow logic. Screen flow logic can call special processing blocks (dialog modules) in the corresponding ABAP program. Since type M programs contain mostly dialog modules, they are known as module pools. For further information about running module pools, refer to Dialog-controlled Program Execution - Transactions.

Programs that Cannot Be Run Directly

These programs cannot be started directly by a user. Instead, they contain processing blocks or other source code that can only be used by an application program that is already running. They are described in more detail in a later section.

Type F

Type F programs are not executable. They serve as a container for function modules. When you call a function module from an ABAP program, the entire main program is loaded into the internal session of the current program. Since type M programs contain mainly function modules, they are known as function groups. Function modules are a type of procedure. They are described in more detail in the Procedures section.

Type K

Type K programs are not executable. They are container programs for global classes, and are known as class definitions. Classes belong to ABAP Objects and are described in more detail in that section.

Type J

Type J programs are not executable. They are container programs for global interfaces, and are known as interface definitions. Interfaces belong to ABAP Objects and are described in more detail in that section.

Type S

Type S programs are not executable. They are container programs for subroutines that should only be called externally. When you call a subroutine from an ABAP program, the entire main program is loaded into the internal session of the current program. Since type S programs contain mainly subroutines, they are known as subroutine pools. Subroutines are a type of procedure. They are described in more detail in the Procedures section.

Type I

Type I programs cannot be run directly, and contain no callable processing blocks. They are used exclusively for modularizing ABAP source code, and are included in other programs. Include programs are described in more detail in the Source Code Modules section.

Starting Programs in ABAP

For all programs that can be started directly, there are ABAP statements that you can use to call a program from another application program that is already running. For further information, refer to Program Calls.

Leaving content frame

No comments:

Blog Archive