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


Please Help Members By Posting Answers For Below Questions

What is a table cluster? : abap data dictionary

819


Write special commands of list?

662


Write syntax for message error (report)?

735


What are the two different ways of building a match code object?

678


What is is a match code? : abap data dictionary

770






What is a table attribute? : abap data dictionary

668


visibility section for class level and attributes level

922


Explain client-dependent and client-independent tables.

709


What is the project you are currently working and work that you are doing

1142


On ABAP, Did you set up a workflow? Are you familiar with all steps for setting up a workflow?

699


How we can give authorization on the fields of table control in a dialog-programming?

1961


What is the differences between structure and table in data dictionary in abap?

663


What is internal payroll process? : sap abap hr

691


What are the events we use in dialog programming and explain them?

606


Explain the different types of view?

703