‎2007 Jul 23 9:53 AM
hi all,
1. is there any performance difference b/w macro and perform(abap routine)..which is better?
2. also b/w view and inner join....?
‎2007 Jul 23 9:56 AM
Hi,
MACRO Is just grouing of the CODE and its not syntax checked. Also you cannot pass paramters to a macro, though you can pass using the place holders & there is a limit on the number of them.
Where as PERFORM Is fully syntax checked and you can pass as many parameters as you want, you can pass by value or pass by reference.
PERFORM Is more useful.
MACROS should be used only when you want similar code repetetivly.
PERFORM should be used for modularization of the code.
VIEW is also a JOIN, but only VIEW of type Database view used INNER JOIN, Maintenance view , help view are OUTER JOINS.
VIEW is more helpful as there will be an underlying view in the database.
Regards,
Sesh
‎2007 Jul 23 10:05 AM
hi sesh,
thanks for responce
can i get better performance..by replacing a inner join by a view in abap program.
coz the same inner join is used for 8 times in the program, with different where clauses
‎2007 Jul 23 10:08 AM
Hi Guest,
If a Database View already exist, use it instead of the inner joi statements.
If it doesn't, do not create the Database View. It makes no sesne to create a database view just because you need it in a program or 2.
And, if you have the same inner join being repeated for 8 times, for different where condition, I would rather sugget to select the data in only one inner-join select(With a where condition that would get al the records). Then you can read the internal table using READ or LOOP statements.
Regards,
Ravi
‎2007 Jul 23 10:03 AM
In addition to what Sesh has told...
We can not debug a Macro , where as we can debug a Subroutine.
Regards
Gopi