‎2007 May 02 4:46 AM
Hi PPL,
Could you please tell me whether we can update database records using views.
Thanks and regards,
Ashok
‎2007 May 02 9:07 AM
Hai,
You can do like this:
tables:
view_name.
Data:
begin of itab occurs 0,
include structure view_name.
Data:
end of itab.
select *
from view_name
into itab.
loop at itab.
wa-f1 = itab-f1.
...
...
db_tab = wa.
insert db_tab.
endloop.
Regds,
Rama chary.Pammi
‎2007 May 02 4:52 AM
Hi,
Yes we can update the database tables using Views.
Rgds,
P.Naganajna Reddy
‎2007 May 02 5:05 AM
If the database view only contains a single table, the maintenance status can be used to determine if data records can also be inserted with the view. If the database view contains more than one table, you can only read the data.
<b>Only read access is permitted for database views that are defined through several tables.</b>
Hope this will give u an idea.Check out this link..
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecab446011d189700000e8322d00/frameset.htm
Please reward graciously if found helpful.
‎2007 May 02 6:21 AM
Hi ,
You can only edit/insert the database records through views only if the view does not have any join ( ie., a single table or a join on a single table) . If you have multiple tables on the view then you will have only read access.
Hope this helps
Sunil.M
‎2007 May 02 8:49 AM
hi,
yaa we can update database records using views but the type of view must be maintenace
‎2007 May 02 9:07 AM
Hai,
You can do like this:
tables:
view_name.
Data:
begin of itab occurs 0,
include structure view_name.
Data:
end of itab.
select *
from view_name
into itab.
loop at itab.
wa-f1 = itab-f1.
...
...
db_tab = wa.
insert db_tab.
endloop.
Regds,
Rama chary.Pammi
‎2007 May 02 12:36 PM
yes you can update the containt of database table using views
i.e : By using <b>MAINTAINANCE VIEW</b>.
Regds,
subodh
Message was edited by:
subodh gholkar
‎2007 May 02 12:40 PM
Hi,
IF database view contains only one table or tables with inner joins only can be used for data additions. view wiith outer joins/other joins are not allowed.
Jogdand M B