Академический Документы
Профессиональный Документы
Культура Документы
Dec-2008
Objectives
The participants will be able to:
Define a View.
Explain the different Relational Operations.
Discuss the different types of Views.
Discuss how to use Views in an ABAP program.
What is a View?
Views are used to look into one or more tables.
A view does not contain data of its own.
Projection
Table 1
Selection
Table 2
Join
Table 3
Table 4
View C
View A
View B
Projection
Table 1
View A
Selection
Table 2
Example:
Staff Level <= 3
View B
Join
Table 3
Table 4
View C
10
Name
Salary 1
Salary 2
Salary 3
Salary
ID
Name
Salary
5579
Smith
$10,000.00
5579
Smith
$11,000.00
Wrong
11
5579
Smith
$12,000.00
5579
Smith
$13,000.00
ID
Name
Salary
12
ID
Salary
Date Effective
5579
$10,000.00
10/1/91
5579
$11,000.00
10/1/92
5579
$12,000.00
10/1/94
5579
$13,000.00
10/1/96
Right
Primary
Join
Table 3
Secondary
Table 4
View C
13
Join Conditions
14
15
DB
16
Database
Demonstration
Creation of a database view using two related database tables.
17
Practice
Creation of a database view using two related database tables.
18
Projection View
View C
19
Database View
20
21
*
YXXEMP_V INTO WA_YXXEMP_V.
WRITE:
WA_YXXEMP_V-EMP_ID,
WA_YXXEMP_V-LAST_NAME,
WA_YXXEMP_V-FIRST_NAME.
ENDSELECT.
22
Demonstration
Select data from the database view created earlier and display selected data in a
report.
23
Practice
Select data from the database view created earlier and display selected data in a
report.
24
Summary
Views are used to look into one or more tables. A view does not contain data of its
own.
The projection operation is used to narrow a views focus to certain fields
in a table.
The Selection Operation is used to narrow a views focus to certain records
in a table.
The Join Operation is used to combine information from multiple tables into a
single view.
Types of Views in the ABAP Dictionary are Database View, Projection View, Help
View & Maintenance View.
The syntax to reference a view in an ABAP program is the same syntax we use to
reference a table.
25
Questions
What is a View ?
What is a Database view ?
What is a Projection view ?
What is a Maintenance view ?
What is a Help view ?
26