GET dbtab

GET

Additions:

1. ... LATE
2. ... FIELDS f1 ... fn


Gets the table dbtab for processing while the logical database is running. You can address all the fields from dbtab in the subsequent processing. You can also refer to fields from tables in the logical database on the access path to the table dbtab.

Notes

You can use the event "GET dbtab." only once in the report.

The GET events are implemented internally as FORM routines. This makes all data objects declared with DATA local, that is, they are only recognized and addressable within the event. This also applies to AT SELECTION-SCREEN ....

Example

The program uses the logical database F1S which has a structure where the table BOOKING appears below the table FLIGHT.

TABLES: SFLIGHT, SBOOK. 
 
GET SFLIGHT. 
  WRITE: SFLIGHT-CARRID, 
		 SFLIGHT-CONNID, 
		 SLFIGHT-FLDATE, 
		 SFLIGHT-PLANETYPE. 
 
GET SBOOK. 
  WRITE: SBOOK-BOOKID, 
		 SBOOK-CUSTOMID, 
		 SBOOK-ORDER_DATE.

Effect

Executes the code following "GET dbtab LATE." only when all the subordinate tables have been read and processed.

TABLES: SFLIGHT, SBOOK. 
DATA SMOKERS TYPE I. 
 
GET SFLIGHT. 
  ULINE. 
  WRITE: / SFLIGHT-SEATSMAX, 
		 SFLIGHT-SEATSOCC. 
  SMOKERS = 0. 
 
GET SBOOK. 
  CHECK SBOOK-SMOKER <> SPACE. 
  ADD 1 TO SMOKERS. 
 
GET FLIGHT LATE. 
  WRITE SMOKERS.

Effect

Performance option. Addresses only the fields f1, ..., fn of the table dbtab (also possible with a dynamic ASSIGN ). Since only these fields have to be assigned values by the logical database, this can improve performance considerably.

The addition (for GET dbtab or GET dbtab LATE) is allowed only for tables intended for field selection by the logical database ( SELECTION-SCREEN FIELD SELECTION FOR TABLE dbtab).

Specify the necessary fields under GET. Both SFLIGHT and SBOOK must be defined for field selection.

TABLES: SFLIGHT, SBOOK. 
 
GET SFLIGHT FIELDS CARRID CONNID FLDATE PLANETYPE. 
  WRITE: SFLIGHT-CARRID, 
		 SFLIGHT-CONNID, 
		 SFLIGHT-FLDATE, 
		 SFLIGHT-PLANETYPE. 
 
GET SBOOK FIELDS BOOKID CUSTOMID ORDER_DATE. 
  WRITE: SBOOK-BOOKID, 
		 SBOOK-CUSTOMID, 
		 SBOOK-ORDER_DATE.
TABLES: SFLIGHT, SBOOK. 
DATA SMOKERS TYPE I. 
 
GET SFLIGHT. 
  ULINE. 
  WRITE: / SFLIGHT-SEATSMAX, 
		 SFLIGHT-SEATSOCC. 
  SMOKERS = 0. 
 
GET SBOOK FIELDS SMOKER. 
  CHECK SBOOK-SMOKER <> SPACE. 
  ADD 1 TO SMOKERS. 
 
GET SFLIGHT LATE FIELDS SEATSMAX SEATSOCC. 
  WRITE SMOKERS.
TABLES: SBOOK. 
 
GET SBOOK FIELDS BOOKID CUSTOMID ORDER_DATE. 
  WRITE: SBOOK-BOOKID, 
		 SBOOK-CUSTOMID, 
		 SBOOK-ORDER_DATE.
TABLES: SFLIGHT, SBOOK. 
 
GET SBOOK FIELDS BOOKID CUSTOMID ORDER_DATE. 
  WRITE: SBOOK-BOOKID, 
		 SBOOK-CUSTOMID, 
		 SBOOK-ORDER_DATE.

Related

PUT