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

VIEWS

Former Member
0 Likes
728

Hi PPL,

Could you please tell me whether we can update database records using views.

Thanks and regards,

Ashok

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
708

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

7 REPLIES 7
Read only

Former Member
0 Likes
708

Hi,

Yes we can update the database tables using Views.

Rgds,

P.Naganajna Reddy

Read only

Former Member
0 Likes
708

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.

Read only

Former Member
0 Likes
708

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

Read only

Former Member
0 Likes
708

hi,

yaa we can update database records using views but the type of view must be maintenace

Read only

Former Member
0 Likes
709

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

Read only

Former Member
0 Likes
708

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

Read only

Former Member
0 Likes
708

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