Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

performance difference

Former Member
0 Likes
605

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....?

4 REPLIES 4
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
558

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

Read only

0 Likes
558

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

Read only

0 Likes
558

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

Read only

gopi_narendra
Active Contributor
0 Likes
558

In addition to what Sesh has told...

We can not debug a Macro , where as we can debug a Subroutine.

Regards

Gopi