Skip to Content
0
Former Member
May 14, 2013 at 09:07 AM

Is this ABAP statement correct ?

33 Views

Hello Colleague,

I am trying to sum number of seats available in a flight of same carrier type and putting in internal table.

I wrote this statement but sum is coming as 0.

DATA: t_sflight TYPE TABLE OF sflight.

SELECT carrid SUM( seatsmax ) FROM sflight INTO CORRESPONDING FIELDS OF TABLE t_sflight GROUP BY carrid.

If i do the same thing by creatting structure with only these two fields carrid seatsmax then it works fine.

Please let me know is above mentioned statement is correct or not ?

Regards,

Ravi