SELECT * FROM sflight INTO TABLE @DATA(lt_sflight).
DATA(a319_paymant_sum) = REDUCE #( INIT sum = 0
FOR flight IN lt_sflight WHERE ( planetype = 'A319' )
NEXT sum += flight-paymentsum ).