2026 Aug 27 3:10 PM
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:
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:
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 characterHere 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:
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:
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:
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 characterHere 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:
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.
Wednesday
Hi Nemanja, your comparison changes two things: statement length and the COUNT(*) projection. To isolate a length/line-handling issue, keep the complete original query, including COUNT(*), and insert real line breaks before FROM, WHERE, GROUP BY and HAVING so every physical line is short. Soft wrapping in the editor is not the same test. Then compare Check and Run, and run the same SELECT in a small ABAP report on the same backend.
If only the one-line console version fails, retain that minimal pair for SAP together with SAP_BASIS release/SP and Eclipse/ADT versions. That supports a console/backend handling defect without attributing it to Oracle prematurely. SAP documents the console as ABAP SQL, with its own syntax checking; it is not a native Oracle SQL console.
I have not verified a documented 255-character console limit or a specific correction, so I would treat that threshold as your reproduction clue rather than a general ABAP SQL restriction.
| User | Count |
|---|---|
| 18 | |
| 11 | |
| 8 | |
| 6 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |