ABAP Data Dictionary
ABAP Data Dictionary
Introduction
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 3
Features
The most important object types in the ABAP Dictionary are:
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.
Types :The structure of a type can be defined globally in ABAP programs. Changes to a type
automatically take effect in all the programs using the type.
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.
Source : SAP
Data elements : Describe an elementary type by defining the data type, length, and
possibly decimal places.
Structures: Consist of components that can have any type.
Table types: Describe the structure of an internal table.
Any complex user-defined type can be built from these basic types.
Tables
Source : SAP
▪ The domain is used for the technical definition of a table field (for example, field type and
length) and the data element is used for the semantic definition (for example short
description).
▪ A domain describes the value range of a field by its data type and length. The value range
can be limited by specifying fixed values.
▪ The data element contains primarily the field help (F1 documentation) and the field labels in
the screen.
▪ A field is not an independent object, but it is table-dependent. The field can only be maintained
within a table.
▪ You can enter the data type and number of places directly for a field. No data element is
required in this case. Instead, the data type and number of places is defined by specifying a
direct type.
▪ The data type attributes of a data element can also be defined by specifying a built-in type,
where the data type and number of places is entered directly.
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 8
Structures
Source : SAP
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 10
Data class
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 11
Size Category
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 13
3
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 15
Performance During Table Access
Structure of an Index
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 16
Improving the Performance through Table Buffering
▪ Table buffering increases the performance when the records of the table are read.
▪ The records of a buffered table are read directly from the local buffer of the application
server on which the accessing transaction is running when the table is accessed. This
eliminates time-consuming database accesses.
▪ The access improves by a factor of 10 to 100. The increase in speed depends on the
structure of the table and on the exact system configuration.
The buffering type determines which records of the table are loaded into the buffer of the
application server when a record of the table is accessed. There are the following buffering
types:
▪ Full buffering: When a record of the table is accessed, all the records of the table are
loaded into the buffer.
▪ Generic buffering: When a record of the table is accessed, all the records whose left-
justified part of the key is the same are loaded into the buffer.
▪ Single-record buffering: Only the record that was accessed is loaded into the buffer.
Fixed Values
©La rsen & Toubro Infotech Ltd. Privileged and Confidential Source : SAP 18
Value table
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 19
Foreign Key
▪ A combination of fields in a table is called a foreign key if this field combination is the primary key of
another table.
▪ The check table is the table whose key fields are checked. This table is also called the referenced table.
▪ An entry is to be written in the foreign key table. This entry must be consistent with the key fields of
the check table.
▪ The field of the foreign key table to be checked is called the check field.
▪ Foreign keys can only be used in screens. Data records can be written to the table
Object Dependencies
©La rsen & Toubro Infotech Ltd. Privileged and Confidential Source : SAP 22
5
Changes to Tables
▪ The database table can be adjusted to the changed definition in the ABAP Dictionary in three different
ways:
▪ By deleting the database table and creating it again. The table on the database is deleted, the inactive
table is activated in the ABAP Dictionary, and the table is created again on the database. Data existing
in the table is lost.
▪ By changing the database catalog (ALTER TABLE). The definition of the table on the database is simply
changed. Existing data is retained. However, indexes on the table might have to be built again.
▪ By converting the table. This is the most time-consuming way to adjust a structure.
Enhancement of SAP
Standard Tables
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 26
Append Structures 2
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 27
Append Structures 3
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 28
Enhancement of tables
▪ Structures and tables that have been defined by SAP in the ABAP Dictionary can be subsequently
enhanced by the customer in the following way:
Customizing Includes :
▪ With this variant, certain places within a structure or tables for enhancements are already reserved.
However, the associated Includes are first of all created by the customer.
Appends :
▪ With this variant, any fields without previous reservation are appended to the end of structures or
tables.
Views and
Maintenance Dialogs
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 31
Maintenance Views
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 32
Copy Tables
▪ Specify the primary table of the view on the tab page Tables/Join Conditions under Tables. Only those
tables can be included in the maintenance view, which are connected to the primary table (indirectly)
via the foreign key.
▪ If necessary, include other tables in the view. You can only include tables in a
maintenance view, which are connected to one another via foreign keys. Position the cursor on the
primary table choose Relationships. All existing foreign key relationships of the primary table are
displayed. Tick the desired foreign key and choose Copy.
▪ The secondary table involved in such a foreign key is copied in the view. The join conditions (foreign key
relationship and join condition) derived from the foreign keys are displayed.
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 34
View Clusters and Maintenance Views
Source : SAP
©La rsen & Toubro Infotech Ltd. Privileged and Confidential 35
8
Search
Help
©La rsen & Toubro Infotech Ltd. Privileged and Confidential Source : SAP 37
Mechanisms for the Input Help
©La rsen & Toubro Infotech Ltd. Privileged and Confidential Source : SAP 38