Show TOC

GET … LATELocate this document in the navigation structure

GET … LATE

This event is triggered when all of the data records for a node of the logical database have been read.

When you define the corresponding event block in the program, you can - as with GET -specify a field list if the logical database supports field selection for this node:

GET node LATE [FIELDS f 1 f 2 ...].

You can use the event block for processing steps that should occur at the end of the block, like, for example, calculating statistics.

Tip

The following executable program is connected to the logical database F1S.

REPORT demo_program_get_late.

NODES: spfli, sflight, sbook.

DATA weight TYPE i VALUE 0.

START-OF-SELECTION.

 WRITE 'Test Program for GET node LATE'.

GET spfli.

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

GET sflight.

 SKIP.  WRITE: / 'Date:', sflight-fldate.

GET sbook.

 weight = weight + sbook-luggweight.

GET sflight LATE.

 WRITE: / 'Total luggage weight =', weight.  ULINE.  weight = 0.

The total weight is calculated for each flight in the event, then issued in the output list in the event GET sflight LATE and reset. Depending on what you enter on the selection screen, the beginning of the list display might look like this: