‎2005 Jan 17 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
‎2005 Jan 17 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:-)
‎2005 Jan 17 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:-)
‎2005 Jan 17 2:17 PM
Yes it help a bit.
But modifying TRMAC is not acceptable for me
‎2005 Feb 03 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
‎2005 Jan 17 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.
‎2005 Feb 03 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.
‎2005 Feb 03 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.