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

Logical Databases - Call by Function Module

How the Call Works

Logical databases can be called from any ABAP program using the function module LDB_PROCESS. Multiple logical databases can be called at the same time and a single logical database can be called more than once in the same executable program.

When a logical database is called using the function module LDB_PROCESS, the selection screen of the logical database is not displayed and is filled using interface parameters of the function module instead. The logical database does not trigger any GET events and passes the extracted data to callback routines during the call instead. This means that logical database calls using LDB_PROCESS disconnect the collection of data from the processing of the selection screens and the subsequent data preparation.

The logical databases do not need to be modified to do this, however the following restrictions apply:

These restrictions can be lifted by inserting the subroutines ldb_process_init and ldb_process_check_selections in the database program.

Runtime Behavior

When called using the function module LDB_PROCESS, the subroutines of the logical database are called in the following order:

  1. ldb_process_init
  2. init
  3. ldb_process_check_selections
  4. put_node

None of the subroutines used for selection screen processing when associated with executable programs are called and the runtime environment does not trigger any reporting events in the calling program. Instead, the PUT statements of the logical database trigger actions in the function module that produce callback routine calls in the caller program.

Interface Parameter of LDB_PROCESS

Import Parameter

Table Parameters

If multiple selections are passed at the same time using multiple parameters, values passed in SELECTIONS and EXPRESSIONS overwrite the values in VARIANT.

Read Depth and Callback Routines

If a logical database is associated with a logical database, the GET statements determine the read depth of the logical database. If the function module LDB_PROCESS is used for calls, the read depth is determined by the node name passed to the parameter CALLBACK. A callback routine can be executed at two points in time for each node that requests data. These times match GET and GET LATE in executable programs. For each node, the name of the associated callback routine and the required times are specified in the table parameter CALLBACK. A callback routine is a subroutine in the caller program or in another program.

For the event GET, the callback routine is called directly after the data of the node is read and before the processing of the lower subtree. For the event GET LATE, the callback routine is called after the lower subtree is processed.

The row type of the table parameter CALLBACK is the flat structure LDBCB from ABAP Dictionary, with the following components:

When an internal table is passed to the parameter CALLBACK, at least on of the columns GET or GET_LATE must be filled with "X" for each node.

A callback routine is a subroutine defined using the following parameter interface:

FORM subr USING node TYPE ldbcb-ldbnode
                wa   [TYPE t]
                evt
                check.

When called, the parameters are filled using the function module LDB_PROCESS and have the following meaning:

Exceptions in LDB_PROCESS

The other exceptions are explained in the documentation of the function module.

Example

See Logical Database, Call by Function Module