* event handler for data retrieval
  SELECT * FROM spfli INTO ispfli
    WHERE cityfrom = 'FRANKFURT'
    AND   cityto   = 'NEW YORK'.
    wa2-fltime = ispfli-fltime.
    SELECT * FROM sflight INTO isflight
      WHERE carrid = ispfli-carrid
      AND   connid = ispfli-connid
      AND   fldate BETWEEN wa1-vondatum AND wa1-bisdatum.
      wa2-seatsfree = isflight-seatsmax - isflight-seatsocc.
      MOVE-CORRESPONDING isflight TO wa2.
      APPEND wa2 TO itab.
    ENDSELECT.
  ENDSELECT.
