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

Can i create Tcode for Database view?

Former Member
0 Likes
3,321

Hi,

I could not find the way to create Tcode for database view, even i searched in SDN also but could not find, can any one tell me how can i do it.

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
2,004

Database view is used by programs to query by OPEN SQL underlying tables. It is not possible to create maintenance view for it (unless it contians just one table), therefore you can't assign tcode to such view. This is only allowed for maintenance views .

Regards

Marcin

11 REPLIES 11
Read only

Former Member
0 Likes
2,004

Hi Jaya

You can create tcode using se93 with paramters in transaction SM30 with skip initial screen

and in parameters you give VIEWNAME = 'your table'

UPDATE = X

Best Regards

Yossi Rozenberg

Read only

0 Likes
2,004

This is only if we maintain at SM30, but i am not maintaining SM30, i just created dbview for standard table.

Read only

0 Likes
2,004

sorry,didn't read your question properly )

Read only

MarcinPciak
Active Contributor
0 Likes
2,005

Database view is used by programs to query by OPEN SQL underlying tables. It is not possible to create maintenance view for it (unless it contians just one table), therefore you can't assign tcode to such view. This is only allowed for maintenance views .

Regards

Marcin

Read only

0 Likes
2,004

Thanks , Is it possible to have maintenance view incase we used single table in the dbview?

Read only

0 Likes
2,004

Hi

U can create as many view tables as you need for a certain table.

Just as some guys said before, the database view can be used in program only, if you needs to see or to update the data by trx u need to create a maintenance program (SM30) for the table or maintenace view based on that table.

Max

Read only

0 Likes
2,004

Yes, generally you can insert data to db view (if there is only one table). But the best is to use DB VIEW for querying in programs and mainteance views for changing/presenitng data via sm30 or other tcode.

Refer [Maintenance views|http://help.sap.com/saphelp_nw2004s/helpdata/EN/cf/21ecdf446011d189700000e8322d00/frameset.htm]. So first determine what you need the view for, then create appropriate one and use it accoridng to your needs.

Regards

Marcin

Read only

0 Likes
2,004

I dont think table maintenance is possible for DBviews, because dbviews meant for just display purpose only. And when i tried to create maintenance view, i found that it was grayed out in the menu of the dbview.

Read only

0 Likes
2,004

No, for DB view you don't create maintenance view, you create maintenance view for underlying table.

So if you want to query the table use DB view, if you want to change it then use maintenance view.

Read only

0 Likes
2,004

Hi

I believe u're confusing MAINTENANCE VIEW (it's just a kind of VIEW) with MAINTENACE VIEW program (it's the program generated to maintence the table by SM30).

So it's not possible to create a maintenance view for DBView, but it's possible to do it for a Maintenance View

Probably u can say us why u need to create a View, perhaps we can understand which kind of view you need

Max

Read only

0 Likes
2,004

Hi Jaya,

A Maintenance View helps you to maintain data that is distributed across different or multiple database tables. So, it becomes an easy way to update data and without any programing effort. You can create a Maintenance View across multiple tables with one Table as Primary Table and others as Secondary Tables. But the tables must be related with each other with a Foreign Key Relationship.

Have a look at the following link which tell you about the procedure of creating the Maintenance Views :

http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21ed2d446011d189700000e8322d00/frameset.htm

Hope this helps.

Thanks,

Samantak.