Post on 07-Nov-2014
description
ABAP Dictionary Objects
March-2005 ABAP Dictionary Objects | 2.02
Objectives
• The participants will be able to:– Access the ABAP Dictionary– Discuss the Basic Objects (Domain, Data Element,
Table etc.) of the ABAP Dictionary– Define and create a Table, Data Element, and
Domain
March-2005 ABAP Dictionary Objects | 2.02 2
Accessing the ABAP Dictionary
March-2005 ABAP Dictionary Objects | 2.02 3
DataDictionary
Use transaction code SE11 to access the ABAP Dictionary
March-2005 ABAP Dictionary Objects | 2.02 4
Basic Objects of the ABAP Data Dictionary
Table CTable BTable A
Data Element 1 Data Element 2
DomainDomain
Tables
March-2005 ABAP Dictionary Objects | 2.02 5
Tables store the information that is in the database.
They consist of rows (records) and columns (fields).
TABLE KNA1(Customers)
NAME1 ORT02 MANDT KUNNR
Table: KNA1Table: KNA1Table: KNA1Table: KNA1
March-2005 ABAP Dictionary Objects | 2.02 6
The Object Navigator is used to organize your programming in an integrated development environment
Object Navigator
Create a Table
March-2005 ABAP Dictionary Objects | 2.02 7
Enter a description (short text)
Maintain delivery class
Table maintenance attribute
Two-Level Domain Concept
March-2005 ABAP Dictionary Objects | 2.02 8
Data Element 1Data Element 1 Data Element 2Data Element 2
DomainDomain
In SAP R/3, a field is defined by being assigned to a data element, which is in turn assigned to a domain
March-2005 ABAP Dictionary Objects | 2.02 9
Data Element 1Data Element 1
Table BTable A
A data element provides a meaningful description for a field
Data Elements
Pre-Defined Data Elements
March-2005 ABAP Dictionary Objects | 2.02 10
SAP R/3 comes delivered with many pre-defined data elements
Create Data Element
March-2005 ABAP Dictionary Objects | 2.02 11
Enter a description (short text).
Enter domain name.
March-2005 ABAP Dictionary Objects | 2.02 12
Maintain field labels or column headers in the Field Label tab
Create Data Element (Contd.)
Data Element Documentation
March-2005 ABAP Dictionary Objects | 2.02 13
In addition to providing field descriptions and headers, data elements can provide detailed field documentation
Domains
March-2005 ABAP Dictionary Objects | 2.02 14
A domain specifies the technical characteristics and the allowed values of a field
Domains are linked to fields via data elements
Table ATable A
Data Elements
Domain
Characteristics of Domains
March-2005 ABAP Dictionary Objects | 2.02 15
Domains can exist independently in the ABAP Dictionary Multiple data elements may be assigned to the same
domain Pre-defined domains exist in the SAP system Domains can also specify a field’s output characteristics
Table ATable A
Data Elements
Domain
Allowed Values
March-2005 ABAP Dictionary Objects | 2.02 16
Value Table
Domain Domain
January
February
March . . . . . . .
December
March-2005 ABAP Dictionary Objects | 2.02 17
validvalues
invalidvalues
By defining valid values for a domain, automatic validation is provided for any fields that point to that domain
Benefits of Using Allowed Values
March-2005 ABAP Dictionary Objects | 2.02 18
Enter a description (short text).
Enter data type
Enter the number of characters allowed for this domain
Create a Domain
March-2005 ABAP Dictionary Objects | 2.02 19
Create a Domain (Contd.)
Activate Icon
Assign Single Values
Assign Interval Values
Assign a Value Table
March-2005 ABAP Dictionary Objects | 2.02 20
Add Fields to Table
Enter Data Element “ZXXFIRSTNAME”
Check the Primary Key Checkbox
Enter the Field Name “FIRSTNAME”
March-2005 ABAP Dictionary Objects | 2.02 21
Maintain Technical Settings of a Table
Enter a Size Category
Enter a Data Class
Demonstration
March-2005 ABAP Dictionary Objects | 2.02 22
Creation of a transparent table using transaction SE11 along with the relevant data-element and domains.
Practice
March-2005 ABAP Dictionary Objects | 2.02 23
Creation of a transparent table using transaction SE11 along with the relevant data-element and domains.
Using a Table in Program Code
March-2005 ABAP Dictionary Objects | 2.02 24
TABLES: YEMPLOY.
SELECT *FROM YEMPLOY.
WRITE: / YEMPLOY_IDYEMPLOY_NAMEYEMPLOY_SALARY
ENDSELECT.
• Use transaction code SE11 to access the ABAP Dictionary• The basic objects of the ABAP Dictionary are tables, data elements, and
domains• Tables are the objects that actually hold the information in a database• A data element provides a meaningful description for a field• A domain specifies the technical characteristics and the allowed values
of a field
March-2005 ABAP Dictionary Objects | 2.02 25
Summary
• What is the transaction to access the ABAP Dictionary ?
• What is a data element ?• What is a domain ?• What is a value table in a domain ?
March-2005 ABAP Dictionary Objects | 2.02 26
Questions