06-17-2009 5:15 PM
Hello,
I need to select data from multiple tables. I need to choose between 2 options.
1) create a database view and use this view for select.
2) write an inner join in abap prorgam.
In which cases we should create a view and in which cases we should use a inner join?
What are the factors which decide these?
Pls advice.
Thanks,
Rupali.
06-17-2009 5:20 PM
Hi,
Both are same..
But if you use regulary and used view in Multiple programs then create view..
If inner join in abap prorgam between two or more table used in less Programs and do not want to
create View (Means not to create transport request) then go for JOin in Program.
Prabhudas
06-17-2009 5:20 PM
Hi,
Both are same..
But if you use regulary and used view in Multiple programs then create view..
If inner join in abap prorgam between two or more table used in less Programs and do not want to
create View (Means not to create transport request) then go for JOin in Program.
Prabhudas
06-17-2009 5:47 PM
Hi Rupali,
besides REUSE as pointed out by Prabhudas:
Views can be buffered in the SAP table buffers.
Execution times on the database are the same for views and joins.
Kind regards,
Hermann
06-17-2009 7:11 PM
To use a view or a join depends on how frequently are you going to use the program and how big the tables are. Views are data dictionary objects and hence will occupy some memory. So if the program is not used that frequently or if the view created may not be useful for other programs, then better use inner join.
06-17-2009 7:25 PM