Skip to Content
1
5 days ago

Eclipse SQL Console how to have a Double Quotes " in String Literal ABAP OPEN SQL

99 Views

Question: In Eclipse SQL Console how to have a " DOUBLE QUOTES in string/character literal in OPENSQL
This program works (in SQLGUI)

REPORT zdemo1.

START-OF-SELECTION.

Select ( fnam~fieldname
&& ' TYPE'
&& ' '
&& fnam~rollname
&& ' , "'
&& ftxt~ddtext ) AS TEXT
from dd03l as fnam inner join dd04t as ftxt
on ( fnam~rollname = ftxt~rollname
and fnam~as4local = ftxt~as4local
and fnam~as4vers = ftxt~as4vers
and ftxt~ddlanguage = 'E'
and fnam~tabname = 'SPFLI' )
order by fnam~position
into table @data(lt_tab).

cl_demo_output=>display( lt_tab ).
EXIT.

This fails in Eclipse OpenSQL SQL Console

SELECT  ( fnam~fieldname 
          && ' TYPE'
          && ' '
          &&  fnam~rollname 
          && '  ,  "'
          && ftxt~ddtext ) AS TEXT
FROM dd03l as fnam INNER JOIN dd04t as ftxt
ON ( fnam~rollname = ftxt~rollname
AND fnam~as4local = ftxt~as4local
AND fnam~as4vers = ftxt~as4vers
AND ftxt~ddlanguage = 'E' 
AND fnam~tabname = 'SPFLI' )
ORDER BY fnam~position

If I change " by # then works
https://archer4sap.com/2018/08/23/sql-console-with-eclipse-adt/ has this
Commenting in SQL console: A double quote( “ ) just as ABAP can be used for writing comment in SQL console.

My surmise this comment feature creates a side-effect

Regards
Jayanta