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

Database view

Former Member
0 Likes
1,532

HI ALL,

what is database view,

Is it possible to add fields to the database view, my problem is some one created a data base view by using the tables QMIH,QMEL,ILOH, now i have to add a field,pls tell me how can i do it.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,196

Hi

<b>Importance/Use of Views</b>

Data for an application object is often distributed on several database tables. Database systems therefore provide you with a way of defining application-specific views on the data contained in several tables. These are called views.

Data from several tables can be combined in a meaningful way using a view (join). You can also hide information that is of no interest to you (projection) or only display those data records that satisfy certain conditions (selection).

A view is a logical view on one or more tables, that is, a view is not actually physically stored, instead being derived from one or more other tables.

The data of a view can be displayed exactly like the data of a table in the extended table maintenance.

<b>Database views</b> are implemented with an equivalent view on the database.

Database views should be created if want to select logically connected data from different tables simultaneously.

Database views implement an inner join.

Application programs can access the data of a database view using the database interface. (Just as we write select queries on database tables, we can write them for views as well.)

<b>Includes in Database Views </b>

An entire table can be included in a database view. In this case all the fields of the included table will become fields of the view (whereby you can explicitly exclude certain fields).

To include one of the tables in the view, enter character * in field View field, the name of the table to be included in field Table and character * again in field Field name on the View fields tab page of the maintenance screen of the view.

You can also exclude individual fields of an included table. If you do not want to include a field of the included table in the view, enter - in field View field, the name of the included table in field Table and the name of the field to be excluded in field Field name.

<b>Inserts with Database Views </b>

If a database view contains only one single table, data can be inserted in this table with the view .

You have the following options for the contents of the table fields not contained in the view:

If the field is defined on the database with NOT NULL as initial value, the field is filled with the corresponding initial value.

If the field is defined on the database as NOT NULL without initial value, an insert is not possible. This results in a database error.

If the field is not defined on the database as NOT NULL, there will be a NULL value in this field.

<b>Append Views </b>

Append views are used for enhancements of database views of the SAP standard.

With an append view, fields of the base tables of the view can be included in the view without modifications. This is analogous to enhancing a table with an append structure.

An append view is assigned to exactly one database view. More than one append view can be created for a database view.

Append views are used for enhancements of database views of the SAP standard.

With an append view, fields of the base tables of the view can be included in the view without modifications. This is analogous to enhancing a table with an append structure.

An append view is assigned to exactly one database view. More than one append view can be created for a database view.

The append technique described can only be used for database views. With an append view, only new fields from the base tables contained in the view can be inserted in the view. You cannot insert new tables in the view or modify the join conditions or selection conditions of the view.

<b>Reward if usefull</b>

9 REPLIES 9
Read only

Former Member
0 Likes
1,196

Hi,

Views are basically, collection of fields from diffrent databse tables.You can define extra selections for fields in a selection view at runtime using dynamic selections. The extra selections are sent to the database and help to minimize the number of database accesses. This works as long as the database tables in the selection include of the logical database are defined for dynamic selections, and that the database program is programmed accordingly.

You can go to SE11, type the name of the view and add the additional field present in any of the tables QMIH,QMEL,ILOH and activate the view. Once activated the view will reflect the new field added and you can use this for selection purposes.

Regards,

JLN

Read only

0 Likes
1,196

Hi Narayana,

Well, my problem is i have to take a field in my own which not in any of i mentioned tables.

Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,196

go inside the view in change mode and add the field

Read only

former_member404244
Active Contributor
0 Likes
1,196

hi,

An entire table can be included in a database view. In this case all the fields of the included table will become fields of the view (whereby you can explicitly exclude certain fields). If new fields are included in the table or existing fields are deleted, the view is automatically adjusted to this change. A new or deleted field is thus included in the view or deleted from the view in this case.

To include one of the tables in the view, enter character * in field View field, the name of the table to be included in field Table and character * again in field Field name on the View fields tab page of the maintenance screen of the view.

You can also exclude individual fields of an included table. If you do not want to include a field of the included table in the view, enter - in field View field, the name of the included table in field Table and the name of the field to be excluded in field Field name.

check the belwo link..

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/content.htm

reward points if u find useful..

Regards,

Nagaraj

Read only

0 Likes
1,196

Hi Nagraj,

VIQMEL is the standard database view, how can add a new field for example zzmelnr.

Read only

0 Likes
1,196

Hi,

try to add the zfield in any one of the folowing tables QMIH,QMEL,ILOH by append structure method and then add the field in ur view...

select GOTO->Append View.

Enter ur append structure name. Now ur view fields will be in editable mode.

enter the append name,table & field .

Regards,

nagaraj

Read only

Former Member
0 Likes
1,197

Hi

<b>Importance/Use of Views</b>

Data for an application object is often distributed on several database tables. Database systems therefore provide you with a way of defining application-specific views on the data contained in several tables. These are called views.

Data from several tables can be combined in a meaningful way using a view (join). You can also hide information that is of no interest to you (projection) or only display those data records that satisfy certain conditions (selection).

A view is a logical view on one or more tables, that is, a view is not actually physically stored, instead being derived from one or more other tables.

The data of a view can be displayed exactly like the data of a table in the extended table maintenance.

<b>Database views</b> are implemented with an equivalent view on the database.

Database views should be created if want to select logically connected data from different tables simultaneously.

Database views implement an inner join.

Application programs can access the data of a database view using the database interface. (Just as we write select queries on database tables, we can write them for views as well.)

<b>Includes in Database Views </b>

An entire table can be included in a database view. In this case all the fields of the included table will become fields of the view (whereby you can explicitly exclude certain fields).

To include one of the tables in the view, enter character * in field View field, the name of the table to be included in field Table and character * again in field Field name on the View fields tab page of the maintenance screen of the view.

You can also exclude individual fields of an included table. If you do not want to include a field of the included table in the view, enter - in field View field, the name of the included table in field Table and the name of the field to be excluded in field Field name.

<b>Inserts with Database Views </b>

If a database view contains only one single table, data can be inserted in this table with the view .

You have the following options for the contents of the table fields not contained in the view:

If the field is defined on the database with NOT NULL as initial value, the field is filled with the corresponding initial value.

If the field is defined on the database as NOT NULL without initial value, an insert is not possible. This results in a database error.

If the field is not defined on the database as NOT NULL, there will be a NULL value in this field.

<b>Append Views </b>

Append views are used for enhancements of database views of the SAP standard.

With an append view, fields of the base tables of the view can be included in the view without modifications. This is analogous to enhancing a table with an append structure.

An append view is assigned to exactly one database view. More than one append view can be created for a database view.

Append views are used for enhancements of database views of the SAP standard.

With an append view, fields of the base tables of the view can be included in the view without modifications. This is analogous to enhancing a table with an append structure.

An append view is assigned to exactly one database view. More than one append view can be created for a database view.

The append technique described can only be used for database views. With an append view, only new fields from the base tables contained in the view can be inserted in the view. You cannot insert new tables in the view or modify the join conditions or selection conditions of the view.

<b>Reward if usefull</b>

Read only

varma_narayana
Active Contributor
0 Likes
1,196

Hi Srinivas..

Yes it is possible to add new fields to a Database view using APPEND VIEW.

Open the View in SE11.

Menu path: GOTO -> APPEND VIEW.

Add the Fields u need and Activate it.

<b>REWARD IF HELPFUL.</b>

Read only

0 Likes
1,196

Hi,

can u explian me briefly