2007 Jul 11 7:10 AM
2007 Jul 11 8:32 AM
2007 Jul 11 7:12 AM
Hi,
The use is the VIEWS are created in the underlying database table and you need not use a JOIN and ask for a dynamic view creation.
Also you can have buffering for the VIEWS.
With the help of different types of views you can maintain the data using table maintenance generator you can insert into multiple database tables at once.
Regards,
Sesh
2007 Jul 11 7:14 AM
The followings are different types of views:
- Database View (SE11)
Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
- Help View ( SE54)
Help views are used to output additional information when the online help system is called.
When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field. If this is not the case, the help view is displayed in which the check table of the field is the primary table. Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view.
- Projection View
Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the number of interfaces. This means that only the data that is actually required is exchanged when the database is accessed.
A projection view can draw upon only one table. Selection conditions cannot be specified for projection views.
- Maintenance View ( SE54 )
Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.
Please have a look at below link. It will help you.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
for more detailed info look on:
http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm
&
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&;
2007 Jul 11 7:26 AM
Use of Views instead of base tables
Not recommended
Select * from zcntry where cntry like IN%.
Select single * from zflight where cntry = zcntry-cntry and airln = LF.
Endselect.
Recommended
Select * from zcnfl where cntry like IN% and airln = LF.
Endselect.
reward points if it is usefull.....
Girish
2007 Jul 11 8:14 AM
Hi
Instead of writing Select statements to multiple tables if we have all tables data together in a View we will write a single select to that view and fetch the complete data into a single Internal table and use
see for example a view called
VIAUFKS
it has got 4 tables
AFIH
AUFK
AFKO
ILOA
so to fetch data from those 4 tables we need to write 4 select statments or some joins
instead of that we can write a single select to the above VIEW and fetch the data in a straight way and use.
Hope you understood it.
<b>Reward points for useful Answers</b>
Regards
Anji
2007 Jul 11 8:32 AM