ABAP modularization technique Macros

Macros are local to program and used for source code modularization. With Macros you can reuse the same of statements multiple times in a program. Macros should be defined first and called later. We can use macros within macros but a macro cannot call itself.

Macros can have up to nine placeholders(&1, &2, … &9). Syntax for macro definition:

DEFINE <macroname>.
...
END-OF-DEFINTION.
ABAP macro example
ABAP macro example output