ABAP Forum
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Possible ADT SQL Console parser bug: misleading syntax errors for valid Open SQL statement

0 Likes
55

Hi everyone,

I believe I may have found a bug or limitation in the ADT SQL Console and would like to know whether anyone else has experienced similar behavior.

System:

  • SAP ECC (Oracle database, not HANA)
  • ADT SQL Console in Eclipse

Not working SQL

I have below Open SQL query which is 320 characters long (it matters 😉😞

select ltap~tanum,
       count(*) as count
from ltap as ltap
where ltap~lgnum = 'STN'
  and exists (
        select 1
          from ltap as l1
         where l1~lgnum = 'STN'
           and l1~tanum = ltap~tanum
           and l1~werks = 'DER6' )
group by ltap~tanum
having min( ltap~werks ) <> max( ltap~werks )

Here is a screenshot:

nemanjasimovicavnet_0-1787839002514.png

The strange thing is that the SQL Console sometimes reports syntax errors that do not seem related to the actual query, for example:

After "STN", there must be a space or equivalent character

 Working SQL

Here is the almost same SQL but working, and it's less then 255 characters. I kicked out spaces and counter function:

select ltap~tanum
from ltap as ltap
where ltap~lgnum = 'STN'
and exists ( select 1 from ltap as l1
where l1~lgnum = 'STN'
and l1~tanum = ltap~tanum
and l1~werks = 'DER6' )
group by ltap~tanum
having min( ltap~werks ) <> max( ltap~werks )

Here is the screenshot:

nemanjasimovicavnet_1-1787839418023.png

 

To me it looks like an obvious bug. Not sure if this depends on the system or not, so less people experience it. But this bug is around for more than a year now. 😔😔😔 

Thanks for any hint! 💖

Regards.

Hi everyone,

I believe I may have found a bug or limitation in the ADT SQL Console and would like to know whether anyone else has experienced similar behavior.

System:

  • SAP ECC (Oracle database, not HANA)
  • ADT SQL Console in Eclipse

Not working SQL

I have below Open SQL query which is 320 characters long (it matters 😉😞

select ltap~tanum,
       count(*) as count
from ltap as ltap
where ltap~lgnum = 'STN'
  and exists (
        select 1
          from ltap as l1
         where l1~lgnum = 'STN'
           and l1~tanum = ltap~tanum
           and l1~werks = 'DER6' )
group by ltap~tanum
having min( ltap~werks ) <> max( ltap~werks )

Here is a screenshot:

nemanjasimovicavnet_0-1787839002514.png

The strange thing is that the SQL Console sometimes reports syntax errors that do not seem related to the actual query, for example:

After "STN", there must be a space or equivalent character

 Working SQL

Here is the almost same SQL but working, and it's less then 255 characters. I kicked out spaces and counter function:

select ltap~tanum
from ltap as ltap
where ltap~lgnum = 'STN'
and exists ( select 1 from ltap as l1
where l1~lgnum = 'STN'
and l1~tanum = ltap~tanum
and l1~werks = 'DER6' )
group by ltap~tanum
having min( ltap~werks ) <> max( ltap~werks )

Here is the screenshot:

nemanjasimovicavnet_1-1787839418023.png

 

To me it looks like an obvious bug. Not sure if this depends on the system or not, so less people experience it. But this bug is around for more than a year now. 😔😔😔 

Thanks for any hint! 💖

Regards.

0 REPLIES 0