This document provides an overview and summary of key concepts in the ABAP/4 dictionary. It discusses the definition and functions of the dictionary, basic objects like data elements, domains and tables. It describes how the dictionary ensures data integrity and avoids redundant definitions. Other chapters cover data modeling concepts, how dictionary objects are used in ABAP programs, establishing relationships between tables through foreign keys, different table types in SAP systems, adding structures to tables, using the repository information system, and managing changes to dictionary objects.
This document provides an overview and summary of key concepts in the ABAP/4 dictionary. It discusses the definition and functions of the dictionary, basic objects like data elements, domains and tables. It describes how the dictionary ensures data integrity and avoids redundant definitions. Other chapters cover data modeling concepts, how dictionary objects are used in ABAP programs, establishing relationships between tables through foreign keys, different table types in SAP systems, adding structures to tables, using the repository information system, and managing changes to dictionary objects.
This document provides an overview and summary of key concepts in the ABAP/4 dictionary. It discusses the definition and functions of the dictionary, basic objects like data elements, domains and tables. It describes how the dictionary ensures data integrity and avoids redundant definitions. Other chapters cover data modeling concepts, how dictionary objects are used in ABAP programs, establishing relationships between tables through foreign keys, different table types in SAP systems, adding structures to tables, using the repository information system, and managing changes to dictionary objects.
This document provides an overview and summary of key concepts in the ABAP/4 dictionary. It discusses the definition and functions of the dictionary, basic objects like data elements, domains and tables. It describes how the dictionary ensures data integrity and avoids redundant definitions. Other chapters cover data modeling concepts, how dictionary objects are used in ABAP programs, establishing relationships between tables through foreign keys, different table types in SAP systems, adding structures to tables, using the repository information system, and managing changes to dictionary objects.
Download as PPT, PDF, TXT or read online from Scribd
Download as ppt, pdf, or txt
You are on page 1of 183
CHAPTER 1
Overview of the ABAP/4
Dictionary Definition and functions of the ABAP/4 Dictionary Basic objects of the ABAP/4 Dictionary The Database Utility
What is a Data Dictionary? No Redundant Data Definitions Functions of the ABAP/4 Dictionary Integration with the ABAP/4 Development Workbench Data Integrity Data Integrity No Redundant Data Definitions Integration with the ABAP/4 Development Workbench Basic Objects of the ABAP/4 Dictionary Data Element 1 Data Element 2 Domain Table C Table B Table A Database Utility Database Utility Database CHAPTER 2 Data Modeling What is data modeling? Entities, attributes, & entity types Data modeling vs. ABAP/4 Dictionary terminology Relationships and relationship types Cardinality Optionality Category Data model hierarchies Linking a data model to dictionary objects Data Dictionary Real World What is Data Modeling? Data Model Uses of a Data Model Entity Customer Basic Components of a Data Model Attribute 30 S. 17th St. Entity Type Order Entity Customer Order Product Attribute J. Elkins Customer 30 S. 17th St. 215-555-8000 Entity Type Customer Order Product Data Modeler/ ABAP/4 Dictionary Terminology Data Modeler ABAP/4 Dictionary Customer: entity record Customer address: attribute field Customers: entity type table
Relationships between Entities Customer Order Cardinality One - to - Many Many - to - Many One - to - One Many-to-Many Relationships Order Order Lines 1 A26 Qty Part # 3 C589 1 A27 Optionality ? ? Customer Order Customer Referenced and Dependent Entity Types Dependent Entity Type Referenced Entity Type Customer ID Name Address . . . Order ID Date of Order Customer ID . . . Customer Order Referenced Dependent SAP Graphic Notation Example Using Graphic Notation Customers Orders Practice Using Graphic Notation I Professors Students Practice Using Graphic Notation II Professors Students Practice Using Graphic Notation III Students Enrollment Records Courses SAP Graphic Notation with Text Notation 1 C N CN 1 C N CN 1 C SAP Text Notation n : m Example Using Text Notation Customers Orders 1 CN : Practice Using Text Notation I Students Professors : Practice Using Text Notation II Students Professors : Practice Using Text Notation III Students Enrollment Records Courses : Referential Category Hierarchical Aggregating
Key: Faculty Number Course Number Relationship Category: Aggregating Student
Key: Student ID Number Enrollment Record
Key: Student ID Number Course Number Course
Key: Course Number Faculty
Key: Faculty Number Professor
Key: Professor Number Relationship Category: Referential Faculty
Key: Faculty Number Professor
Key: Professor Number Relationship Category: Conditional-Referential Business Customer
Key: ID Number Customer
Key: ID Number Relationship Category: Specialization Data Model Hierarchies and the SAP EDM General Accounting Chart of Accounts Currency FI . . . . . . . . . SCREENSHOTS : SCREENSHOTS : SD11 TRANSACTION - DATA MODELER Linking a Data Model to ABAP/4 Dictionary Objects Data Model CHAPTER 3 Dictionary Objects Tables Data Elements Domains Using a Table in an ABAP/4 Program Accessing the ABAP/4 Dictionary SCREENSHOT : Basic Objects of the ABAP/4 Dictionary Data Element 1 Data Element 2 Domain Table C Table B Table A Tables TABLE KNA1 (Customers) Name 1 ORT 02 MANDT KUNNR Table: KNA1 SCREENSHOT: SE11 TRANSACTION - ABAP DICTIONARY Two-Level Domain Concept Data Element 1 Data Element 2 Domain Data Elements Data Element 1 Table B Table A Pre-Defined Data Elements Data Element Documentation Enter a description (short text). Enter domain name. SCREENSHOT: SE11 - create, change and display data elements TO CREATE A DATA ELEMENT : FIELD LABEL LIMITS FOR SPACE MANAGEMENT Maintain field labels and column header. Domains Path Elements Table A Domain Characteristics of Domains Path Elements Table A Domain Allowed Values Value Table January February March . . . . . . . December Domain Domain Benefits of Using Allowed Values CREATE DOMAIN: SCREENSHOT: SE11 to create, change and display domains SCREENSHOT: CREATE TABLE THROUGH SE11 Enter a description (short text). Table maintenance attribute Maintain field attributes Maintain delivery class SCREENSHOT: CREATE TABLE THROUGH SE11 Using a Table in Program Code TABLES: YEMPLOY.
ENDSELECT. CHAPTER 4 Foreign Key Relationships Definition & Uses of Foreign Keys Prerequisites for Constructing Foreign Key Relationships Key Terminology Cardinality and Foreign Key Field Types Foreign Keys with Multiple Fields
Definition of Foreign Keys Uses of Foreign Keys Maintain data integrity Provide help texts Create aggregate dictionary objects Prerequisites for Constructing Foreign Key Relationships The foreign key field and the primary key of the check table must share the same domain. A value table must exist for that domain. Check Table Value Table Foreign Keys: Key Terminology Foreign Key Table Foreign Key Terminology: Example 1 Check Table Value Table Foreign Key Terminology: Example 2 Check Table Value Table Establishing a Foreign Key Relationship in the ABAP/4 Dictionary Cardinality 1 C N CN 1 C n : m Students Check Table: Students Foreign Key Table: Course Enrollment Foreign Key Field Type STUDENT_ID ? Foreign Key Type: Key Fields or Key Field Candidates Faculty Course Foreign Key Type: Key Fields of a Text Table T005 (Country Codes) (T002) (Language Codes) T005T (Country descriptions) Foreign Key Type: Non-Key Field Candidates Professor Course Enter a description (short text). Maintain cardinality n : m Maintain foreign key type Check table (defaults to value table) Foreign Keys with Multiple Fields Check Table Field-By-Field Assignment Foreign Key Table Partial Foreign Keys Constant Foreign Keys Generic foreign key Constant foreign key CHAPTER 5 ABAP/4 Dictionary Tables in Relational Databases SAP Table Types Technical Settings Indexes SAP Table Types View Transparent Table (TRANSP) Structure (INTTAB) Pool Table Cluster Table Transparent Tables Type = TRANSP Master Data Table Types TRANSP in the Database DB PROFILE Mapping a Table of Type INTTAB DB PROFILE Pool and Cluster Tables: Overview Pool Table Cluster Table Master Transaction Organization & Customizing User Technical Settings Data class Size category Buffering Log data changes Number of data records in DB storage Single records, generic, full, not buffered on or off Master data User data Data Class Organization and customizing data Transaction data DB Size Categories Buffering Type None KF1 KF2 KF3 F4 F5 F6 Single Record KF1 KF2 KF3 F4 F5 F6 Generic KF1 KF2 KF3 F4 F5 F6 Full Logging Technical Settings Index GOTO ---> Indexes in SE11 Database table DB Database Utility SCREENSHOT: SE14 - DATABASE UTILITY CHAPTER 6 Adding Structures Substructures Customizing Includes Append Structures
Table XYZ
.INCLUDE CI_XXX
Table T
.APPEND ZAT
Including Structures in Tables Table YCUSTAB
.INCLUDE YSTRUC
Append Structures Substructures Customizing Includes Customer Tables SAP Tables SAP Tables Field 1 Field 2 ... Field n Table Field Data element YT2 S1 (TRANSP) S2
F1 Substructure YS Table Field Data element YT1 S1 (TRANSP) S2
F1 .INCLUDE YS .INCLUDE YS YSF1 YSF2 YSF3... Table Field Data element
XYZ S1 F1 . . . Fn
Customizing Include .INCLUDE CI_XXX CI_XXX .INCLUDE IN TABLES : example Table Field Data element
T S1 F1 . . . Fn
.APPEND ZAT Append Structure ZAT ZAT-F1 ZAT-F2 ZAT-F3 APPENDING STRUCTURE INTO SAP TABLE: example CHAPTER 7 ABAP/4 Repository Information System The Repository Information System Object Searches (Find) Use of Objects in Objects (Where-Used) Searching for Objects Outside the Dictionary
Find all objects of type A with attributes X, Y, Z. Where-used lists
Find all objects of type A that use object B SCREENSHOT: SE84 - REPOSITORY INFO. SYSTEM Find Use the All selections push-button to limit search criteria on other object attributes Enter a single value for the search attributes or use the arrow push-buttons for selection options Selection Options Simplified Selection (single values)
= > < Equal Pattern Greater than or equal Less than or equal
> < Not equal Exclude pattern Greater than Less than Complex Selection (ranges) [ ] ][ Inclusive Exclusive Toggle push-buttons Hit List Options I Hit List Options II Sort descending Select all Deselect all Refresh Sort ascending Where-Used List: Selection Screen List of all objects that object may be used in Relationship between Objects Where-Used and Sub-Objects Lists Domains Data Elements Program Screen Table ABAP/4 Repository Info System Modeling ABAP/4 Dictionary Programming Environment CHAPTER 8 ABAP/4 Dictionary Changes Activation Data Consistency and Conversion Version Management Miscellaneous Changes
Activation Data Object Activation Icon ABAP/4 Dictionary SCREENSHOT: SCREENSHOT: SM31 TO PERFORM MASS ACTIVATION SCREENSHOT: SA38 TRANSACTION Activation Background Online Activation ABAP/4 Programs Updates Screen Painter Log Making Changes to Tables Database Utility DB SCREENSHOT: SE14 TRANSACTION DB UTILITY Change Key of Value Table SAP Table Versions Version Management for Table, eg. Table MSEG temporary versions active version modified (evised) version Version Management Display Compare Retrieve stored version of object REMOTE compare Processing Data Dictionary Objects Comparison and Adjustment CHAPTER 9 ABAP/4 Dictionary Objects: Views Definition Relational operations Types of views Using a view in program code
What is a View? The Most Basic Form of a View The Relational Operations Table 2 Selection View B Table 1 Projection View A View C Join Table 4 Table 3 The Projection Operation Projection View A Table 1 The Selection Operation Selection View B Table 2 Specifying Selection Criteria 1 2 3 4 5 The Join Operation Table 3 Join Table 4 View C The Necessity of the Join Operation ID Name Salary 1 Salary 2 Salary 3 Employee Salary ID Name Salary 5579 Smith $10,000.00 5580 Smith $11,000.00 5581 Smith $12,000.00 5582 Smith $13,000.00 Wrong Understanding the Join Operation ID Name Employee Salary ID Salary 5579 $10,000.00 5580 $11,000.00 5581 $12,000.00 5582 $13,000.00 Right The Join Operation and Foreign Keys View C Join Table 4 Table 3 Types of Views in the ABAP/4 Dictionary Database View Projection View Help View Maintenance View Structure and Entity Views (obsolete) Database The Database View DB Database View The Projection View Projection View Database vs. Projection Views Database View Projection View Other Types of Views Help View Maintenance View Structure View (obsolete) Entity View (obsolete) Using a View in Program Code TABLES: YEMPVIEW, SELECT * FROM YEMPVIEW WRITE: / YEMPVIEW_ID, YEMPVIEW_NAME, YEMPVIEW_SALARY. ENDSELECT. CHAPTER 10 ABAP/4 Dictionary Objects: Matchcodes Matchcode objects Matchcode IDs Logically stored matchcodes Physically stored matchcodes Search Helps Matchcodes Click here to see matchcode information displayed Matchcode object YOGI Matchcode ID YOGI-1 UFACH Defining Matchcodes (Two-level Structure) Result of search: faculty XXXX UKURS UPERS Matchcode ID YOGI-2 Matchcode ID YOGI-3 Matchcode object YOGI fabnr fbnam krsnr prfnr kname euna adre Matchcode Object tables: fields: UFACH UKURS UPERS Matchcode IDs matchcode object id#1 id#2 id#3 UFACH - FABNR UFACH - FBNAM UFACH - FABNR UKURS - KNAME UFACH - FABNR UPERS - EUNA UKURS - PRFNR Update Type I = Transparent MC A = Asynchronous MC setup . . S = Synchronous MC setup . . K = MC in classification system P = Program-driven MC setup . View M_YXXX1 Logical Matchcodes (Update Types I and K) Matchcode ID 1 Matchcode Object YXXX
Tables and fields available for id PT ST2 ST1 PT ST1 ST2 DB Physical Matchcodes (Update Type A, S, P) M_Name Matchcode object pool Secondary table 1 Primary table Secondary table 2 View structure X X X X X
X
X PT ST1 ST2 View MC ID M_NameA M_NameB M_NameC Field selection, sequence and data Join Join 1. Create the matchcode object. 2. Identify all the tables for the matchcode object. 5. Activate the matchcode object. 6. Create the matchcode id. 7. Define the update type 8. Select the fields and tables from the matchcode object. 9. Specify search conditions (if necessary). 10. Activate the matchcode id. 11. Repeat steps 6 - 10 for as many matchcode ids you need to create. 3. Select fields from those tables. 4. Identify the field that is being searched for. Steps to Creating Matchcodes Search Helps Search helps are same as matchcodes. Its a new terminology that SAP is following from its release 4.0 for the term matchcode. Search help can be created in transaction SE11.
There two types of search helps simple i.e Elementary search helps and complex i.e Collective Search helps.
When search helps are created a kind of view is created which contains various fields from different tables that act as search parameters
Search Helps Elementary search helps contain only one tab or screen that consists various fields as search parameters. Collective search helps are collection of elementary search helps. It contains numerous tabs depending upon the number of elementary search helps attached to it. Results obtained from collective search helps are much more refined than as compared to elementary search helps. Search helps are always associated with a dictionary object at its data element level. Both elementary or collective search helps can be associated to the data element.
Add Description Enter the table from which search parameter is to be picked Search parameter Elementary Search help Add Description Enter the names of elementary search helps Collective Search Help Various search parameters are entered Collective Search Help Assigning search helps Enter the name of the search help CHAPTER 11 Online Help, Documentation and Type Groups Documentation for Dictionary objects F1 help F4 help Data element documentation/ supplemental documentation Type groups
Online Help & Documentation F4: Possible Input Values F1: Field Help DE doc. DE supp. doc. Other documentation: Tables Structures Domains Data Element Documentation Table THLPF Program Screen Table/field No entry necessary DE Supplement number SCREENSHOT: SE61 TRANSACTION Create Documentation through F1 or Screen Painter Type Groups ABAP/4 Dictionary ABAP/4 Editor
PROGRAM XYZ.
TYPE-POOL . . . ABAP/4 Editor
PROGRAM 123.
TYPE-POOL . . . ABAP/4 Editor
PROGRAM ABC.
TYPE-POOL . . . TYPE GROUP Type Group ABAP/4 Editor ABAP/4 Dictionary ABAP/4 Program run-time selection screen
Mastering SQL Queries for SAP Business One: Exploit one of the most powerful features of SAP Business One with this practical guide to mastering SQL Queries. With the skills to quickly acquire business intelligence, your enterprise can gain the competitive edge.