Skip to content

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

Logical Database, Associated with a Program

This example demonstrates how a logical database is associated with an executable program.

Other versions: 7.31 | 7.40 | 7.54

Source Code

REPORT demo_report.

NODES: spfli, sflight, sbook.

DATA: weight       TYPE p LENGTH 8 DECIMALS 4,
      total_weight TYPE p LENGTH 8 DECIMALS 4.

  carrid-sign = 'I'.
  carrid-option = 'EQ'.
  carrid-low = 'AA'.
  carrid-high = 'LH'.
  APPEND carrid TO carrid.

  WRITE 'Luggage weight of flights'.

GET spfli FIELDS carrid connid cityfrom cityto.
  WRITE: / 'Carrid:', spfli-carrid,
           'Connid:', spfli-connid,
         / 'From:  ', spfli-cityfrom,
           'To:    ', spfli-cityto.

GET sflight FIELDS fldate.
  WRITE: / 'Date:', sflight-fldate.

GET sbook FIELDS luggweight.
  weight = weight + sbook-luggweight.
GET sflight LATE FIELDS carrid .
  WRITE: / 'Luggage weight =', weight.
  total_weight = total_weight + weight.
  weight = 0.

  WRITE: / 'Sum of luggage weights =', total_weight.


This example shows a typical report where the logical database F1S is assigned to its properties.