390 likes | 598 Views
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. Agenda.
E N D
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 FSS Technical Peer Group Meeting
Agenda • The SAP Data Model • Data Filtration • SAP Indexes • Building Custom Tables/Simple Apps FSS Technical Peer Group Meeting
Vocabulary • Relational Database • Indexes • Unique Index • Primary Key • Foreign Key (Check Table) • One-to-Many Relationship • Recursive Relationship • Client Dependent • View Cluster FSS Technical Peer Group Meeting
KNA1 KUNNR KNB1 BUKRS KUNNR BKPF BUKRS BELNR GJAHR BSID BSAD BUKRS KUNNR.. BUKRS KUNNR.. BUKRS BELNR GJAHR BUZEI BSEG ZSDBHEAD PRPS PSPNR PRIME_CONTRACT STUFE FAKKZ ZSDBLINE PRIME_CONTRACT MATERIAL The Data Model FSS Technical Peer Group Meeting
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
Headers Line Items Report Example FSS Technical Peer Group Meeting
“One” Should be Driver All the WBS (billable and non-billable) Each WBS looks up its parent Billable WBS Billable WBS finds children, grandchildren FSS Technical Peer Group Meeting
Billing Element Billing Element Recursive Relationship FSS Technical Peer Group Meeting
PRHI - WBS Edges FSS Technical Peer Group Meeting
Filtering Data Billing Example Move filter to beginning of program FSS Technical Peer Group Meeting
Filtering Data MM Example Unfiltered Filtered FSS Technical Peer Group Meeting
SAP Indexes • Primary Key • Secondary Indexes • Secondary Index Tables • Foreign Key FSS Technical Peer Group Meeting
Foreign Key Foreign Key’s Check Table Secondary Index Table Secondary Indexes Primary Key & Unique Index Client FSS Technical Peer Group Meeting
BSID’s Secondary Indexes Unique flag BSID-1 Index for logical database FSS Technical Peer Group Meeting
Foreign Keys Check Tables Recursive Resolution Table FSS Technical Peer Group Meeting
Table Fields Primary Key with Foreign Key Primary Key BKPF Primary & Foreign Keys Foreign Key FSS Technical Peer Group Meeting
COVP Useful Secondary Index WBS 4579002 FSS Technical Peer Group Meeting
Table Fields Primary Key with Foreign Key Foreign Keys Primary Key COVP Primary & Foreign Keys FSS Technical Peer Group Meeting
Additional Useful Indexes http://fuller.mit.edu/SAPDocs/indexes.htm FSS Technical Peer Group Meeting
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
Create Header Table Client Search help can beattached to Field or Field type Custom field type allows custom documentation FSS Technical Peer Group Meeting
Function Module Will display contract # and customer PO Defined in Search help Custom Search Help Defined in Data type FSS Technical Peer Group Meeting
Custom Field Documentation Defined in Data type FSS Technical Peer Group Meeting
Foreign Key Foreign Key’s Check Table Create Line Item Table FSS Technical Peer Group Meeting
Create Maintainable View Not the default! FSS Technical Peer Group Meeting
Maintenance Attribute (MF) Header fields - S will be read only on line items View Fields FSS Technical Peer Group Meeting
Extended Table Maintenance SE54 - Generated Objects Maintainable View
Create an Include via SE38 FSS Technical Peer Group Meeting
Modify Function Pool SAPLfunction_group Uncomment FSS Technical Peer Group Meeting
Modify Lfunction_groupFXX SE80 - Function group FSS Technical Peer Group Meeting
Events SE54 -> Environment -> Events
Create View Cluster SE54 -> Edit viewcluster
Object structure FSS Technical Peer Group Meeting
Generated Field Dependences Header - ZSDBHEAD_V FSS Technical Peer Group Meeting
Generated Field Dependences Header - ZSDBLINE_V FSS Technical Peer Group Meeting
View Cluster - Line Items SM34 Header Line Items FSS Technical Peer Group Meeting
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 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.com FSS Technical Peer Group Meeting