07-25-2015 6:38 AM
Hi Folks,
I am currently listening the open sap videos for the abap on hana week3 .in that i wrote abap query modified with the enhancement of the sql statement
but my statement is showing syntax errors.
Please find the below query.
SELECT carrid
connid
fldate
price
currency
FROM sflight
INTO TABLE lt_sflight.
IF sy-subrc IS INITIAL.
DESCRIBE TABLE lt_sflight LINES sy-tfill.
WRITE : / sy-tfill.
ENDIF.
SELECT carrid,
connid,
fldate,
price,
currency
from sflight
into table @data(lt_sflight).
From the above query i am getting the below error.
"," is not allowed here since it contains an invalid character or it is
a keyword. (It might be possible to escape it using "!"). Or a space is
missing or there is one space too many.
I am using EHP7 with sp04 ides server.
Thanks in advance.
Regards,
Raghunadh Kodali.
07-25-2015 7:16 AM
Hi Folks.
I got the solution.
from the help.sap.com
In Open SQL, all operands in lists can now be separated by commas and this is also the recommended way of separating them from Release 7.40, SP05. Until now, comma-separated lists could only be used when single target fields were specified in parentheses after INTO in SELECT and when data objects were specified in parentheses after WHERE. Comma-separated lists are now also possible in Unicode programs where the program attribute fixed point arithmetic is activated:
Thanks & Regards,
Raghunadh Kodali.
07-27-2015 10:16 AM
Hi Raghundadh,
so the solution is, that the statement you wrote is not possible in SP5... but in SP8 it's perfectly fine for the syntax check, right?
Cheers,
Jasmin
07-29-2015 8:03 AM
Hi Jasmin,
I am currently working in a SP08 system and the syntax is working perfectly .
Thanks & Regards,
Raghunadh Kodali.