What is the difference between macro and subroutine?
Answer Posted / nandy2
1. In a program it is often necessary to repeat the block of code many times.In this situation a macro facility may be useful . Macro instruction are singal line abbreviations for a block of instruction.
We can say that the function which is used in c,c++ and java is macro.
On the other hand subroutine is called whenever necessary i.e, the control of execution is transferred to the subroutine appears only once in the complete progaram.
We can say that the Header files attached in c and c++ and libraries are are subroutine.
2.Macro not utilize the service of stack.But the subroutine utilize the service of stack.
3. Subroutine requires less memory space for execution than that using macro.
4.Macro requires less time for execution than that using subroutine.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What was the requirement of IDoc in your project? How it was working?
What are the parameters used in each function?
How can you find the field/data underlying a transaction?
What happens if only one of the commands set screen and leave screen is used without using the other?
Mention the various databases integrities?
What are the organizational related infotypes? : abap hr
Where are you used type casting?
Where do you code the hide statement?
How will you link form with the event driven in sap scripts?
What is the disadvantage of a call by reference? : abap modularization
What does a lock object involve?
Hi, I have a requirement for locking the fax field in user master records. As you know user can edit the details using the System>profile>own data (SU3), it is causing some security threat to our model. What i want is users should not be able to change the fax field under communications when they get into su3.I have heard of user Exist functionality but don't know how to implement it. Can you suggest something, it will be greatly appreciated.
Why cant we use Normal function module for data transfer?
What is logo in sap script?
What is pnp-sw-found ? : abap hr