| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Tips Categories:
Contribute?What's New?
What's Hot? |
Defining Global Macrosby Joyjit Ghosh, IBM India Most of the time we define macro in our program by DEFINE …
END-OF-DEFINITION statement. Ex: DEFINE <Name>.
“<Name> = placeholder for
macro name
Statement…… Statement ….. ……………….. END-OF-DEFINITION. And this macro can be called in the following way <Name> par1 par2 …par9.
“par1… par9 = Parameters, separated by spaces This above definition is local to the program where it is
defined i.e. we cannot call this macro from another program. But we can create
global macro that can be called by any program. Global macro can be created by maintaining entries in table
TRMAC.
Most popular example of standard global (system) macro is
BREAK which is defined in table TRMAC as shown in the screen shot below.
From any program we can call this macro as: BREAK <user id>. “<user id> = placeholder for userid
Similarly if we want we can maintain our own global macro in
TRMAC as shown below: Add new entry to TRMAC
Create custom macro
Call this global macro from a report
Output:
Caution:
Table TRMAC is a system table. Removing or changing
entries in this table can mess up the system. |
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||