Você está na página 1de 32

DATA DICTIONARY

What is DDIC ?
Acts as interface or a logical layer to the underlying database Also called as DDIC and ABAP Dictionary The ABAP Dictionary is completely integrated in the ABAP Development Workbench.

Functions of the ABAP Dictionary


Important functions provides tools for data manipulation and data definition (Metadata) Definition of global data types Objects for application development such as input help, locking

Database Objects in the ABAP Dictionary


VIEW

Objects are automatically created on the database and adjusted to changes


Table 2

Table 1

ABAP Dictionary Database

Type Definitions in the ABAP Dictionary


Employee

Name

Address

Telephone

First Name

Surname

Town

Address

Numbers

ZIP

Town Name

Street

House No.

Services of the ABAP Dictionary


Carrier No. 0400 0402 2402 Dep. City Frankfurt Frankfurt Frankfurt Arr. City New York New York Berlin

Maintenance of flights
Carrier : Flight number : F1

F4 Flight connection code Code, which defines a flight connection between two cities say 0400 Frankfurt-New York

Central Definitions in the Dictionary


ABAP Tools ABAP/Screen Interpreter

Reads type definitions

ABAP Dictionary

Database Interface Reads structure of the database objects

Tables and Fields


Table name
Key 1 Key 2 Key n F1 F2 Fn
Rows
. . . . . . . . . . . . . . . . . .

Key Fields

Function Fields

Basic Objects of the ABAP Dictionary


Table
Field Column

Uses

Data Element

Uses

Domain

Domain
Describes the technical attributes of a field Domains are attached to Data Elements Defines a value range which describes the valid data values for all the fields which refer to this domain

Fixed Values and Value Table

Two-Level Domain Concept


Table Spfli
CLIENT CARRID CONNID .. AIR FROM AIR TO

Data element S_FROMAIRP

Data element S_TOAIRP

Domain S_AIRPID

Data Element
Data Element describes the meaning of a domain in a certain business context.

Data Element
Data element contains primarily the field help(F1 documentation) and the field label in the screen. Information about the meaning of a table field or structure component can be assigned to a data element(Ex:Field Labels).

Delivery and Maintenance


Delivery class
The delivery class controls the transport of table data when installing or upgrading, in a client copy and when transporting between customer systems. The delivery class is also used in the extended table maintenance.

Delivery and Maintenance


This indicator specifies whether it is possible to display/maintain a table or view using the maintenance tools Data Browser (transaction SE16) and table view maintenance (transactions SM30 and SM31).

Technical Settings
Under Technical settings we specify the following :
Data class : In what physical area of the database should the table be stored. Size category : Determines size of next extent. Buffering : Should the records of the table be buffered ? Logging : Should all the data changes for this table be logged.

Data class

Database

Size Category

Logging

Currency & Quantity Fields

Tables in the database

Structures
A structure is data type in dictionary Structure definition consists of group of components (fields) Does not have any physical storage in database Can be nested As a global data type in programs Can be reused in the definition of tables

Uses:

Includes
Structures can be included in tables or other structures to avoid redundant structure definitions.

Depth of Includes

Include vs Append Structures


Include structure Provides reusability of fields

Cannot be done on standard tables


Append structure:

To enhance tables in SAP


Not reusable Fields must start with zz or yy

Foreign Keys
Foreign Keys Enforce referential integrity Provide input help Create aggregate dictionary objects
Prerequisites: Primary key and foreign key field must share the same domain

Foreign Keys

Foreign key fields / Check fields

Cardinality
1:1
Check table Foreign key table Check table

1:N
Foreign key table

Cardinality
1:C
Check table Foreign key table Check table

1 : CN
Foreign key table

Summary
ABAPDictionaryContinued.

Você também pode gostar