Application Development 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: 

views

Former Member
0 Kudos
157

what r different types of views and what is their use?

1 ACCEPTED SOLUTION

former_member150733
Contributor
0 Kudos
75

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.

- 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.

7 REPLIES 7

Former Member
0 Kudos
75

There are 4 types.

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.

- 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&;

former_member150733
Contributor
0 Kudos
76

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.

- 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.

Former Member
0 Kudos
75

<b>What is the Different Types and Usage of Views</b>

<b>This is often asked in an interview about the types of views:</b>

<b>The followings are different types of views:</b>

<b>- Database View (SE11)</b>

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.

<b>- Help View ( SE54)</b>

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.

- <b>Projection View</b>

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.

<b>- Maintenance View ( SE54 )</b>

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.

reward points if it is usefull .....

Girish

Former Member
0 Kudos
75

hi ,

There are 4 types views are avilable in SAP.

Database View - To club more than one table

Projection View - To hide fields in one table

Maintanance View - To maintain database records in table

Help View - To provide help for a fields (Same functionality as Search help. This is outdated)

View are improves perfromance in the following aspects

1. If you want to use more than two table in 'JOIN' condition better to use Views . It will improves performance of a program

2. If you want to use mutiple FOR ALL ENTRIES clause, better to club all SELECT statement in a view.

regards

reward points for the usefull answers

reena

Former Member
0 Kudos
75

Hi,

Views

Data about an application object is often distributed on several tables. By defining a view, you can define an application-dependent view

that combines this data. The structure of such a view is defined by specifying the tables and fields used in the view. Fields that are not

required can be hidden, thereby minimizing interfaces. A view can be used in ABAP programs for data selection.

The data of a view is derived from one or more tables, but not stored physically. The simplest form of deriving data is to mask out one or

more fields from a base table (projection) or to include only certain entries of a base table in the view (selection). More complicated views

can comprise several base tables, the individual tables being linked with a relational join operation. See also Join, Projection and Selection.

The base tables of the view must be selected in the first step of a view definition. In the second step, these tables must be linked by

defining the join conditions. It is also possible to use the join condition from a foreign key defined between the tables (see Foreign Key

Relationship and Join Condition). In the third step, you must select the fields of the base tables to be used in the view. Selection conditions

that restrict the records in the view can be formulated in the fourth step.

Four different view types are supported. These differ in the way in which the view is implemented and in the methods permitted for

accessing the view data.

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.

Database views implement an inner join. The other view types implement an outer join (see Inner and Outer Join).

The join conditions for database views can be formulated using equality relationships between any base fields. The join conditions for the

other view types must be obtained from existing foreign keys. Tables therefore can only be combined in a maintenance view or help view if

they are linked to one another with foreign keys.

The maintenance status defines whether you can only read data with the view or whether you can also insert and change data with it.

Creating a Database View

Procedure

Enter an explanatory short text in the field Short text.

You can for example find the view at a later time using this short text.

Define the tables to be included in the view in the Tables field of the Tables/Join conditions tab page.

Keep in mind that you can only include transparent tables in a database view.

Link the tables with join conditions.

If there are suitable foreign keys between the tables, you should copy the join conditions from these foreign keys (see Foreign Key

Relationships and Join Conditions).

Place the cursor on a table name and choose Relationships. All foreign keys to other tables defined for this table are displayed. Select the

foreign keys and choose Copy. The join condition is now derived from the definitions in the foreign key.

If you only want to see the foreign key relationship existing between two tables, you must first select these two tables (click on the first

column of the input area Tables) and then choose Relationships.

On the View fields tab page, select the fields that you want to copy to the view.

Choose Table fields. All the tables contained in the view are displayed in a dialog box. Select a table. All the fields contained in this table are

displayed. You can copy fields by selecting them in the first column and choosing Copy.

You can also include an entire table in the view (see Includes in Database Views).

On the Selection conditions tab page, you can (optionally) formulate restrictions for the data records to be displayed with the view (see

Maintaining Selection Conditions for Views).

The selection conditions define the data records that can be selected with the view.

With Goto ® Technical settings, you can (optionally) maintain the technical settings of the database view.

You can define whether and how the database view should be buffered here. Proceed as for the technical settings of a table (see

Maintaining Technical Settings). Note that only the settings for buffering can be maintained for database views.

On the Maintenance status tab page, select the maintenance status of the database view.

If the view contains more than one table, the maintenance status read only cannot be altered.

Save your entries. You are asked to assign the view a development class.

You can change this development class later with Goto ® Object directory entry.

Choose .

Result

When a database view is activated, the corresponding view is also automatically created in the database if the base tables of the view

were already created there.

At activation, a log is written; it can be displayed with Utilities ® Activation log. If errors or warnings occurring when the view was activated,

they are displayed directly in the activation log.

If the base tables are not yet created in the database, this is recorded in the activation log. The view is nevertheless activated in the ABAP

Dictionary. In this case you can create the relevant view on the database later with the database utility.

Other Options

Create documentation: You can create information about using the view with Goto ® Documentation. This documentation is also output for

example when you print the view.

Change data element of a view field: Select the Mod (Modify) column in the View fields tab page. The Data element field is now ready for

input. You can enter a data element that refers to the same domain as the data element of the assigned table field here. Cancel the Mod

flag if you want to use the data element of the assigned table field again.

Display view data: With Utilities ® Contents you can determine which data can be selected with the view.

