01-17-2005 1:53 PM
do you know if there is a way to call a macro dynamically...
I have thought to generate a program but this is not a good solution to mE...
Please let me know if you have any idea
01-17-2005 1:57 PM
Try update table TRMAC dynamically in your program, and call the macro from there.
Check this weblog:
/people/scott.barden/blog/2004/07/22/abap-breakpoints-and-system-macros
Regards,
Peter
PS: If it helped, press the star button at the subject:-)
01-17-2005 1:57 PM
Try update table TRMAC dynamically in your program, and call the macro from there.
Check this weblog:
/people/scott.barden/blog/2004/07/22/abap-breakpoints-and-system-macros
Regards,
Peter
PS: If it helped, press the star button at the subject:-)
01-17-2005 2:17 PM
02-03-2005 9:18 PM
I cannot agree with Peter. Donnot use TRMAC, those definitions effect all programs on your system. You might invalidate some of them and thus doing severe harm.
Kind Regards
Klaus
01-17-2005 8:24 PM
Macros can't be dynamical, because they are used during compiling. Perhaps you can generate a coding and use GENERATE SUBROUTINE-POOL. And several ABAP-command allows dynamized codings: SELECT, ASSIGN, etc.
02-03-2005 9:56 AM
Try something like the below code:
REPORT XXX .
define m1.
write :'M1'.
end-of-definition.
define m2.
write :'M2'.
end-of-definition.
define call1.
&1.
end-of-definition.
call1 m1.
call1 m2.
02-03-2005 3:43 PM
Can you help us understand what you are trying to accomplish by calling a Macro dynamically? As already stated, Macros are decoded at activation time, very similar to how INCLUDES are resolved.
If you can provide an example of what you are trying to accomplish, we should be able to come up with some ideas.