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: 

difference b/w view and innerjoin

former_member1193869
Participant
0 Kudos

hi,

both are used to display data from tables based on particular field , what is the differece?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi naveen,

1. When we write sql query in abap,

we use join (to join two tables).

2. But in view,

view is stored in data dictionary and in the database.

So no special abap code is required to join the tables.

regards,

aimt m.

5 REPLIES 5

Former Member
0 Kudos

The view is persistent.

Rob

Former Member
0 Kudos

A DB view is a dictionary object, accessible by any ABAP.

Each table join has to be coded from the beginning in each ABAP.

A table join allows dynamic selections such as dates, a DB view does not.

Views came in ver 3 of R/3 (1996/7), joins were later (ver 4) so you will often find views being used for historical reasons only.

Performance wise a DB view always seems to be a little slower than coding the join yourself.

ferry_lianto
Active Contributor
0 Kudos

Hi,

Views are the part of data dictonary.

There are 4 types of views: Database View , Projection View , Maintenance View and Help View.

In Database View, we use Inner Join statement and use Outer join for Help Views.

Inner Join is used in coding also to join database tables.

Regards,

Ferry Lianto

Former Member
0 Kudos

Hi,

DB View can be resued in several program. If you want to use it only in one of your program, join is easier....and you can use inner/outer join in you program, based on your needs.

Views might be cached by application servers, joins are always accessed by database directly.

But most times joins (/views) are anyway complex and need a lot of entries -> caching is not useful.

Different approach (especially, when some indices are not used which you would prefer): select first table(s) into an internal table, read the rest 'for all entries' (which again is not cached).

<b> "The data of a view is derived from one or more tables, but not stored physically". It is accessed at runtime from these underlying tables.</b>

<b>Reward if useful</b>

Regards,

Swati Garg

Former Member
0 Kudos

Hi naveen,

1. When we write sql query in abap,

we use join (to join two tables).

2. But in view,

view is stored in data dictionary and in the database.

So no special abap code is required to join the tables.

regards,

aimt m.