‎2007 Jun 21 3:31 PM
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,
‎2007 Jun 21 3:35 PM
can you please explain what exactly the error message you are getting in ECC 6.0
‎2007 Jun 21 3:40 PM
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
‎2007 Jun 21 3:43 PM
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.
‎2007 Jun 21 3:45 PM
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.
‎2007 Jun 21 3:46 PM
Hi,
Thanks for reply,
Can you pls suggest me alternative Select stmt for that.
Thanks a lot.