Application Development 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: 

Diff between database view and inner join

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

former_member192616
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Thnks!