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: 

Views, Joins and For All Entries...

Former Member
0 Kudos

Hi Everyone

I understand that generally using the 'FOR ALL ENTRIES' option is more efficient than using JOINS within my code. However, even though they use inner joins, are Views inherently more efficient than using joins used in a program. If they are, are they also more efficient than using 'FOR ALL ENTRIES' too? My specific example involves joining VBAK and VBAP. I figure I have 3 options:

1. Write a selec statement joining the two tables on VBELN

2. Use the pre-defined view VIVEDA that does the same

3. Write a select with just VBAK into an int. table and then write another select using this table with a FOR ALL ENTRIES.

Which is the best option?

Kind regards

Andy

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

Hi,

i will suggest option 3, that will be faster.use for all entries. since view VIVEDA is also join.

Regards

vijay

4 REPLIES 4

Former Member
0 Kudos

In this case I would say that SELECTIING FROM THE VIEW should be efficient, as internally the view will be created efficiently.

Regards,

Ravi

Note : Please mark the helpful answers

former_member188685
Active Contributor
0 Kudos

Hi,

i will suggest option 3, that will be faster.use for all entries. since view VIVEDA is also join.

Regards

vijay

Former Member
0 Kudos

Hi Andrew,

Best option is: using the view VIVEDA.

As it is built upon / doing the same task of getting data from VBAK and VBAP.

Regards,

Raj

0 Kudos

Hi,

Use the option 3.

If there r more than 10000 records SELECT FOR ALL ENTRIES is used. Performance wise SELECT FOR ALL ENTRIES is better to use than a view.

Regards,

Amit Mishra