Homelab, Linux, JS & ABAP (~˘▾˘)~
 

[ABAP] Sum column using reduce with where condition

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 ).

Leave a Reply

Your email address will not be published. Required fields are marked *