Skip to content

ABAP Keyword Documentation →  ABAP - Dictionary →  Classic Objects in ABAP Dictionary 

Database Tables

In ABAP Dictionary, the term "database table" (or table for short) is the database-independent definition of a database table.

  • A database table is a two-dimensional matrix which consists of rows and columns (fields).
  • A field or combination of fields that uniquely identifies every row in a table is known as a table key. This is a minimal attribute: if one of the fields is removed from the key, the remaining fields cannot uniquely identify the table rows.

In ABAP SQL, only those database tables can be accessed that are defined in ABAP Dictionary.

The name of a database table in ABAP Dictionary can have a maximum of 16 characters, can consist of letters, numbers, and underscores, must start with a letter, and can be prefixed by a namespace prefix (/.../) from a prefix namespace. It is located in the namespace of the data types in ABAP Dictionary and in the namespace of the global object types in the class library.

The definition of a database table consists of the following:

The most common table category of database table is the transparent table. When the table is activated, the platform-specific SQL DDL statement CREATE TABLE is used to generate a physical database table with all indexes from its definition in ABAP Dictionary (if this is not excluded explicitly in the definition). This is done in the ABAP database schema in the standard AS ABAP database. The built-in types in ABAP Dictionary used to define the components of the structure are implemented as database-specific types. The definition of a table in the database can be displayed in ABAP Dictionary by choosing Utilities → Database Object. As well as normal transparent tables, there are also special global temporary tables (GTTs) for saving temporary data within a work step.

The order of the fields in ABAP Dictionary and on the database does not need to match. More specifically, the order of the table fields (with the exception of key fields) of existing database tables in the dictionary can be modified without modifying the database object. When using ABAP SQL, this is handled accordingly in the database interface and the order in ABAP Dictionary always applies. When using Native SQL, the order of the columns in the database system must be applied explicitly. If AMDP is used, the results are placed in the same order as in ABAP Dictionary (if possible).

Database tables can be defined as
form-based structures in transaction SE11 or as source-code-based structures using Dictionary DDL in the ABAP Development Tools. The following section is a summary of the syntax of the source code-based definition:

If existing database tables are modified, conversions may be necessary.

Other versions: 7.31 | 7.40 | 7.54


Notes

Continue

Technical Attributes of Database Tables

Semantic Attributes of Database Tables

Global Temporary Tables

Dictionary DDL for Defining Database Tables

Converting Database Tables