2. Objectives
• The participants will be able to :
– Create different type of views in database.
– Understand the difference between database &
projection view.
March-2005 Views | 2.15.03 2
3. Creating a view: Step 1
March-2005 Views | 2.15.03 3
Select radio button
“View”
Click on Create button
Provide a custom
name
4. Different types of views: Step2
March-2005 Views | 2.15.03 4
Select the view type
Click on the “Copy”
button
13. Practice
• Step by Step creation of a Database View.
March-2005 Views | 2.15.03 13
14. Summary
•There are different types of views for efficiently
extracting data from the database.
•For creating a view , one needs to define the
primary and secondary tables, define the
relationship for the selected tables, define the
view fields, define the selection criteria and
define the maintenance status.
March-2005 Views | 2.15.03 14
15. Questions
•What are the different types of views ?
•What is meant by defining selection criteria of
a view ?
•What is meant by defining maintenance status
of a view ?
March-2005 Views | 2.15.03 15
Editor's Notes
Go to ABAP Dictionary: Initial Screen (Transaction Code SE11).
Select the ‘View’ radio button.
Then, type in a custom name for the View.
Click on the create button.
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.
Choose a View Type in this Pop-up screen. If the desired fields are from multiple tables choose DATABASE as the view type. If the desired fields are from a single table choose PROJECTION as the view type.
Keep in mind that you can only include transparent tables in a database view
For DATABASE view there will be one primary table and there can be zero, one or more secondary tables. The first table listed is automatically considered as the other primary table. List any desired secondary tables immediately after the primary table.
If there are suitable foreign keys between the tables, you should copy the join conditions from these foreign keys
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.
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
On the Selection conditions tab page, you can (optionally) formulate restrictions for the data records to be displayed with the view.The selection conditions define the data records that can be selected with the view.
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 Package.
Activate the view.