26
ABAP Dictionary Objects March-2005 ABAP Dictionary Objects | 2.02

Chapter 02 abap dictionary objects1

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Chapter 02 abap dictionary objects1

ABAP Dictionary Objects

March-2005 ABAP Dictionary Objects | 2.02

Page 2: Chapter 02 abap dictionary objects1

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

Page 3: Chapter 02 abap dictionary objects1

Accessing the ABAP Dictionary

March-2005 ABAP Dictionary Objects | 2.02 3

DataDictionary

Use transaction code SE11 to access the ABAP Dictionary

Page 4: Chapter 02 abap dictionary objects1

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

Page 5: Chapter 02 abap dictionary objects1

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

Page 6: Chapter 02 abap dictionary objects1

March-2005 ABAP Dictionary Objects | 2.02 6

The Object Navigator is used to organize your programming in an integrated development environment

Object Navigator

Page 7: Chapter 02 abap dictionary objects1

Create a Table

March-2005 ABAP Dictionary Objects | 2.02 7

Enter a description (short text)

Maintain delivery class

Table maintenance attribute

Page 8: Chapter 02 abap dictionary objects1

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

Page 9: Chapter 02 abap dictionary objects1

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

Page 10: Chapter 02 abap dictionary objects1

Pre-Defined Data Elements

March-2005 ABAP Dictionary Objects | 2.02 10

SAP R/3 comes delivered with many pre-defined data elements

Page 11: Chapter 02 abap dictionary objects1

Create Data Element

March-2005 ABAP Dictionary Objects | 2.02 11

Enter a description (short text).

Enter domain name.

Page 12: Chapter 02 abap dictionary objects1

March-2005 ABAP Dictionary Objects | 2.02 12

Maintain field labels or column headers in the Field Label tab

Create Data Element (Contd.)

Page 13: Chapter 02 abap dictionary objects1

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

Page 14: Chapter 02 abap dictionary objects1

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

Page 15: Chapter 02 abap dictionary objects1

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

Page 16: Chapter 02 abap dictionary objects1

Allowed Values

March-2005 ABAP Dictionary Objects | 2.02 16

Value Table

Domain Domain

January

February

March . . . . . . .

December

Page 17: Chapter 02 abap dictionary objects1

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

Page 18: Chapter 02 abap dictionary objects1

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

Page 19: Chapter 02 abap dictionary objects1

March-2005 ABAP Dictionary Objects | 2.02 19

Create a Domain (Contd.)

Activate Icon

Assign Single Values

Assign Interval Values

Assign a Value Table

Page 20: Chapter 02 abap dictionary objects1

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”

Page 21: Chapter 02 abap dictionary objects1

March-2005 ABAP Dictionary Objects | 2.02 21

Maintain Technical Settings of a Table

Enter a Size Category

Enter a Data Class

Page 22: Chapter 02 abap dictionary objects1

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.

Page 23: Chapter 02 abap dictionary objects1

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.

Page 24: Chapter 02 abap dictionary objects1

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.

Page 25: Chapter 02 abap dictionary objects1

• 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

Page 26: Chapter 02 abap dictionary objects1

• 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