‎2008 Feb 27 9:39 AM
hi all,
what is the difference between database view and maintanence view
how to create maintanence view.
by,
Navneeth
‎2008 Feb 27 9:41 AM
hi
hope it willl definitely work for you.
<REMOVED BY MODERATOR>
The followings are different types of views:
- Database View (SE11)
Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
- Help View ( SE54)
Help views are used to output additional information when the online help system is called.
When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field. If this is not the case, the help view is displayed in which the check table of the field is the primary table. Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view.
Go thru this link plzz
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
- Projection View
Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the number of interfaces. This means that only the data that is actually required is exchanged when the database is accessed.
A projection view can draw upon only one table. Selection conditions cannot be specified for projection views.
- Maintenance View ( SE54 )
Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.
Please have a look at below link. It will help you.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
for more detailed info look on:
http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm
&
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&;
1.Go to se11
2. select view radiobutton and give a name
3. Create
4. select type of view you want to create. Such as database view.
5. give short description
6. give a table name such as mara
7. press the pushbutton relationship. here you will find all the tables which are allowed to create view with mara.
8. select one or mane tables.
8 copy
9.save , check and activate.
Edited by: Alvaro Tejada Galindo on Feb 27, 2008 4:45 PM
‎2008 Feb 27 9:43 AM
Hi,
A view is a virtual table, that is, a table that is not actually physically stored, instead being derived from one or more other tables.
More complicated views can be assembled from several base tables, with individual tables being linked using the relational Join operation.
Database views
The view defined in the ABAP Dictionary is reproduced in the underlying database. You can use both ABAP Open SQL and ABAP Native SQL to access such views from ABAP programs, but you can only define them using transparent tables. If you define a database view using only one table, you can make changes to the view. For database views containing several tables, however, only read accesses are allowed.
Maintenance views provide you with a business view of the data. You can change it either with the table maintenance transaction SM30, which allows you to maintain data from the base tables in a view at the same time, or with the customizing transaction. The mechanisms for data maintenance such as screens and processing programs can be created with a special transaction (SE54).
Hope this helps.
Regards,
JLN
‎2008 Feb 27 9:43 AM
Hi,
Database View (SE11)
Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set. In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
Check this link for database view creation.
http://help.sap.com/saphelp_40b/helpdata/en/cf/21ed06446011d189700000e8322d00/content.htm
Maintanence view
Give the table for which you want to create the maintainence view then press display or change then it will display the table with all the fields ie., main screen of the table now goto Utilities in the menu bar press Utilities then press Table Maintence generator then it will take you to a screen where you can create the view for the particular screen.
Regards,
Priyanka.
‎2008 Feb 27 9:46 AM
Hi,
Database views should be created if u 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.)
A maintenance view permits you to maintain the data of an application object together.
The maintenance status determines which accesses to the data of the underlying tables are possible with the maintenance view.
Hope this helps. <REMOVED BY MODERATOR>
Regards,
Ramya
Edited by: Alvaro Tejada Galindo on Feb 27, 2008 4:46 PM
‎2008 Feb 27 9:47 AM
Hi
Database views are implemented with an equivalent view on the database.
Projection views are used to hide fields of a table (only projection).
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.)
Includes in Database Views
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.
Inserts with Database Views
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.
A maintenance view permits you to maintain the data of an application object together.
The maintenance status determines which accesses to the data of the underlying tables are possible with the maintenance view.
Read only: Data can only be read through the view.
Read, change, delete, insert: Data of the tables contained in the view can be
changed, deleted, and inserted through the view.
Read and change: Existing view entries can be changed. However, records
cannot be deleted or inserted.
Read and change (time-dependent views): Only entries whose non-time
dependent part of the key is the same as that of existing entries may be
inserted.
Maintenance View ( SE54 )
You can use a maintenance view to maintain data, which is distributed over several tables, at the same time.
Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.
Creating maintenance View:
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecdf446011d189700000e8322d00/frameset.htm
‎2008 Feb 27 9:48 AM
Database View (SE11)
Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set. In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
Check this link for database view creation.
http://help.sap.com/saphelp_40b/helpdata/en/cf/21ed06446011d189700000e8322d00/content.htm
Maintenance View ( SE54 )
Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.
Please have a look at below link. It will help you.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 27, 2008 4:46 PM
‎2008 Feb 27 9:51 AM
DATABASE VIEW
A database view is defined in the ABAP Dictionary and automatically created on the database during
activation. Accesses to a database view are passed directly to the database from the database interface.
The database software performs the data selection.
If the definition of a database view is changed in the ABAP Dictionary, the view created on the database
must be adjusted to this change. Since a view does not contain any data, this adjustment is made by
deleting the old view definition and creating the view again in the ABAP Dictionary with its new definition.
The maintenance status defines whether you can only read with the view or whether you can also write
with it. If a database view was defined with more than one table, this view must be read only.
The data read with a database view can be buffered. View data is buffered analogously to tables. The
technical settings of a database view control whether the view data may be buffered and how this should
be done. The same settings (buffering types) can be used here as for table buffering. The buffered view
data is invalidated when the data in one of the base tables of the view changes.
You can include entire tables in database views. In this case all the fields of the included table 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
therefore automatically included in the view or deleted from it.
If an append structure is added to a table included in a view, the fields added with the append structure
are automatically included in the view.
To include a table in a view, you must enter the character '*' in field View field in the view maintenance,
the name of the table to be included in the field Table and the character '*' again in the field Field name.
If you do not want to include a field of the included table in the view, proceed as follows:
Enter a '-' in the field View field.
Enter the name of the included table in the field Table.
Enter the name of the field in the field Field name.
MAINTAINENCE VIEW
Data that is distributed on more than one table often forms a logical unit, called an application object.
You should be able to display, change and create the data of such an application object together. Users
usually are not interested in the technical implementation of the application object, such as the
distribution of the data on several tables.
You can maintain complex application objects in a simple way using a maintenance view. The data is
automatically distributed on the underlying database tables.
All the tables used in a maintenance view must be linked with a foreign key. This means that the join
conditions are always derived from the foreign key in the maintenance view. You cannot enter the join
conditions directly as in a database view.
A maintenance interface with which the data of the view can be displayed, changed and created must be
generated from the definition of a maintenance view in the ABAP Dictionary.
When the maintenance interface is created, function modules that distribute the data maintained with the
view on the underlying tables are automatically generated.
The maintenance interface is generated with the Transaction Generate Table View (Transaction SE54)
or from the view maintenance screen with Environment -> Tab.maint.generator.
The set of data that can be selected with a view greatly depends on whether the view implements an
inner join or an outer join.
With an inner join, you only get those records which have an entry in all the tables included in the view.
With an outer join, on the other hand, those records that do not have a corresponding entry in some of
the tables included in the view are also selected.
The hit list found with an inner join can therefore be a subset of the hit list found with an outer join.
Database views implement an inner join. You only get those records which have an entry in all the tables
included in the view.
Maintenance views implement an outer join.
HOW TO CREATE MAINTAINENCE VIEWS??
lets follow a scenario
Create a maintenance view with the name ZPARTNERxx, with
which you can easily maintain new business partners. The business partners are entered in
table SBUSPART. A business partner can be either a flight customer or a travel agency. If it is
a travel agency, there will be a corresponding entry in table STRAVELAG.
The view should also permit you to maintain tables SBUSPART and STRAVELAG at one time.
Include all the necessary fields of the tables in the view.
Generate the maintenance interface. Use the following parameters:
Function group: ZZBC430xx
Authorization group: SUNI
Maintenance type: one-step
Overview screen: 100
Maintain the data of a new travel agency using the enhanced table maintenance (System
Services
Table maintenance Ext. table maint.).
Proceed as follows:
steps
1) In the initial screen of the ABAP Dictionary, mark object type View, enter the object
name ZPARTNERxx and choose Create.
2) A dialog box appears in which you should select the view type. Mark Maintenance view
and choose Choose.
3) Enter a short text in the next screen.
You want to maintain the data in tables SBUSPART and STRAVELAG together in the
maintenance view. If you wanted to enter a new partner directly, you would first have to enter it
in table SBUSPART. Only then could you enter the corresponding data in table STRAVELAG
(because of the existing foreign key check between SBUSPART and STRAVELAG). You
therefore first have to include table SBUSPART in the definition of the maintenance view.
4) Enter table SBUSPART in the field Tables. The key fields of this table are
automatically included in the view as fields.
5) Place the cursor in field Tables on entry SBUSPART. Choose Relationships.
6) A dialog box appears listing all existing foreign key relationships of table SBUSPART
to other tables. Mark the foreign key relationship to table STRAVELAG and choose
Copy.
7) The join conditions are created from the foreign key. The join conditions have the
following form:
SBUSPART-MANDANT = STRAVELAG-MANDT
SBUSPART-BUSPARTNUM = STRAVELAG-AGENCYNUM
😎 You now have to include the fields of both tables in the view. Go to tab page View
fields. Position the cursor on table SBUSPART and choose Table fields. A list of all the
fields of the table appears. Choose Select all and then press Copy.
9) Include all the fields of table STRAVELAG with the exception of fields MANDT and
AGENCYNUM in the view in the same way. These fields are linked to the
corresponding fields of table SBUSPART with the join conditions and therefore should
not appear in the view.
10) Activate the view.
Now generate a maintenance interface for the view.
11) Choose Utilities
Table maintenance generator.
12) Enter authorization group SUNI and function group ZZBC430xx in the next screen.
13) Mark maintenance type one-step. Select number 0100 as maintenance screen number
of the overview screen.
14) Choose Create. The development class of the function group and the generated
maintenance objects are prompted. In both cases choose Local object.
15) Call the extended table maintenance with the given menu path and enter the data of a
new travel agency. With the Data Browser (in the menu environment of the initial
screen of the ABAP Dictionary), verify that the data
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 27, 2008 4:47 PM
‎2008 Feb 27 9:54 AM
Hi,
Maintenance views enable a business-oriented view on data, while at the same time, making it possible to maintain the data involved. Data from several tables can be combined in a maintenance view and maintained collectively with this view. That is, the data is entered with the view and then distributed to the underlying tables by the system.
A standardized table maintenance transaction is provided for this (SM30), permitting you to maintain the data from the base tables of a view at one time. The data can often also be maintained with customizing transactions.
Maintenance mechanisms, like screens and processing programs, must be created from the view definition with a special transaction (SE54). This makes it possible to generate comfortable maintenance user interfaces in a simple manner.
All the tables which are combined in a maintenance view must be linked with foreign keys. Only foreign keys which have certain semantic attributes may be used here
A maintenance view is used to maintain data for an object that is technically distributed on several tables.
Also read the following information:
General information about maintenance views
Brief instructions for creating a maintenance view.
General information about the structure and use of views.
General information on how views are built with join, projection and selection.
You can call the complete documentation about the ABAP Dictionary in every maintenance screen of a Dictionary object with Help ® Application help.
Cheers,
vasavi.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 27, 2008 4:48 PM
‎2008 Feb 27 10:22 AM
Hello Navaneeth,
DATABASE VIEWS : are implemented with an equivalent view on the database.
PROJECTION VIEWS : are used to hide fields of a table (only projection).
HELP VIEWS : can be used as selection method in search helps.
MAINTENANCE VIEWS : permit you to maintain the data distributed on several tables for one application object at one time.