Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

group by syntax does not work in inner join statement

$
0
0

Hi all,

 

I need to make a select statement and group by 3 given fields namely batch material and plant. Following is my statement and I am getting the error:

 

Error message:

The field "C~MAKTX" from the SELECT list is is missing in the GROUP BY

clause. missing in the GROUP BY clause. missing in the GROUP BY clause.

is missing in the GROUP BY clause. is missing in the GROUP BY clause.

is "C~MATNR".

 

Anyone knows whether group by can be used in inner join or have I put in wrongly?

 

   SELECT a~charg
         a~matnr
         a~werks
         a~menge
         a~kdauf
         a~shkzg
         b~matkl
         c~maktx
  INTO CORRESPONDING FIELDS OF TABLE lt_product
  FROM aufm AS a
  INNER JOIN mara AS b
  ON  a~mandt = b~mandt
  AND a~matnr = b~matnr
  INNER JOIN makt AS c
  ON  b~mandt = c~mandt
  AND b~matnr = c~matnr
  WHERE a~charg IN s_batch
  AND   a~werks EQ p_plant
  AND ( a~bwart = '101' OR a~bwart = '102' )
  GROUP BY a~charg a~matnr a~werks.


Viewing all articles
Browse latest Browse all 9159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>