Application Development and Automation 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: 
Read only

help in ECC6.0

Former Member
0 Likes
693

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
Read only

Former Member
0 Likes
677

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

Read only

0 Likes
677

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

Read only

0 Likes
677

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.

Read only

0 Likes
677

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.

Read only

0 Likes
677

Hi,

Thanks for reply,

Can you pls suggest me alternative Select stmt for that.

Thanks a lot.