Copyright 2020 - BV TallVision IT

Article predades the millenium bug... Any bit of coding that is done repetitively can be set up in a macro, with DEFINE .. END-OF-DEFINITION within any Abap coding source. This article is about another type of macro, which is much less well known. The Macro module or RMAC macro can be set up centrally on the system, so it can be called from anywhere.

RMAC macro's are listed in table TRMACand when customer specific macro's can be added to this table. In effect: you can compose a new statement using an RMAC macro. Do consider the following when looking into this:

  • In-report macro's can be very handy and when used properly they can make the coding more organized and readabe
  • System-wide macro's can confuse the h.ll out of developers: what statement is that ?
  • The Abap language knows many ways to set op coding in modules, the RMAC macro is one of them but should not be used for modularization purpose.
  • When the RMAC source code is changed, all reports that use the macro should be re-generated for the changes to be applied. How to ensure all of them are done ?


This feature in SAP coding is not very well known. It's HR developments which rely on this technology most. So if you are looking into HR Abap logic and you can't make out what a certain bit of source code is doing - check the TRMAC table.