... &1 ... &9 ...
Any content can be defined between the statements
A macro is not evaluated until it is included in another program (which must have correct syntax). Currently, a macro can only be
included in other ABAP programs using its name
The validity of a macro is determined by its position in the
It can be inserted at any point after
END-OF-DEFINITION in the same compilation unit. If another macro is defined with the same name, it overwrites the previous macro from its new position.
Within a macro, up to nine placeholders
&1 ... &9 can be used instead of ABAP words and operands. These placeholders must be replaced by fixed words when the macro is inserted.
- Breakpoints cannot be inserted into macros and the statements of a macro cannot be performed as individual steps in ABAP Debugger.
- In global classes, macros are defined in a dedicated include program.
Apart from in the source code of a program and in
type groups, macros can
also be stored as cross-program macros in the table TRMAC. However no new
macros should be defined in the TRMAC table. An example of a macro stored in the table TRMAC is
break, which sets a breakpoint depending on the current user name in the system field
See Including Macros.