How can i use SUM aggregate in select query?
How can i use SUM function in Select Query and i want to store that value into itab.
types: begin of ty_vbap,
incluse type vbap,
sum type string,
end of ty_vbap.
data: i_vbap type TABLE OF ty_vbap,
w_vbap type ty_vbap.
SELECT sum(posnr) FROM vbap into table i_vbap up to 5 rows.
SELECT sum(posnr) FROM vbap into table i_vbap group by vbeln.
loop at i_vbap into w_vbap
" which variable have to use to display summed value.
if above code is not understandable pleas give ome sample code on above query.