Macros are used to perform the arithmetical operations. Macros can take up to 9 place holders. (&1, &2, -- - &9). If you want to maintain the same set of statements more than one location of the same program instead of this we maintain those statements in macro definition later we call the same macro definition from different locations of the same program.

Syntax of calling the macro: -
<macro name> <place holder1 value> <place holder 2 value>.

Note: - In macros definition should be the first and calling should be the next.

*& Report  ZR_MACROS

Typesbegin of ty_t001,
type t001-bukrs,
type t001-butxt,
type t001-ort01,
End of ty_t001.
Datawa_t001 type ty_t001,
type table of ty_t001.
Define fill_tab.
-bukrs &1.
Append wa_t001 to it_t001.
Clear wa_t001.

Fill_tab '1000' 'TCS' 'HYD'.
Fill_tab '2000' 'IBM' 'CHE'.
Loop at it_t001 into wa_t001.
Write/ wa_t001-bukrswa_t001-butxtwa_t001-ort01.