‎2008 Apr 24 4:19 AM
Hi All,
I have a select statment from COPA,
SELECT
frwae
perio
SUM( VV123 ) as VV123
FROM CE1XXXX
INTO corresponding fields of table t_CE1XXXX
group by frwae perio.
I wish the each line of VV123 divided by the each KURSF and output the SUM.
I try
SELECT
frwae
perio
SUM( VV123 / KURSF ) as VV123
FROM CE1XXXX
INTO corresponding fields of table t_CE1XXXX
group by frwae perio.
but not work,
many thanks to all, points will be reward.
‎2008 Apr 24 4:24 AM
No, the ABAP syntax will not allow it. Basically you are confusing the Run-time first by specifying SUM but then calling a division function within it. First get the result by division then use SUM or first SUM then use division but you cannot use the aggregate function like that with ABAP.
Cheers,
Sougata.
‎2008 Apr 24 4:44 AM
Thanks, problem solved.
1. I will
Select vv010, KURSF from CE1XXX into Itab.
2. Then
Loop.
Result = VV010 / KURSF.
ENDLOOP.
‎2008 Apr 24 4:59 AM
Hi!!
Y are you trying to sum up in the select query itself.Better way will be use select query only for picking up the data in internal table.
Then loop at internal table.Divide each data by KURSF and then SUM them.
Hope this helps..if i understood ur query in write way.
Kindly reward points if helpful.
Regards
Deepika
Edited by: Deepika Singh on Apr 24, 2008 6:00 AM