on 10-13-2005 10:47 AM
Hi,
Can any one just let me know the procedure to create
MACROS.
Thanks In Advance
Regards
Irfan Hussain
Don't use them !
You can't debug them and they make programs un-readable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm in disagreement with you.
DEFINE addline.
wa_line-one = &1.
wa_line-two = &2.
wa_line-three = &3.
append wa_line to it_line.
END-of-definiton.
addline 'a' 'b' 'c'.
is more readable ispecially when you have a lots af insert in a table without haviung the possibility to do a loop. It is much more readable then having tons of assignments and appends.
Hi,
A sample code,Here operation is the MACRO
REPORT ZMACRO.
DATA: RESULT TYPE I,
N1 TYPE I VALUE 5,
N2 TYPE I VALUE 6.
DEFINE OPERATION.
RESULT = &1 &2 &3.
OUTPUT &1 &2 &3 RESULT.
END-OF-DEFINITION.
DEFINE OUTPUT.
WRITE: / 'The result of &1 &2 &3 is', &4.
END-OF-DEFINITION.
OPERATION 4 + 3.
OPERATION 2 ** 7.
OPERATION N2 - N1.
Check this link,
<u>http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db972835c111d1829f0000e829fbfe/frameset.htm</u>
Hope it helps u
Thanks&Regards,
Ruthra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
this is the help from sap
Defines a section of source code (macro) that you can address using the name macro. Source code saved as a DEFINE macro may only consist of complete ABAP statements
Suppose you define a macro "INCREMENT", which you then use in your program.
DEFINE INCREMENT.
ADD 1 TO &1.
END-OF-DEFINITION.
DATA: NUMBER TYPE I VALUE 1.
...
INCREMENT NUMBER.
cheers,
sasi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.