2009 May 21 6:19 AM
2009 May 21 9:32 AM
Hi,
Macro can be used when you want to execute a particular code again and again. It is generally used for the calculation purpose.
for example
DEFINE calculate.
&1 = &2 + &3.
END-OF-DEFINITION.
DATA: l_var1 TYPE i,
l_var2 TYPE i,
l_var3 TYPE i.
Loop at itab.
calculate itab-var1 itab-var2 itab-var3.
endloop.
Hi Puneeth,
Modularization is done by using macros.
we can written reusuable code in Macros .
for ex: we can build field catalog using Macros ...
Macros reduces the coding effort.
Hope it hepful .
Thanks
Lalitha.
2009 May 21 6:37 AM
Hi,
Macros are used for code modularization.
The main advantage of macro is that it can be stored in the table TRMAC, and can be used by any program.
Regards,
George
2009 May 21 6:41 AM
I once had a requirement.. where I was writing data to file... and the req demanded that the quant fields need to show a space rather than 0.00 when empty... for that I wrote a macro and that solved the problem...
2009 May 21 9:32 AM
Hi,
Macro can be used when you want to execute a particular code again and again. It is generally used for the calculation purpose.
for example
DEFINE calculate.
&1 = &2 + &3.
END-OF-DEFINITION.
DATA: l_var1 TYPE i,
l_var2 TYPE i,
l_var3 TYPE i.
Loop at itab.
calculate itab-var1 itab-var2 itab-var3.
endloop.
2009 May 21 2:03 PM
Hi Puneeth,
Modularization is done by using macros.
we can written reusuable code in Macros .
for ex: we can build field catalog using Macros ...
Macros reduces the coding effort.
Hope it hepful .
Thanks
Lalitha.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |