Select sum problem.
I have a problem with the 'select.. sum ..' clause.
the following is my code:
SELECT sgtxt sum( wrbtr ) FROM bsis INTO CORRESPONDING FIELDS OF TABLE it_temp WHERE bukrs = '1500' AND budat >= '20040131' AND budat <= q_date1 AND hkont = '0012420001' AND sgtxt >= 'ORD 300000' AND sgtxt <= 'ORD 399999' group by sgtxt .
but I can't get the sum value of the field 'wrbtr' ,is the 'CURR' type field couldn't sum in this clause?
You have to modify your code as mentioned below.
SELECT sgtxt sum( wrbtr ) as wrbtr
INTO CORRESPONDING FIELDS OF TABLE it_temp
WHERE bukrs = '1500'
AND budat >= '20040131'
AND budat <= q_date1
AND hkont = '0012420001'
AND sgtxt >= 'ORD 300000'
AND sgtxt <= 'ORD 399999'
group by sgtxt .
thanks & regards