‎2006 Nov 15 10:58 AM
Hello Friends,
I want to insert some data in the view, do you think it will work like this..
INSERT INTO (p_view_name) VALUES p_it_tab.
COMMIT WORK.
Many thanks in advance,
Kind regards,
‎2006 Nov 15 11:00 AM
See the excerpt from the sap documentation:
<i><b>"..Data can only be inserted using a view if the view refers to a single table and was defined in the ABAP Dictionary with the maintenance status "No restriction". "</b></i>
Regards,
Ravi Kanth
‎2006 Nov 15 11:01 AM
Hi,
For you to insert in to a view the maintanance status of the view should be set to
READ CHANGE DELETE and INSERT.
ANd you can insert into a view if its a maintance view.
You can also insert into a DATABASE view but this view should be only on one TABLE.
Then syntax for insertion should be the same as it is for tansperant tables.
Regards,
Sesh
‎2006 Nov 15 11:05 AM
Hi Ravi,
Yaar, the problem is I have view with around two tables, and I need to insert some records in this view ? say from file, insert into view ?
View are maintainable,, so how I can insert file into view ?
Regards,
‎2006 Nov 15 11:03 AM
Hi,
It depends on privilege of owner table,
Check this link.
http://dev.mysql.com/doc/maxdb/en/c7/12ffda06ab11d3a97d00a0c9449261/content.htm
Insert will work if privileged
Feel free to revert back.
--Ragu
‎2006 Nov 15 11:18 AM
Hello Ragu,
Thanks for your input,
So do you have any example which puts data in view or so ?
Or in short , as I said, view are there, how I can check the insert privileged `?
Regards,
‎2006 Nov 15 2:38 PM
INSERT/UPDATE/DELETE Privilege for Owners of View Tables
Since view tables only represent views on the data available in base tables, there are certain aspects that should be noted when privileges are allocated for view tables.
INSERT privilege for the owner of the view table
The owner of a view table has the INSERT privilege, which means that, if the following conditions are satisfied, he or she can specify the view table in the INSERT statement as the table in which data is to be inserted:
· The view table is an updateable view table.
· The owner of the view table has the INSERT privilege for all tables in the FROM clause of the CREATE VIEW statement.
· The selected columns of the CREATE VIEW statement consist only of table columns table_columns or column names column_name, but not of expressions with more than one column name.
· The CREATE VIEW statement contains every mandatory column from all tables of the FROM clause as the selected column.
UPDATE privilege for the owner of the view table
The owner of the view table has the UPDATE privilege for a column in the view table, which means that, if the following conditions are satisfied, he or she can specify the column in an UPDATE statement as the column to be updated:
· The view table is an updateable view table.
· The owner of the view table has the UPDATE privilege for the table columns table_columns or the column name column_name that defines the column.
· The column is defined by the specification of table columns or by means of a column name, but not by an expression with more than one column name.
DELETE privilege for the owner of the view table
The owner of the view table has the DELETE privilege for the view table, which means that, if the following conditions are satisfied, he or she can specify the view table in the DELETE statement as the table from which entries are to be deleted:
· The view table is an updateable view table.
· The owner of the view table has the DELETE privilege for all tables in the FROM clause of the CREATE VIEW statement
plz review the points...............