Introduction
ABAP/4 is the language created by SAP AG for
implementation and customization of their R/3 system.
A D V E R T I S E M E N T
The rough English translation of the acronym would be A
Business Application Programming language, version 4.
It is a block-structured language that seems to me to most
resemble a cross between Oracle's PL/SQL and IBM's PL/I.
It contains a moderately rich set of data structures;
integers, "packed" BCD numbers, character strings, dates, times, ...
Some reasonable modularization tools handling both
subroutines that are localized (called a FORM), and globally defined
encapsulated functions (called FUNCTION MODULES).
A somewhat weak set of SQL operators; a select statement is
represented by a loop structure, where operations are placed within the loop.
e.g. A typical selection would look like:
select * from mytable where key like '25%'. write: / mytable-key,
mytable-value. perform do_something using mytable-value. endselect
The operators are somewhat "weak" in that they cannot be
directly composed to generate such things as inner or outer joins; one would
instead nest select "loops" one within another.
ABAP/4 contains some highly report-oriented event-driven
control structures. For instance, events can be defined for:
INITIALIZATION.
START-OF-SELECTION.
END-OF-SELECTION.
AT NEW-PAGE.
AT END-OF-PAGE.
Reports can be defined with drill-down capabilities,
where by "double-clicking" on a line on a report, the program may be requested
to display a "subreport," or perhaps to run an independent report or
transaction.
There are also events defined to automate access to "logical
databases," that is, to selectively walk down a hierarchy tree defined for a set
of related tables. This can be used to provide (without programmer intervention)
additional selection and sort criteria as parameters to reports.
ABAP/4 is a byte-compiled language. The virtual machine is
fairly well hidden from view, but core dumps can be examined, and appear to
resemble IBM 370 assembly language.
Operations that work on tables will have to access the
database server; for efficiency's sake, there is the notion of an "Internal
Table," which is an array structure that is stored "locally" on the application
server . Using internal tables decreases both the load on the network and on the
database server, and is highly encouraged, at least for moderate quantities of
data.
Some additional "little languages" are used to link ABAP/4
code to screen definitions and screen control code to help define online
transactions.
Jointly with the "screen control" language, ABAP/4 is used to
implement substantially all of the visible R/3 system functionality. The R/3
"kernel" represents some (albeit fairly large) programs written in C that
interpret ABAP/4 bytecode. There is so much infrastructure built up around this
that most users and indeed many developers are probably not aware of where or
what the kernel is.
|