DEFINE


Basic form

DEFINE macro.

Effect

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 statement.

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.

Example

Define a macro called "++" for use in the program.
DEFINE ++. ADD 1 TO &1. END-OF-DEFINITION. DATA: NUMBER TYPE I VALUE 1. ... ++ NUMBER.

Notes



Index
© SAP AG 1996