7/29/2019 abap part2
1/18
SAP AG
CSU
Chico
MINS298c
Fall 1998
Three Levels of ABAP Dictionary
Chapter 5 & 6
7/29/2019 abap part2
2/18
SAP AG
CSU
Chico
Overview
Three conceptual levels
Methods to observe the levels
What is on the levels
How to see the data in a Table
Heads up on Table Processing
ABAP examples
7/29/2019 abap part2
3/18
SAP AG
CSU
Chico
F1 F2
Three Levels of Dictionary
F1 F2 F1 F2F1 F2
F1 F2
Domain
Data Element
Structure
7/29/2019 abap part2
4/18
SAP AG
CSU
Chico
trucks
Three Levels of Dictionary
F150 CamaroF150
cars
camper
Domain
Data Element
Structure
4 wheel
automobiles
7/29/2019 abap part2
5/18
SAP AG
CSU
Chico
Definition of Levels
Domain: Range of values of a certain type and lengththat can be used by many data elements. ExampleVIN# is 11 character numeric.
Data Element: Attribute or field that is defined by a
domain. Example: Trade-in_Vin#, NewCar_Vin# Table: Collection of related Data Elements and their
values (Set of related records) Example: Car SalesOrder
Structure: Like a sub-schema or view of the data(collection of data elements that may not be relatedthrough tables) Example: CCSS
7/29/2019 abap part2
6/18
SAP AG
CSU
Chico
Methods to View Hierarchy
Object Browser
design
analysis
Editor
debugging
programming
Basic Process
identify table/structure
drill down
7/29/2019 abap part2
7/18
SAP AG
CSU
Chico
At Table/Structure Level
Field name
Key
Data Element
Type - determined by Domain Length - determined by Domain
Checktable
Text
7/29/2019 abap part2
8/18 SAP AG
CSU
Chico
At Data Element Level
Domain
Data Type
Field Length
Value Table (allowable values) Texts
7/29/2019 abap part2
9/18 SAP AG
CSU
Chico
In Class Assignment
Write down the answers; Dont yell out.
With regard to the Table SBOOK,
SBOOKs structure contains how many fields?
How many key fields does SBOOK have?
What is the name, domain, data type and long fieldname of the last field in SBOOK?
7/29/2019 abap part2
10/18 SAP AG
CSU
Chico
How to see the data in a Table
Object Browser
use selection screen to pick a Table (structure)
Use Utility > Table Contents
Select fields (note selection fields) can filter data
can sort data
ABAP code
select *
7/29/2019 abap part2
11/18 SAP AG
CSU
Chico
In Class Assignment
Write down the answers; Dont yell out. With regard to the Table SBOOK,
Determine the number of records in the database
The number of records with connectingidentification numbers between 400 and 500
Is the default inclusive or exclusive for the rangedelimiters (Does SAP include or exclude the limits of
the range entered?)
Exclusive Inclusive
7/29/2019 abap part2
12/18 SAP AG
CSU
Chico
Heads Up on Table Processing
Basic Process
Create Table
Identify those needed
Identify structure Load Table
Get Data from database
Process data
Display
7/29/2019 abap part2
13/18 SAP AG
CSU
Chico
Heads up on Table Processing
Database Table (with data) Internal Table (no data yet)
SFLIGHTMY_TABLE
How do I makesure data will fit inMY_TABLE?
7/29/2019 abap part2
14/18 SAP AG
CSU
Chico
Heads up on Table Processing
Database Table (with data) Internal Table (no data yet)
SFLIGHTMY_TABLE
How do I makesure data will fit inMY_TABLE?
Match the structures.LIKE
7/29/2019 abap part2
15/18 SAP AG
CSU
Chico
Heads up on Table Processing
Database Table (with data) Internal Table (no data yet)
SFLIGHTMY_TABLE
How do I get thedata into MY_TABLE?
7/29/2019 abap part2
16/18 SAP AG
CSU
Chico
Heads up on Table Processing
Database Table (with data) Internal Table (no data yet)
SFLIGHTMY_TABLE
How do I get thedata into MY_TABLE?
Use SELECT verb:
SELECT *FROM dbtable
INTO TABLE My_Table.
7/29/2019 abap part2
17/18 SAP AG
CSU
Chico
Heads up on Table Processing
Internal Table (no data yet)
MY_TABLE Once in My_Table, how
do I iterate to display it?
Use LOOP AT verb with
ENDLOOP.
Put actions you want donein the loop betweenLOOP AT and ENDLOOP.
LOOP AT itab.Write data.
ENDLOOP.
LOOP At itab
ENDLOOP
}
7/29/2019 abap part2
18/18
CSU
Chico
Assignment #4
On paper, create a hierarchy example using the three levels:
Domain, Data Element, Structure. Be ready to explain onexam
Copy ZZ99DEM2
find the fields for ticket price and plane type in
SFLIGHT
add these fields to the display
place headings at top of columns; use text elements(do not worry too much about alignment yet)