Hallow I doing a select statement for count but its not write I have a error what I doing wrong in this select
<b>SELECT orgeh COUNT( * ) AS orgeh
FROM pa0001
INTO TABLE count_itab
GROUP BY orgeh</b>
WHERE ( persg EQ '6' OR persg EQ '7' OR persg EQ '8' )
AND stell = 'A'
AND orgeh NE '00009999'
AND orgeh = 'Z'.
regards
Hi,
Try this code and kindly reward points by clicking the star on the left of reply,if it helps.
data : begin of count_itab,
orgeh type pa0001-orgeh,
count type i,
end of count_itab.
SELECT orgeh COUNT( * )
FROM pa0001
INTO TABLE count_itab
WHERE ( persg EQ '6' OR persg EQ '7' OR persg EQ '8' )
AND stell = 'A'
AND orgeh NE '00009999'
AND orgeh = 'Z'
GROUP BY orgeh.
Hi,
Try this
SELECT orgeh COUNT( * ) FROM pa0001 INTO TABLE count_itab WHERE persg IN ( '6' , '7' , '8' ) AND stell = 'A' AND orgeh NE '00009999' AND orgeh = 'Z' GROUP BY orgeh.
Y u have specified two conditions for a single field?
AND orgeh NE '00009999'
AND orgeh = 'Z'
Add a comment