‎2007 Jul 12 4:12 PM
hi,
both are used to display data from tables based on particular field , what is the differece?
‎2007 Jul 12 4:22 PM
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.
‎2007 Jul 12 4:17 PM
‎2007 Jul 12 4:19 PM
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.
‎2007 Jul 12 4:19 PM
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
‎2007 Jul 12 4:19 PM
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
‎2007 Jul 12 4:22 PM
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.