Defines a program component (macro) under the name
macro . It must consist only of ABAP/4 statements and is
expanded at compilation time.
A macro should always be concluded with the END-OF-DEFINITION
In the definition, you can use &n to reference positional
parameters (n = 0 .. 9). When the macro is called, &n is
replaced by the n-th actual parameter.
Define a macro called "++" for use in the program.
ADD 1 TO &1.
DATA: NUMBER TYPE I VALUE 1.
In general, it is better to use subroutines
FUNCTION ) rather than macros because
subroutines - unlike macros - are supported by all the ABAP/4
Development Workbench tools (including debugging, runtime analysis,
runtime error handling, ...).
You cannot nest macro definitions.
© SAP AG 1996