Hello, I've got this:
select ordernr
from users
having count(ordernr) =
( select max(count(ordernr))
from users where ordernr = ordernr
group by ordernr )
group by ordernr
to get the most used order-number (ordernr) from all users.
How to get it into ABAP SAP System? I've tried this:
select SINGLE ordernr
from ZDEVXXX_PROJECT3 INTO ordernrU
having count( * ) =
( select max( count( * ) )
from ZDEVXXX_PROJECT3
where ordernr = ordernr
group by ordernr )
But I get this error:
"Unknown columnname COUNT("
How to combine max and count in ABAP? The SQL Query above is working in Oracle for me. Thanks!