Download - Data Dictionary
SAPs Data DictionaryLearning to use it effectively
FSS Technical Peer Group Meeting Wednesday November 13, 2002 Carolyn Fuller
IntroductionTo know an application is to know its data Data dictionary holds key to performance Data dictionary tools reduce custom programming
FSS Technical Peer Group Meeting
2 11/13/2002
AgendaThe SAP Data Model Data Filtration SAP Indexes Building Custom Tables/Simple Apps
FSS Technical Peer Group Meeting
3 11/13/2002
Vocabulary
Relational Database Indexes Unique Index Primary Key Foreign Key (Check Table) One-to-Many Relationship Recursive Relationship Client Dependent View Cluster4 11/13/2002
FSS Technical Peer Group Meeting
KNA1KUNNR
KNB1
The Data ModelBKPFBUKRS BELNR GJAHR
BUKRS KUNNR
BSID
BUKRS KUNNR..
BSAD
BUKRS KUNNR..
BSEG PRPS ZSDBHEADPRIME_CONTRACT PSPNR STUFE FAKKZ
BUKRS BELNR GJAHR BUZEI
ZSDBLINEPRIME_CONTRACT MATERIAL
FSS Technical Peer Group Meeting
5 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
FSS Technical Peer Group Meeting
6 11/13/2002
Report ExampleHeaders
Line Items
FSS Technical Peer Group Meeting
7 11/13/2002
One Should be DriverAll the WBS (billable and non-billable) Each WBS looks up its parent
Billable WBS
Billable WBS finds children, grandchildren
FSS Technical Peer Group Meeting
8 11/13/2002
Recursive RelationshipBilling Element
Billing Element
FSS Technical Peer Group Meeting
9 11/13/2002
PRHI - WBS EdgesWBS 6900000 6900027 6900028 6900029 6900030 6900037 6900038 Project 6900000 6900000 6900000 6900000 6900000 6900000 6900000 6900000 6900027 6900028 6900028 6900000 6900037 6900038 6900039 UP DOWN 6900054 6900028 6900040 6900030 6900040 6900054 6900029 6900027 6900037 xxxxxxx LEFT RIGHT
69000396900040 6900054 6900055
69000006900000 6900000 6900000
69000386900028 6900000 6900054 6900055 6900030 6900037
FSS Technical Peer Group Meeting
10 11/13/2002
Filtering Data Billing Example
Move filter to beginning of program
FSS Technical Peer Group Meeting
11 11/13/2002
Filtering Data MM ExampleUnfiltered
Filtered12 11/13/2002
FSS Technical Peer Group Meeting
SAP IndexesPrimary Key Secondary Indexes Secondary Index Tables Foreign Key
FSS Technical Peer Group Meeting
13 11/13/2002
Secondary Index TablePrimary Key & Unique Index
Secondary Indexes
Foreign Key
Client
Foreign Keys Check Table
FSS Technical Peer Group Meeting
14 11/13/2002
BSIDs Secondary IndexesUnique flag
BSID-1 Index for logical database15 11/13/2002
FSS Technical Peer Group Meeting
Recursive Resolution TableForeign Keys
Check Tables
FSS Technical Peer Group Meeting
16 11/13/2002
BKPF Primary & Foreign KeysPrimary Key with Foreign Key Primary Key Foreign Key Table Fields
FSS Technical Peer Group Meeting
17 11/13/2002
COVP Useful Secondary Index
WBS 4579002
FSS Technical Peer Group Meeting
18 11/13/2002
COVP Primary & Foreign KeysPrimary Key with Foreign Key Table Fields
Primary Key
Foreign Keys
FSS Technical Peer Group Meeting
19 11/13/2002
Additional Useful Indexeshttp://fuller.mit.edu/SAPDocs/indexes.htm
FSS Technical Peer Group Meeting
20 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
FSS Technical Peer Group Meeting
21 11/13/2002
Create Header TableClient Search help can be attached to Field or Field type Custom field type allows custom documentation
FSS Technical Peer Group Meeting
22 11/13/2002
Custom Search HelpDefined in Data type
Function Module
Will display contract # and customer PO
Defined in Search help
FSS Technical Peer Group Meeting
23 11/13/2002
Custom Field DocumentationDefined in Data type
FSS Technical Peer Group Meeting
24 11/13/2002
Create Line Item TableForeign Key
Foreign Keys Check Table
FSS Technical Peer Group Meeting
25 11/13/2002
Create Maintainable ViewNot the default!
FSS Technical Peer Group Meeting
26 11/13/2002
View Fields
Maintenance Attribute (MF)
Header fields - S will be read only on line itemsFSS Technical Peer Group Meeting 27 11/13/2002
Extended Table MaintenanceSE54 - Generated ObjectsMaintainable View
Create an Include via SE38
FSS Technical Peer Group Meeting
29 11/13/2002
Modify Function PoolSAPLfunction_group
Uncomment
FSS Technical Peer Group Meeting
30 11/13/2002
Modify Lfunction_groupFXXSE80 - Function group
FSS Technical Peer Group Meeting
31 11/13/2002
EventsSE54 -> Environment -> Events
Create View ClusterSE54 -> Edit viewcluster
Object structure
FSS Technical Peer Group Meeting
34 11/13/2002
Generated Field DependencesHeader - ZSDBHEAD_V
FSS Technical Peer Group Meeting
35 11/13/2002
Generated Field DependencesHeader - ZSDBLINE_V
FSS Technical Peer Group Meeting
36 11/13/2002
View Cluster - Line Items SM34
Header
Line Items
FSS Technical Peer Group Meeting
37 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 cant use the primary index there are usually other indexes
Use the SAP supplied tools when possible38 11/13/2002
FSS Technical Peer Group Meeting
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.com39 11/13/2002
FSS Technical Peer Group Meeting