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

join

Former Member
0 Likes
600

what is the difference between view and join

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
574

Hi,

From "Design, Implementation, and Analysis of Performance-Optimized Programs" on service.sap.com/performance

"With group requests from different tables, use JOINs or VIEWs. The JOIN is coded directly in ABAP. You can easily adapt it to the requirements of a specific application. The VIEW, however, is specified in the DDIC, which enforces definition uniformity throughout the program. VIEWs, like any table definition, may be used in multiple areas of the program, thus reducing the number of different statements in the statement cache.

Don't use JOINs or VIEWs over tables that are buffered with their technical settings. It is possible, in principle, to buffer a VIEW, but only in rare cases when you can buffer all concerned tables as well. Buffering a VIEW means not only less performance improvement, but also a significant rise in memory allocation and overhead during buffer synchronization. If you mix buffered and unbuffered tables in one access rather than reading both table types, you always lose performance because the database interface will not use the existing buffers.

In the SAP environment, there is a small but significant difference between JOIN and VIEW: In client dependent tables, every table in the JOIN MANDT = SY-MANDT is generated as part of the WHERE clause.

For VIEW, however, this WHERE clause is generated only for the table that provides MANDT in the VIEW projection list. Even though MANDT from each of the tables can join together the VIEW tables, significant processing differences in these tables can occur within VIEW if MANDT also appears in the indexes of the other tables that are included. These differences result from the fact that database optimizers only interpret the WHERE clause of VIEW to determine the first access. Therefore, you should take MANDT from the field list of the VIEW from the table providing the most selective first access. If the secondary tables include MANDT in their indexes and a selective primary table cannot be determined, then you should not use a VIEW.

Regards,

Priyanka.

5 REPLIES 5
Read only

Former Member
0 Likes
574

hi,

There are 4 types views are avilable in SAP.

Database View - To club more than one table

Projection View - To hide fields in one table

Maintanance View - To maintain database records in table

Help View - To provide help for a fields (Same functionality as Search help. This is outdated)

View are improves perfromance in the following aspects

1. If you want to use more than two table in 'JOIN' condition better to use Views . It will improves performance of a program

2. If you want to use mutiple FOR ALL ENTRIES clause, better to club all SELECT statement in a view.

note:

1.Views does not contain data in it. It fetches data from the database only depending on the condition ...

2.Views are part of data dictionary. They are a window to view the data in database

3.views can be used to give security to data. users can be allowed to view only basic data only

Regards

Reshma

Read only

Former Member
0 Likes
575

Hi,

From "Design, Implementation, and Analysis of Performance-Optimized Programs" on service.sap.com/performance

"With group requests from different tables, use JOINs or VIEWs. The JOIN is coded directly in ABAP. You can easily adapt it to the requirements of a specific application. The VIEW, however, is specified in the DDIC, which enforces definition uniformity throughout the program. VIEWs, like any table definition, may be used in multiple areas of the program, thus reducing the number of different statements in the statement cache.

Don't use JOINs or VIEWs over tables that are buffered with their technical settings. It is possible, in principle, to buffer a VIEW, but only in rare cases when you can buffer all concerned tables as well. Buffering a VIEW means not only less performance improvement, but also a significant rise in memory allocation and overhead during buffer synchronization. If you mix buffered and unbuffered tables in one access rather than reading both table types, you always lose performance because the database interface will not use the existing buffers.

In the SAP environment, there is a small but significant difference between JOIN and VIEW: In client dependent tables, every table in the JOIN MANDT = SY-MANDT is generated as part of the WHERE clause.

For VIEW, however, this WHERE clause is generated only for the table that provides MANDT in the VIEW projection list. Even though MANDT from each of the tables can join together the VIEW tables, significant processing differences in these tables can occur within VIEW if MANDT also appears in the indexes of the other tables that are included. These differences result from the fact that database optimizers only interpret the WHERE clause of VIEW to determine the first access. Therefore, you should take MANDT from the field list of the VIEW from the table providing the most selective first access. If the secondary tables include MANDT in their indexes and a selective primary table cannot be determined, then you should not use a VIEW.

Regards,

Priyanka.

Read only

Former Member
0 Likes
574

hi,

both have the same role the diff is that

<b>views are the part of data dictonary</b>

ravi

Read only

Former Member
0 Likes
574

Hi,

view is nothing but a reflection of database table. every operation on a table effects its view. but join is a different scenrio where a table is joined with itself or with other table.any operation on join table doesn't effect the base table where the base table is effected in case of views.

regards

vivek

Read only

Former Member
0 Likes
574

Hi,

There are 4 types of views.

Data base view , Projection view , Maintenance view and Help View.

In Database view , we use Inner join .

Help views use Outer join .

Joins are used in coding also to join Data base Tables.

Views give better Performance compared to inner & Outer joins in coding.

Reward if useful.

Thanks,

USR