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

Explain the difference between open_form and close_form?

722


Describe data classes? : abap hr

822


What is the difference between RETURNING and CHANGING parameters for a method?

1304


what is the process of creating quotation using BAPIs.

1794


What are the events in ABAP language?

802


How do you delete duplicate records from internal table?

951


What is alv programming in abap?

834


Work most on which module: name a few tables?

767


Different between Interface and Abstract classes?

1318


How are BAPI different from normal function modules?

1914


What are the different kinds of lock modes?

782


What is the definition of modification in an sap system and how do they impact an upgrade?

760


Which bdc you prefer? : abap bdc

942


How can we send data to external programs?

867


Differentiate between static and dynamic step loops?

769