More Related Content
Similar to 169318090 0104abapdictionary-100831073625-phpapp02 (20)
169318090 0104abapdictionary-100831073625-phpapp02
- 2. Module Objectives
• Describe the basic functionality of the Data Dictionary, its
objects and related transactions
• Define domain and data element and how they are related
• Define a table and table concepts including:
–
–
–
–
–
Foreign key and primary key
SAP table types
Creating and maintaining tables - SE11
Indexes
Buffering
• Define structures and views
• Define search help
• Describe the data browser
Copyright © 2005 Accenture
2
- 3. What is a Data Dictionary?
•
•
•
A data dictionary is a systemindependent interface to a
database.
A data dictionary is a “virtual
database” containing metadata
(data about data).
A data dictionary provides tools
for data manipulation and data
processing.
Copyright © 2005 Accenture
3
- 4. Why a Data Dictionary?
•
•
A data dictionary facilitates the development of platform-independent
applications.
A data dictionary eliminates the need for programmers to be concerned
about specific storage locations, drive and directory names, etc.
ABAP
Program X
ABAP
Program X
ABAP Dictionary
ABAP Dictionary
Unix
Copyright © 2005 Accenture
SAP Database
(Oracle)
Windows
NT
SAP Database
(MS SQL Server)
4
- 5. ABAP Dictionary Functionality
ADMINISTRATION
• ABAP Dict
Objects
• Where-used
lists
• Relationships
Modification
analysis
• ABAP Dict
Objects
• Time Stamp
Validation
• Entries in
DB Catalog
ACTIVATION
ANALYSIS
• Records
• Storage
• ABAP Dictionary
• Repository Info System
• Documentation
INTEGRATION
Copyright © 2005 Accenture
5
- 6. ABAP Dictionary Transactions
•
•
•
•
•
•
SE80 - Repository Browser
SE15 - Repository Information System
SE16 - Data Browser
SE17 - General Table Display
SM30 - Maintain Table Views
SM31 - Table Maintenance
Copyright © 2005 Accenture
6
- 8. Levels of Abstraction
Domain
Data Element
• Data type
• Number of characters
• Output length
• Value table
• Attributes inherited from domain
• Field labels
Table
Field
Copyright © 2005 Accenture
• Field name
• Primary key indicator
• Attributes inherited from data element
8
- 11. Specifying Value Ranges for a
Domain
Fixed Values Example:
Domain:
S_CLASS (Classes for a Flight Booking)
Values:
C
F
Y
(business class)
(first class)
(economy class)
Value Table Example:
Domain:
Value Table:
Copyright © 2005 Accenture
S_CARR_ID (Carrier ID)
SCARR
Table: SCARR
Carrier ID
AA
DL
LH
SA
UA
Name
American
Delta
Lufthansa
Singapore
United
11
- 13. Interdependency of ABAP
Dictionary Objects
Tab.
From City
Tab.
S_FROM_CIT
City
S_CITY
S_TO_CITY
To City
Tab.
Tables
Copyright © 2005 Accenture
Data elements
"semantic
field description"
Domains
"technical
field description"
13
- 15. Relationships Between Tables:
Foreign Keys
Primary Key
PLANETYPE SEATSMAX
Check
Table
747-200
A310-200
757-300
CARGOMAX
200
211
301
20000
24000
17000
Table 1: Airplane Details Table SAPLANE
Foreign Key
Primary Key
Foreign
Key
Table
CARRID CONNID FLDATE
AA
UA
1234
5678
PRICE PLANETYPE SEATSOCC
03/22/1999 500
01/06/1999 600
747-200
A310-200
125
90
Table 2: Flight Table SFLIGHT
Copyright © 2005 Accenture
15
- 16. Check Table - System Default
- DOMAIN S_PLANE
Value table
SAPLANE
- Table SFLIGHT
- Field PLANETYPE
Check table
Copyright © 2005 Accenture
SAPLANE
System default
16
- 17. Cardinality
• Cardinality defines the type of
relationship between two tables.
• The cardinality of a foreign key
indicates how many dependent
records a record in a check
table may have.
Cardinality Types
1:1
1:C
1:N
1:CN
Copyright © 2005 Accenture
17
- 18. SAP Data
Master
Data
•
•
•
•
G/L Accounts
Vendors
Materials
Stock Locations
System
Data
Copyright © 2005 Accenture
•
•
•
•
Metadata
Programs
Documentation
System Settings
Configuration
Data
Transaction
Data
•
•
•
•
•
•
•
•
Currency Codes
Order Types
Payment Terms
Field Status Codes
Sales Orders
Purchase Orders
Journal Entries
Goods Receipts
18
- 22. Technical Settings
Data class
Master data
Transaction data
Organization & Customizing (System) data
Table category
Number of data records in DB storage area
Buffering
single
generic (must specify number of key fields)
full
not buffered
Log data changes
Copyright © 2005 Accenture
22
- 24. Data Class
TS1 ... TSn
TB1 ... TBn
TSYS1 ... TSYSn
APPL0
(Master)
APPL1
(Transaction)
APPL2
(Organization &
Customizing)
TS1
....
TS1
TS1
....
....
TS2
TS2
TS2
TSn
TSn
TSn
DB
Copyright © 2005 Accenture
24
- 26. Exercises
Exercise 1 - Create Basic ABAP Dictionary Objects, 60 minutes
Exercise 2 - Create Table Indexes, 20 minutes
Copyright © 2005 Accenture
26
- 27. Buffering
TABL
ABAP Dictionary
TABLP
Buffer: 100% and generic
T1
S1 S2 F1 ...
T3
T1
T2
T3
T2
S1 S2 F1 ...
G1 G2 S3 F1 ...
Buffer: partial
G1 G2 S3 ...
S1 S2 F1 ...
G1 G2 S3 F1 ...
No
1st access
100% generic
partial
Change number
of key fields
2
1st access
Yes
No
Yes
Generic
key
complete
Yes
Import record
SELECT
SINGLE
record exists
No
No
DB
T1
S1 S2 F1 ...
Copyright © 2005 Accenture
Yes
T2
G1 G2 S3 F1 ...
T3
G1 G2 S3 ...
27
- 28. Logging
DD
Table T1
Change
S1 S2 F1 F2 F3 ...
Logging
Manual
DB
T1
System profile
Copyright © 2005 Accenture
Log
S1 S2 F2 F3 ...
Field-related
log records
28
- 30. APPEND Substructure
Database Field Sequence
FLD1 FLDX
FLD2
Table
ABAP Dictionary Sequence
FLD1
Field
ZTBL1
FLD1
TRANSP FLD2
FLD2
FLDX
Data Element
...
...
.APPEND ZAZTBL1
OR
Append contains
definition of field
FLDX
.APPEND CI_ZTBL1
Customizing Include
Copyright © 2005 Accenture
30
- 31. Views
FIELD A
FIELD C
FIELD D
FIELD F
VIEW 1
FIELD A FIELD B
TABLE 1
Copyright © 2005 Accenture
FIELD C
FIELD A FIELD D
FIELD E
FIELD F
TABLE 2
31
- 32. Search Help
The search path used the
last time is displayed
A
B
User chooses a
different search
path
C
User chooses F4
on field
The chosen search
path is displayed
A
B
C
Values are
returned
User selects row
Copyright © 2005 Accenture
Hit list is displayed
32
- 38. Settings
....
....
Personal Settings
- Width of output list
- Maximum number of
entries to be selected
- Take into account
conversion exit
- Column headings can
be either:
. Field name, or
. Field text
(from data element)
Copyright © 2005 Accenture
....
Data Browser: Table SPFLI
Settings .... .... System Help
List format
Sort
User parameters
Choose Fields
Fields For Selection
- List table fields
- Flag the fields to
be used for data
selection
- Maximum 40
Affects the
selection screen
Fields to be
selected ...
Sort Sequence for
output list ...
- List table fields
Fields to be
used for data
selection ...
- List table fields
- Flag the fields to
be included in the
the output list
- Maximum 9 sort fields
- Flag fields with 1 to 9
Affects the
output list
38
- 39. Exercises
Exercise 4 - ABAP Dictionary Search, 30 minutes
Exercise 5 - View a Table with the Data Browser, 20 minutes
Copyright © 2005 Accenture
39