Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Re : Open Sql query with case statement.

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.

abaponhana1.JPG (25264 B)
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question