Display create statement: With Extras ® CREATE statement you can display how the view was created in the database. The statement that

was executed when the version of the view currently being edited was created in the database is displayed.

Check the definition of the view in the database: With Utilities ® Database object ® Check you can determine whether the definition of the

view in the database is consistent with the active version of the view. With Utilities ® Database object ® Display you can display the

definition of the view in the database.

Check the runtime object of the view: With Utilities ® Runtime object ® Check you can determine whether the definition of the view in the

ABAP Dictionary maintenance screen is identical to the specifications in the runtime object of the view. With Utilities ® Runtime object ®

Display you can display the runtime object of the view.

Creating Maintenance Views

Procedure

Enter an explanatory short text in the field Short text.

You can for example find the view at a later time using this short text.

Enter the primary table of the view under Tables in the Tables/Join conditions tab page.

Only those tables that are linked with the primary table (indirectly) with a foreign key can be included in the maintenance view.

If required, include more tables in the view. In a maintenance view you can only insert tables that are linked to one another with foreign

keys.

Place the cursor on the primary table and choose Relationships. All existing foreign key relationships of the primary table are displayed.

Select the required foreign key and choose Copy. The secondary table used in such a foreign key is included in the view. The join conditions

derived from the foreign keys (see Foreign Key Relationship and Join Condition) are displayed.

You can also insert tables that are linked by foreign key with one of the secondary tables that was already inserted. To do this, place the

cursor on the secondary table and choose Relationships. Then proceed as described above.

For maintenance and help views, there are certain restrictions on the foreign keys with which the tables can be included in the view (see

Restrictions for Maintenance and Help Views). The foreign keys violating these conditions are displayed at the end of the list under the

header Relationships with unsuitable cardinality.

On the View fields tab page, select the fields that you want to copy to the view.

Choose Table fields. All the tables contained in the view are displayed in a dialog box. Select a table. The fields of the table are now

displayed in a dialog box. You can copy fields by selecting them in the first column and choosing Copy.

All key fields of the primary table must be included in a maintenance view. In addition, all key fields of secondary tables that are not

involved in the foreign key (that is, which are not linked via a join condition to a key field already included in the view) must be included in

the view.

This ensures that the records inserted with a maintenance view can be written correctly in the tables contained in the view.

On the Selection conditions tab page, you can (optionally) formulate restrictions for the data records that can be displayed with the view

(see Maintaining Selection Conditions for Views).

The selection conditions define the data records that can be selected with the view.

In the Maintenance status tab page, define the maintenance status of the view.

The maintenance status defines how you can access the view data with the standard maintenance transaction (SM30).

Choose .

At activation, a log is written; it can be displayed with Utilities ® Activation log. If errors or warnings occurring when the view was activated,

the activation log is automatically displayed.

Go to Transaction SE54 with Environment ® Tab.maint.generator.

From the view definition you can generate maintenance modules and maintenance interfaces that distribute the data entered with the view

to the base tables of the view. You can find more information in Creating a Maintenance Dialog.

Other Options

Recording documentation: You can create information about using the view with Goto ® Documentation. This documentation is output for

example when you print the view.

Changing the data element of a view field: Select column Mod (modification) for the view field. The Data element field is now ready for input.

You can enter a data element that refers to the same domain as the data element of the assigned table field here. Cancel the Mod flag if

you want to use the data element of the assigned table field again.

Enter the delivery class of the view: In the Maintenance status tab page, select the delivery class of the maintenance view. If you assign

the delivery class G or E to the view, you must also maintain a customer namespace (key block) for the view entries. To navigate to the

appropriate maintenance transaction, choose Define Customer Namespace.

Entering the maintenance attributes of the view field: In the View fields tab page you can define the Maintenance Attributes of the view

field in column F.

Check functions: With Extras ® Runtime object ® Check you can determine whether the definition of the view in the ABAP Dictionary

maintenance screen is identical to the definitions in the runtime object of the view. With Extras ® Runtime object ® Display you can display

the runtime object of the view.

Deleting Views

Prerequisites

You should only delete a view if it is no longer used in programs.

Procedure

In the initial screen of the ABAP Dictionary, select object type View and enter the name of the view.

With , check if the view is still being used in programs.

Choose .

A dialog box appears in which you are asked to confirm the deletion request.

Confirm the deletion request.

Result

The view is deleted in the ABAP Dictionary and in the database.

Reward if helpful.

Regards

Raghavendra.D.S

Former Member
0 Kudos
75

hi

4 types of views

data base view - used to club more than one table fields.

projection view -hide the fields of the table.

help views -can be used as selection method in search helps.

foriegn key relation ship is used.

maintenance view- it permits u to maintain the data distributed on several tables for one application or one object at a time.new screen is created.

reward if useful.

Former Member
0 Kudos
75

Hi tanuj joshi,

Here is more information about types of views.

Especially the below specified links are highly useful to know about types of views.

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.

- 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.

- 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.

Creating Database View:

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

Creating Projection View:

http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecc5446011d189700000e8322d00/frameset.htm

Creating Help View:

http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecd2446011d189700000e8322d00/frameset.htm

Creating maintenance View:

http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecdf446011d189700000e8322d00/frameset.htm

http://help.sap.com/saphelp_webas620/helpdata/en/cf/21ec5d446011d189700000e8322d00/content.htm

Regads,

Rama.Pammi