ABAP: Does it have a Compiler or an
Interpreter?
Everybody
knows that ABAP is a fourth generation, high level language. But how many of us
are sure as how an ABAP report is executed? Does it have a compiler or an
Interpreter or both (hmm)?? Well, the answer is:
“To
some extent it has both”. To elaborate it: Before an ABAP
program is executed, the ABAP compiler must translate it into an intermediate
language. This form of program i.e. the program in this intermediate form is
called an ABAP load.
You might know that an ABAP program has a modular structure.
These modules are called as processing blocks. It is
just rephrasing stunt. Logically, if we see any ABAP program, it contains two
parts:
1. The first part has the global declarations.
2. And the
second part contains the processing
blocks.
are several types of processing blocks which
includes dialog modules and subprograms. More precisely, there are the
following types of processing blocks:
1. Dialog modules
2. Event blocks
3. Subprograms (subroutines, function modules and
methods).
The dialog modules are called from the screen flow
logic. The subprograms are called using ABAP statements which themselves are
part of some other processing block and event blocks are called from outside an
ABAP program. Now the ABAP load contains
processing blocks in one-to-one correspondence to the processing blocks of the
ABAP program, that is, for each processing block in the ABAP program, there is
exactly one processing block in the corresponding ABAP load.”
Before executing any processing block, it is first
be determined whether the corresponding ABAP program has already been compiled
or not. If it had been already compiled, the ABAP Virtual Machine can immediately begin executing the processing
block; else the ABAP compiler must first translate the ABAP program into an
ABAP load and then execute it.
No comments:
Post a Comment