‎2008 Apr 04 10:56 AM
I want to sum up 3 different fields from a table using aggregate function "sum". But in a single select stmt.
e.g In table PLPO i want to sum up 3 different quantity fields i.e.
vgw01 vgw02 vgw03 in a single select stmt and not 3 select stmts.
e.g.
for summing up one column.......................
select sum( vgw01 ) from plpo
into corresponding fields of table t_assem_cal
where plnnr = itab-plnnr.
can i sum up all above column in one select stmt.
‎2008 Apr 04 11:05 AM
Hi,
Please use COLLECT STATMENT will achive ur requirement...
Regards,
Sreenivasa sarma k.
‎2008 Apr 04 12:09 PM
Try this code ho[pe it will help.....
select sum( vgw01 )
sum( vgw02 )
sum( vgw03 )
plnnr
into corresponding fields of table t_assem_cal
from plpo
where plnnr = itab-plnnr
group by plnnr.
Reward if helpful
-Sudhanshu
‎2008 Apr 04 12:20 PM