Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

help in ECC6.0

Former Member
0 Kudos

Dear all,

I am using following select stmt in 4.0B, It is working fine, When I use same Select stmt in ECC6.0, I am getting error.

SELECT MATNR WERKS SUM( LABST ) FROM MARD INTO TABLE TMARD FOR ALL ENTRIES IN T_VBAP

WHERE MATNR = T_VBAP-MATNR

AND WERKS EQ T_VBAP-WERKS

AND LVORM EQ SPACE

AND LGORT NE 'ST02'

GROUP BY MATNR WERKS.

Can any one help me.

Thanks,

5 REPLIES 5

Former Member
0 Kudos

can you please explain what exactly the error message you are getting in ECC 6.0

0 Kudos

Hi,

This is the msg

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

Thanks

0 Kudos

you cannot use aggregate functions like SUM along with FOR ALL ENTRIES even in 4.6 and you will get the following error message when you check in 4.6 or ECC 6.0:

The addition "FOR ALL ENTRIES" excludes all aggregate functions with the exception of "COUNT( * )".

Regards,

Raman.

0 Kudos

Use like this without SUM it will work:

SELECT MATNR WERKS FROM MARD INTO TABLE TMARD FOR ALL ENTRIES IN T_VBAP

WHERE MATNR = T_VBAP-MATNR

AND WERKS EQ T_VBAP-WERKS

AND LVORM EQ SPACE

AND LGORT NE 'ST02'

GROUP BY MATNR WERKS.

Regards,

Raman.

0 Kudos

Hi,

Thanks for reply,

Can you pls suggest me alternative Select stmt for that.

Thanks a lot.