Abap Dictionary
Abap Dictionary
ABAP Dictionary to create and manage data definitions (metadata). The ABAP
Dictionary permits a central description of all the data used in the system without
redundancies
DATABASE Tables
Tables are defined in the ABAP Dictionary independently of the database. From
this table definition follows the creation of a table with the same structure in the
underlying database.
Views
Views are logical views of more than one table. The structure of the view is
defined in the ABAP Dictionary. A view of the database can then be created from
this structure.
Data Type
Type Group
Lock objects
These objects are used to synchronize access to the same data by more than one
user. Function modules that can be used in application programs are generated
from the definition of a lock object in the ABAP Dictionary.
Domains
Different fields having the same technical type can be combined in domains. A
domain defines the value range of all table fields and structure components that
refer to this domain.
Search Help
DATABASE TABLE
Tables can be defined independently of the database in the ABAP Dictionary. The
fields of the table are defined with their (database-independent) data types and
lengths.
When the table is activated, the system creates a physical table definition in the
database for the table definition stored in the ABAP Dictionary. The system
translates the table definition from the ABAP Dictionary to a definition of the
particular database. You can see these relations between the ABAP Dictionary and
the database in the following figure.
Transparent Table
Pooled Table
Cluster Table
Transparent Table
R3 Table
Both table will have same table name, same no of fields and same field name.
Pooled Table
R3 R3 R3
Cluster Table
R3 R3 R3
You must define the following for a table field in the ABAP Dictionary:
Field name - The field name can have a maximum of 16 places and can
contain letters, digits and underscores. The field name must begin with a
letter.
Key flag - Determines whether the field belongs to the table key.
Initial Value Indicator - Set this indicator if a field must have an initial
value.
Field type - Data type of the field in the ABAP Dictionary.
Field length - Determines the number of valid places in the field.
Decimal places - The number of places after the decimal point, specifying
numeric data types.
Short description - Short text describing the meaning of the field.
To create table
Top down Approach
Bottom to top Approach
Domain: It describes the technical characteristics of the field like data type and
length. Fixed values and intervals can be specified.
Data Element: It describes the semantic characteristic of field like help document
and field label.
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.
The data class defines the physical area of the database (for ORACLE the
TABLESPACE) in which your table is logically stored. If you choose a data class
correctly, your table will automatically be assigned to the correct area when it is
created on the database.
The most important data classes are (other than the system data):
Organizational und customizing data is data which is defined when the system is
initialized and then rarely changed.
There are two more data classes available, USR and USR1. These are reserved for
user developments. The tables assigned to these data classes are stored in a
tablespace for user developments.
Note:The data class only has an effect on table storage for the database systems
ORACLE and INFORMIX.
Buffering Permission
You must define whether and how a table is buffered in the technical settings for
the table. There are three possibilities here:
Table buffering is not allowed. You use this option when, for example,
application programs always need the most recent data from the table or the table
is changed too frequently.
The table is buffered. In this case you must specify a buffering type.
Buffering Types
The buffering type defines which table records are loaded into the buffer of the
application server when a table record is accessed. The following buffering types
exist:
Full buffering:
The system loads all the records of the table into the buffer when one record of
the table is accessed.
Generic buffering:
When a record of the table is accessed, all the records having this record in the
generic key fields (part of the table key that is left-justified, identified by
specifying a number of key fields) are loaded into the buffer.
Single-record buffering:
Only the records of a table that are really accessed are loaded into the buffer.
Foreign Keys
You use foreign keys to define relationships between tables in the ABAP
Dictionary, create value checks for input fields and link several tables in a view or
a lock object.
Views
Often several database tables contain the data about an application object. A
database view provides an application-specific view of such distributed data.
Database views are defined in the ABAP Dictionary. The system automatically
creates a database view in the underlying database when you activate the view.
It is used for join more than one table, only relationship table can be joined.
Projection Views
You use projection views to hide fields of a table. This can minimize interfaces.
For example, when you access the database, you read and write only the field
contents actually needed.
TYPE GROUP
It is type “T - TYPE-POOL” program, used for declaring global data types and
constants.
We can declare variable, structure and internal table. The type group name must be
used as prefix for the declaration of var, structure, internal table.
After that, you define data types using the statement TYPES. It was also possible
to define global constants using the CONSTANTS statement. All the names of
these data types and constants must begin with the name of the type group and an
underscore: pool_
These Type Group can be used as reference in any ABAP workbench objects.
In an ABAP program, you must declare a type group as follows before you can use
it:
TYPE-POOLS <pool>.
This statement allows you to use all the data types and constants defined in the
type group pool in your program. You can use several type groups in the same
program.
TYPE-POOL ZDIVS .