You are on page 1of 39

SAP’s Data Dictionary

Learning to use it effectively

FSS Technical Peer Group Meeting


Wednesday November 13, 2002
Carolyn Fuller
Introduction
 To know an application is to know its data
 Data dictionary holds key to performance
 Data dictionary tools reduce custom
programming

2
FSS Technical Peer Group Meeting 11/13/2002
Agenda

 The SAP Data Model


 Data Filtration
 SAP Indexes
 Building Custom Tables/Simple Apps

3
FSS Technical Peer Group Meeting 11/13/2002
Vocabulary
 Relational Database
 Indexes
 Unique Index
 Primary Key
 Foreign Key (Check Table)
 One-to-Many Relationship
 Recursive Relationship
 Client Dependent
 View Cluster
4
FSS Technical Peer Group Meeting 11/13/2002
KNA1
KUNNR

KNB1

The Data Model


BUKRS
KUNNR

BKPF BUKRS
BELNR
BSID BSAD
GJAHR BUKRS BUKRS
KUNNR.. KUNNR..

BUKRS
BSEG
BELNR
PRPS GJAHR
PSPNR BUZEI
ZSDBHEAD STUFE
FAKKZ
PRIME_CONTRACT

ZSDBLINE
PRIME_CONTRACT
MATERIAL
5
FSS Technical Peer Group Meeting 11/13/2002
The SAP Data Model
 Transactional Data One-to-Many
– One header row to many line items
 Master Data One-to-Many
– One master to many company code masters
– One master to many transaction line items
 Recursive data
– One parent to many children & grandchildren

6
FSS Technical Peer Group Meeting 11/13/2002
Report Example

Headers

Line Items

7
FSS Technical Peer Group Meeting 11/13/2002
“One” Should be Driver
All the WBS
(billable and
non-billable)

Each WBS
looks up its parent

Billable WBS

Billable WBS finds


children,
grandchildren

8
FSS Technical Peer Group Meeting 11/13/2002
Recursive Relationship
Billing Element

Billing Element

9
FSS Technical Peer Group Meeting 11/13/2002
PRHI - WBS Edges

WBS Project UP DOWN LEFT RIGHT


6900000 6900000 6900054
6900027 6900000 6900000 6900028 6900037 xxxxxxx
6900028 6900000 6900027 6900040
6900029 6900000 6900028 6900030
6900030 6900000 6900028 6900040 6900029
6900037 6900000 6900000 6900038 6900054 6900027
6900038 6900000 6900037 6900039
6900039 6900000 6900038
6900040 6900000 6900028 6900030
6900054 6900000 6900000 6900055 6900037
6900055 6900000 6900054

10
FSS Technical Peer Group Meeting 11/13/2002
Filtering Data Billing Example

Move filter to
beginning of
program

11
FSS Technical Peer Group Meeting 11/13/2002
Filtering Data MM Example
Unfiltered

Filtered

12
FSS Technical Peer Group Meeting 11/13/2002
SAP Indexes
 Primary Key
 Secondary Indexes
 Secondary Index Tables
 Foreign Key

13
FSS Technical Peer Group Meeting 11/13/2002
Secondary Index Table Secondary Indexes

Primary Key &


Unique Index

Foreign Key
Client

Foreign Key’s
Check Table

14
FSS Technical Peer Group Meeting 11/13/2002
BSID’s Secondary Indexes
Unique flag

BSID-1
Index for logical
database

15
FSS Technical Peer Group Meeting 11/13/2002
Recursive Resolution Table
Foreign Keys

Check Tables

16
FSS Technical Peer Group Meeting 11/13/2002
BKPF Primary & Foreign Keys
Primary Key with Table Fields
Foreign Key Primary Key
Foreign Key

17
FSS Technical Peer Group Meeting 11/13/2002
COVP Useful Secondary Index

WBS 4579002

18
FSS Technical Peer Group Meeting 11/13/2002
COVP Primary & Foreign Keys
Primary Key with Table Fields
Foreign Key Foreign Keys
Primary Key

19
FSS Technical Peer Group Meeting 11/13/2002
Additional Useful Indexes

http://fuller.mit.edu/SAPDocs/indexes.htm

20
FSS Technical Peer Group Meeting 11/13/2002
Building Custom Tables
 Create Header Table
 Create Line Item Table
 Create Maintainable Views for Header & Items
 SE54 - Extended Table Maintenance for Views
 Program & Activate Event User Exits
– Data validations
 SE54 - Create View Cluster
 SM34 - Maintain View Cluster
– SF8 View Cluster name is ZSDBLINE_VC

21
FSS Technical Peer Group Meeting 11/13/2002
Create Header Table
Search help can be Custom field type
Client attached to Field or allows custom
Field type documentation

22
FSS Technical Peer Group Meeting 11/13/2002
Custom Search Help
Defined in
Data type
Function Module Will display
contract # and
customer PO

Defined in
Search help

23
FSS Technical Peer Group Meeting 11/13/2002
Custom Field Documentation
Defined in
Data type

24
FSS Technical Peer Group Meeting 11/13/2002
Create Line Item Table
Foreign Key

Foreign Key’s
Check Table

25
FSS Technical Peer Group Meeting 11/13/2002
Create Maintainable View
Not the default!

26
FSS Technical Peer Group Meeting 11/13/2002
Maintenance
View Fields Attribute (MF)

Header fields - S
will be read only on
line items
27
FSS Technical Peer Group Meeting 11/13/2002
Extended Table Maintenance
SE54 - Generated Objects
Maintainable View
Create an Include via SE38

29
FSS Technical Peer Group Meeting 11/13/2002
Modify Function Pool
SAPLfunction_group

Uncomment

30
FSS Technical Peer Group Meeting 11/13/2002
Modify Lfunction_groupFXX
SE80 - Function group

31
FSS Technical Peer Group Meeting 11/13/2002
Events
SE54 -> Environment -> Events
Create View Cluster
SE54 -> Edit viewcluster
Object structure

34
FSS Technical Peer Group Meeting 11/13/2002
Generated Field Dependences
Header - ZSDBHEAD_V

35
FSS Technical Peer Group Meeting 11/13/2002
Generated Field Dependences
Header - ZSDBLINE_V

36
FSS Technical Peer Group Meeting 11/13/2002
View Cluster - Line Items SM34

Header

Line Items

37
FSS Technical Peer Group Meeting 11/13/2002
Summary
 Know your program “driver”
– Find the “One” in the application data model
 Filter the data early in the program
 Know the indexes available in an area
– If you can’t use the primary index there are
usually other indexes
 Use the SAP supplied tools when possible

38
FSS Technical Peer Group Meeting 11/13/2002
Where to Get More Information
 BC430 ABAP Dictionary
– Tomorrow in Waltham (11/14 - 11/15)
– January 9 - 10, 2003 Waltham
 My personal favorite, the book
– Object-Oriented Systems Analysis - Modeling
the World of Data by Sally Shlaer & Stephen
Mello
 Available, used on www.amazon.com

39
FSS Technical Peer Group Meeting 11/13/2002

You might also like