Download presentation
1
Introduction to the ABAP Data Dictionary
2
Lecture Overview Describe the ABAP database layer and selected core tables
3
A First few SAP Tables T000 is the client table
T001 is the company code table Currency and language are defined here Accounting chart of accounts T006 is for measurement (unit of measure) There are tables for currency conversion BKPF and BSEG are the FI header and transaction tables
4
Getting Started with the ABAP Database Layer
Remember that we work with data logically through ABAP, rather than operating or the physical database We do not touch the underlying (native) database The database layer supplies extensive metadata beyond most native databases
5
Data Dictionary Transaction Codes
Transaction code SE16 gets us to the Data Browser Transaction code SE11 gets us to the ABAP Dictionary
6
Data Browser (Introduction)
The Data Browser allows us to display data from a table By default the cryptic field name is displayed in most screens Settings / User Parameters (Data Browser tab) allows you to select the field label
7
Data Browser (Select Table)
Select the desired table You need to know the table names and meaning of fields
8
Data Browser (Table Output)
9
Data Browser Search for table
10
The ABAP Dictionary (Accessing)
Transaction code SE11
11
ABAP Dictionary Elements
Tables Views A view is created from one or more tables Data types Data elements Structured types
12
ABAP Dictionary Elements (Illustration)
13
ABAP Dictionary Elements (Tables)
A superset of what we usually think of as a table There are different types of tables Transparent tables are used to store business data Pool tables and cluster tables generally store applications ABAP programs are stored in the database itself in pool and cluster tables We will not work with these
14
ABAP Dictionary Elements (Tables - Transparent)
Tables contain Fields having a field name and a data type Foreign keys describe relationships between other tables Technical settings describe how the table is created in the database Indexes are used to improve performance
15
ABAP Dictionary Elements (Views)
In general database terms, it’s a virtual table that is not physically stored SAP has different types of views based on the underlying fundamental database operations The SAP views are semantic (more later)
16
ABAP Dictionary Elements (Views – Types)
Database – These are views from one or many tables Projection views apply to only one table and restrict the number of fields to display Structure views are pretty much obsolete We will not talk about them here
17
Creating a Table (Steps)
Rules for table names Creating the table Creating the fields
18
Creating a Table (Table Names)
16 case insensitive characters Customer (created) tables should begin with the characters Z or Y You can use anything for a field name Create data element and domain names beginning with Z or Y Other namespaces (SAP) are letter sequences enclosed by slashes /SAPPRESS/
19
Creating a Table (Maintenance)
20
Creating a Table (Attributes)
Change and language information Packages group objects (including tables) They control transport behavior They organize objects Objects without a package cannot be transported
21
Creating a Table (Delivery and Maintenance)
Descriptive information The delivery class drives the transport of data records during install, upgrade, …
22
Creating a Table (Delivery and Maintenance)
The following controls dictionary rights
23
Creating a Table (Package)
The Package $TMP is a special local package
24
Domains / Data Elements / Fields
Most of you are used to database fields having some primary data type Integer, double , date, string, etc. SAP utilizes layers of indirection called domains and data elements A data element can be used in one or many table fields
25
Domains / Data Elements / Fields (Illustration)
Fields have a data element, which belongs to a domain
26
Domains A domain describes the technical attributes of a field
Data type Number of positions (size) Optional value range Fields belonging to a domain are changed if the domain is changed
27
Domains (Illustration)
The Domain BUKRS is the company code
28
Data Elements A data element is an elementary type It defines
Field label values Help information It may or may not belong to a domain If it does, then fields of the elementary type will change if the domain changes
29
Data Element (Illustration
30
Company Code (Example)
One of the core SAP concepts is the Company Code The domain BUKRS defines the company code as a CHAR (4)
31
Company Code (Example)
And the domain BUKRS is used in many places Where used button
32
Company Code (Example)
The Data element BUKRS belongs to the domain BUKRS
33
Company Code (Example)
And BUKRS is used in the following tables
34
Field Domains (Summary)
Field domains are themselves stored in a table So are table fields and data elements
35
Field Domains (Creating)
I prefer to create the domains and then create the fields Your book suggests forward navigation DON’T FORGET TO ACTIVATE THEM
36
Creating a Data Element (1)
Select the domain to which the element applies
37
Creating a Data Element (2)
This is where the field titles come from for forms and other places
38
Creating a Table (Fields)
Table fields work a bit differently in SAP In SAP fields belong to a domain It’s the domain that defines The data type The value range Domains must be activated before they can be used
39
Creating a Table (Fields)
40
Creating a Table (Fields)
Field name Key fields uniquely identify a row Composite keys can have a maximum of 16 key fields Give a field an initial value The Data Element field defines the field’s data type You can use predefined data types or create new ones
41
Dictionary Technical Settings (1)
With the desired table active, select GoTo, Technical Settings These technical settings describe how the system treats the table Data Class defines the ‘physical’ area of the database where the table is stored Master data, transactional data, organizational data
42
Dictionary Technical Settings (2)
Size category defines the number of records expected Buffering whether a record or table is buffered (prefetched into the work area) when accessed
43
Dictionary Technical Settings (Illustration)
44
Entering Data While the Display table screen is active, click Utilities / Table contents / Create Entries
45
Object Navigator It’s used to organize programing in the SAP integrated development environment Repository Browser is the primary code storage area The Repository Information System is used to search for programming objects The Transport Organizer manages changes made during configuration and development and propagates (transports) changes to test and production systems
46
Object Navigator (Illustration)
Select object type from Object List
47
Repository Browser (Object Lists)
The application hierarchy contains all development objects A package contains logically related development objects In this class, we will create local objects, which are not transported to QA / production systems
48
Packages (Contents) Packages contain many things
Programs containing fields, events, subroutines, screens, and so on Function groups are containers for functions (external procedure calls) Dictionary objects contain (roughly speaking) references to SAP data Remember, all data is processed through the SAP API SHOW PACKAGE FARC
49
Classes / Interfaces SAP supports an OOP approach to development using classes and interfaces
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.