Skip to Content
0
Former Member
May 10, 2005 at 06:00 PM

Upgrade Problem

27 Views

Hi,

We are porting our codes to a 5.0 environment and getting the following error. The codes work fine in 4.0B.

Rajib

Error: The addition "FOR ALL ENTRIES" excludes all aggregate functions with the exception of "COUNT( * )" as the single element of the SELECT clause.

DATA: BEGIN OF IT_OBJNUM OCCURS 0,

COSTCTR LIKE CSKS-KOSTL,

OBJNR LIKE CSKS-OBJNR,

END OF IT_OBJNUM.

SELECT KSTAR OBJNR WRTTP SUM( WKG001 ) SUM( WKG002 ) SUM( WKG003 )SUM( WKG004 ) SUM( WKG005 ) SUM( WKG006 ) SUM( WKG007 )SUM( WKG008 ) SUM( WKG009 ) SUM( WKG010 ) SUM( WKG011 )SUM( WKG012 )

FROM COSP

INTO TABLE IT_BUDACT

FOR ALL ENTRIES IN IT_OBJNUM

WHERE OBJNR = IT_OBJNUM-OBJNR

AND GJAHR = P_YEAR

AND ( WRTTP = K_TYPE1 OR WRTTP = K_TYPE2 )

AND VERSN = K_VERSION

GROUP BY KSTAR OBJNR WRTTP.