Skip to Content
0
Jul 19, 2017 at 06:40 AM

How can ;you generate headers from CDS views

625 Views

I have built a CDS view that contains a field generated by a CONCAT statement 'concat( carrid, connid ) as flight'. The actual CDS view is as follows:

@AbapCatalog.sqlViewName: 'zha400_jm_cds_4'

define view zha400_jm_ddl_4 as

select from sbook

{ concat( carrid, connid ) as flight,

fldate, bookid, customid, loccuram }

I use this view in an ABAP program and it returns the expected result in an internal table. When the table is used in an ALV, there is no column heading for that field. I thought that I could use the annotation @EndUserText.label: 'Flight' immediately prior to the concat line to generate a heading, but it does not work. What I want to know is how can I generate the column heading?

Thanks