2009 May 27 9:08 AM
Hi
I have this error in my code.
Unknown column name "SUM(EKBE-MENGE)" field list. field list. field
My code
*Select sum(ekbe-menge)
into MCSTRUCT-ZQuant
from ekbe*
How do I resolve this.
thanks
2009 May 27 9:09 AM
try like this
*Select sum(menge)
into MCSTRUCT-ZQuant
from ekbe*
2009 May 27 9:10 AM
Hi,
Do not use the table name with in the braces, only use the field name
Thanks
Sudheer
2009 May 27 9:11 AM
use just columnname. maybe you even need a space before and after it.
Edited by: Florian Kemmer on May 27, 2009 10:11 AM
2009 May 27 9:12 AM
Hi Bhat Vaidya,
DATA : v_menge TYPE ekbe-menge.
SELECT SUM( menge )
INTO v_menge
FROM ekbe.
Regards,
Suneel G
2009 May 27 9:13 AM
hi,
Select sum(menge) into MCSTRUCT-ZQuant from ekbe .
endselect.
2009 May 27 9:14 AM
are you sure an aggregate function will work with an select endselect?
2009 May 27 9:23 AM
i m sorry.
data : begin of it_data occures 0,
ebeln like ekbe-ebeln,
ebelp like ekbe-ebelp,
menge like ekbe-menge,
end of it_data .
Select ebeln ebelp sum(menge) into it_data from ekbe Group by ebeln, ebelp .
2009 May 27 11:03 AM
Hi experts
Thanks all for your help
I used this code with space and apersand and it resolve the issue.
SELECT SUM( ekbe~menge )
Much appreciated.
thanks
2009 May 27 11:13 AM
Hi,
If you use tilde you will hit performance issue.
DATA : v_menge TYPE ekbe-menge.
SELECT SUM( ekbe~menge )
INTO v_menge
FROM ekbe.
Regards,
Suneel G
2009 May 27 11:07 AM
Select sum*(* ekbe-menge *)*
into MCSTRUCT-ZQuant
from ekbe
maintain the single space between the field and the brackets. that should do.