Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Obsolete Language Elements →  Obsolete Processing of External Data →  Logical Databases (Obsolete) 

Logical Databases - Components

A logical database is a special development object that is edited in Logical Database Builder and which provides other ABAP programs with data from the nodes of a hierarchical tree structure. The most common purpose of logical databases is to extract data from database tables, however other applications are feasible.

Logical databases provide a hierarchical view across database tables associated using foreign key relationships. If parts of these relationships construct tree-like hierarchical structures, logical databases can read data from database tables that are components of these structures. In classic ABAP, logical databases are usually used in these hierarchical structures in accordance with the principle of input, processing, and output. The actual database reads are then wrapped in the logical database. The logical database reads the data, saves it locally in the program (if necessary) and passes it row by row to an interface work area.

As well as reusing predefined functions for reading data from database tables, logical databases can be implemented for further central tasks, such as defining uniform selection screens, central authorization checks, or making centralized enhancements to performance.

The main features of a logical database are

The structure defines the data view of the logical database. It generally inherits the given hierarchy of database tables defined by foreign key relationships and controls the order in which the data is passed to the application program. In this way, the structure determines how the other subobjects are constructed and the runtime behavior.
  • selections as a standalone standard selection screen
The selections define a standard selection screen to be used as a user interface for programs that use the logical database. The appearance of the screen is defined by the structure by default. The selections can be modified and enhanced to meet the requirements of the user.
The database program contains the ABAP statements for reading the data and passing it to an application program. It is basically a container for special subroutines in which the functions of the logical database are implemented. The reporting processor of the runtime environment calls these subroutines in the order defined by the structure. The database program is defined by the structure and the selections and can be modified or enhanced to meet the requirements of the user.

When an executable program is created, it can be assigned to a logical database using the Logical Database attribute. This allows the standard selection screen and the program flow to be combined with the selection screen and flow of the logical database.

Furthermore, logical databases can call the function module LDB_PROCESS. This function module can be used to call multiple logical database from a single program and nested as required. A logical database can also be called more than once in a program, if programmed accordingly.

Other versions: 7.31 | 7.40 | 7.54


Note

When creating a logical database in Logical Database Builder, the following order should be kept, since this then makes it easier to generate proposal for the remaining components from the those already created. Some of the most important properties of a logical database are defined at the same time as its structure. After the definition of the structure, a proposal is created for the selection include. The structure and selection include are used to generate a template for the database program. These components can then quickly be used to create a ready-to-run logical database, in which further requirements can be implemented.

  • Create the structure based on a root node.
  • Associate it with a search help.
  • Generate and edit the selection include.
  • Generate and edit the database program.
  • Edit further elements.
  • Continue

    Logical Databases - Structure

    Logical Databases - Selections

    Logical Databases - Database Program

    Logical Databases - Further Elements