07-29-2015 8:10 AM
Hi ,
Currently I am looking into open sql statement in abap for hana
I wrote the below query but in debugging the values are populated as below
SELECT carrid,
CASE carrid
WHEN 'AC' THEN 'Canada Airlines'
WHEN 'LH' THEN 'Lufthansa Airlines'
ELSE carrid
END AS carrier_name_long,
SUM( sflight~price ) AS total_price
FROM sflight
GROUP BY carrid
into table @DATA(lt_result).
IF lt_result[] IS NOT INITIAL.
DESCRIBE TABLE lt_result LINES sy-tfill.
WRITE : / sy-tfill.
ENDIF.
Please find the attached screen shot
Thanks in advance.
Regards,
Raghunadh Kodali.
07-29-2015 11:51 AM
Hi Raghunadh Kodali,
This is a kernel bug. I wrote SAP note 2127182 for this purpose. For 742, it is corrected in PL 111.
Best regards,
Kilian.
07-29-2015 9:08 AM
Hi Raghunadh,
What is the declaration of lt_result.
Regards, Fernando Da Rós
07-29-2015 9:57 AM
Hi Fernando,
In the new open sql select statements doesn't require declarations for creating the internal tables.
i followed the syntax which is explained by jasmin in open sap videos.
Please find the below syntax.
"simple case
SELECT so_id,
CASE delivery_status
WHEN ' ' THEN 'OPEN'
WHEN 'D' THEN 'DELIVERED'
ELSE delivery_status
END AS delivery_status_long
FROM snwd_so INTO TABLE @DATA(lt_simple_case).
Thanks & Regards,
Raghunadh Kodali.
07-29-2015 11:49 AM
Short comment: I showed it, but it is best explained by the ABAP language help. You can also find information on that feature in the "Inline declaration" section of http://scn.sap.com/community/abap/blog/2014/10/08/abap-news-for-740-sp08--open-sql.
Cheers,
Jasmin
07-29-2015 9:18 AM
Hi Raghunadh,
which SAP_BASIS release and which Kernel (including patch level) are you working on?
Cheers,
Jasmin
07-29-2015 9:53 AM
Hi Jasmin,
I am currently working on the below system.
SAP_BASIS 740 0008 SAPKB74008
DB client lib. : DB6_81
DB releases : DB6 09.07.*, DB6 09.08.*, DB6 10.*
DBSL version : 742.06
DBSL Patch Level : 029
Kernel release : 742
Compilation : Linux GNU SLES-11 x86_64 cc4.3.4 use-pr150211
Sup.Pkg lvl. : 101
ABAP Load : 1981
CUA load : 40
Mode : opt
Rsyn file
Operating System : Linux 2.6, Linux 3
OP release : 3.0.13-0.27-default
Thanks & Regards,
Raghunadh Kodali.
07-29-2015 11:53 AM
Hi Raghunadh,
SAP note 2127182 tackles that issue.
Cheers,
Jasmin
07-29-2015 1:12 PM
07-29-2015 11:51 AM
Hi Raghunadh Kodali,
This is a kernel bug. I wrote SAP note 2127182 for this purpose. For 742, it is corrected in PL 111.
Best regards,
Kilian.