Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

select SUM( ) in inner join - error in code

Hi All,

The following code is using ABAP OO and I get the following error

E:The addition "FOR ALL ENTRIES" excludes all aggregate functions with

the exception of "COUNT( * )", as the single element of the SELECT

clause.

Here is the Code:

select a/bic/ZEDM_ENTP amaterial a~/bic/zedm_stid

a/bic/ZEDM_SDT a/bic/ZEDM_MINH a~/bic/ZEDM_EHD

SUM( b~/bic/ZEDM_QPLN )

c~/bic/ZDEMQTY

from /bic/azdrp_1900 as a inner join /bic/azdrp_0400 as b

on

a/bic/ZEDM_ENTP = b/bic/ZEDM_ENTP and

amaterial = bmaterial and

a/bic/zedm_stid = bplant and

a/bic/ZEDM_SDT = b/bic/zedm_pshp

inner join /bic/azrp_0800 as C

on

amaterial = cmaterial and

a/bic/zedm_stid = c/bic/zedm_stid and

a/bic/ZEDM_SDT = c/bic/ZEDM_ESDT

into table z_it_inv for all entries in

RESULT_PACKAGE where

a~/bic/ZEDM_ENTP = RESULT_PACKAGE-/bic/ZEDM_ENTP

and a~material = RESULT_PACKAGE-material

and a~/bic/ZEDM_SDT = RESULT_PACKAGE-/BIC/OIZEDM_EDT

and a~/bic/zedm_stid = RESULT_PACKAGE-/BIC/OIZEDM_TOST

group by b/bic/ZEDM_ENTP bmaterial b~plant

b~/bic/zedm_pshp

Can you please tell me how to correct this?

Thanks

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question