What is the difference between macro and subroutine?
Answer Posted / paramjeet
Macros can only be used in the program the are defined in
and only after the definition are expanded at compilation /
generation. Subroutines (FORM) can be called from both the
program the are defined in and other programs . A MACRO is
more or less an abbreviation for some lines of code that are
used more than once or twice. A FORM is a local subroutine
(which can be called external). A FUNCTION is (more or less)
a subroutine that is called external. Since debugging a
MACRO is not really possible, prevent the use of them (I?ve
never used them, but seen them in action). If the subroutine
is used only local (called internal) use a FORM. If the
subroutine is called external (used by more than one
program) use a FUNCTION.
| Is This Answer Correct ? | 61 Yes | 36 No |
Post New Answer View All Answers
How do you get the number of lines in an internal table?
How can an internal table with header line and one without header line bedistinguished when passed to a subroutine?
What are the functional areas? User groups?
Define structure in abap data dictionary?
What is alv programming in abap? When is this grid used in abap? : abap hr
Explain the advantage of structures?
If a table that is to be extended contains a long field, we cannot use append structures why? : abap data dictionary
Is it possible to bring select option in module pool screens?
What are the table controls in bdc ? What is the difference between bdc and lsmw ?what is the difference between bdc and rfc ? : abap bdc
What happens if we use leave to list-processing without using suppress-dialog?
What is the bitwise operator in the sap abap?
Explain the call transaction method? : abap bdc
How table control cn be generated using bdc? : abap bdc
In delivery processing which step comes first picking, packing, posting goods issue ?
Which database object is used for storing the system variables? : abap data dictionary