GET … LATE Locate the document in its SAP Library structure

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 <table> LATE [FIELDS <f1> <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.

Example

The following program is connected to the logical database F1S.

REPORT EVENT_DEMO.

NODES: SPFLI, SFLIGHT, SBOOK.

DATA WEIGHT TYPE I VALUE 0.

START-OF-SELECTION.

WRITE 'Test Program for GET <table> 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 luggage weight is calculated for each flight in the event GET SBOOK, and then displayed in the list and reset in the event GET SFLIGHT LATE. Depending on the values you enter on the selection screen, the beginning of the list might look like this:

This graphic is explained in the accompanying text

 

 

 

Leaving content frame