Skip to Content
0

Hana CDS View Field Name

Jan 24, 2017 at 09:14 AM

622

avatar image

Hi,

i created cds view dll and i add new 'CHARK' fields when .. case but field name is empty ?

my dll source code below and se16n screen shoot.

@AbapCatalog.sqlViewName: 'ZHV_QM_001'
@ClientDependent: true
@AbapCatalog.compiler.CompareFilter: true
@EndUserText.label: 'Release QM Karakteristik'
/* Mustafa Hamit - 14.01.2017 */

define view Zhv_Qm_0001 as

select distinct from zpp_v_0004 as p
left outer join qals as q on p.aufnr = q.aufnr
left outer join qamv as b on q.prueflos = b.prueflos

{
key q.prueflos,
( 
case when b.verwmerkm <> '' then 'X'
else ''
end
) 
as chark @<EndUserText
@<EndUserText.label: 'CHARK'
@<EndUserText.quickInfo: 'Kayıt Var Göstergesi',
p.aufnr,
p.patid,
p.satid,
p.uaaop,
p.aufnr_temp,
p.patid_79,
p.dalan,
p.kokda,
p.paren,
p.par_satid,
p.seviy,
p.bmsch,
p.satid_65,
p.paren_65,
p.seviy_65,
p.kestp,
p.gblok,
p.sattp,
p.vornr,
p.arbpl,
p.ktsch,
p.steus,
p.umren,
p.umrez,
p.genis_65,
p.coils,
p.meins,
p.weight,
p.urtmk,
p.vbeln,
p.posnr,
p.birsip,
p.birmat,
p.charg,
p.sipma,
p.werks,
p.lgort,
p.plnnr,
p.plnal,
p.sipkl,
p.kalge,
p.kalcs,
p.hurda,
p.serit,
p.segtp,
p.tip,
p.x0,
p.x1,
p.y0,
p.y1,
p.erdat,
p.erzet,
p.ernam,
p.aedat,
p.aezet,
p.aenam,
p.vge01,
p.vgw01,
p.optrh,
p.ebeln,
p.ebelp,
p.islem,
p.baslik,
p.operasyon,
p.bilesen,
p.baslik_rslt,
p.operasyon_rslt,
p.bilesen_rslt,
p.message,
p.vge02,
p.vgw02,
p.slwid,
p.usr00,
p.usr11,
p.huk,
p.relok
}
where p.aufnr is not null
/*group by q.prueflos*/
capture.png (23.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Horst Keller
Jan 25, 2017 at 08:09 AM
0

Seems that you are talking about an ABAP CDS view and not about a HANA CDS View.

Have you activated the view properly? How does it look in SE11?

Checking demo view DEMO_CDS_SCASE from DDL source DEMO_CDS_SEARCHED_CASE, I see the alias name of the case expression in SE16N, so you should see yours too.

Share
10 |10000 characters needed characters left characters exceeded
Mustafa Hamit Jan 25, 2017 at 08:44 AM
0

Hi,

thnks for reply. My view activated in SE11. But i dont see field name demo_cds_scase (below SE16N screen). U can see field name ?


capture.png (22.1 kB)
Show 3 Share
10 |10000 characters needed characters left characters exceeded

Interesting. I can see the fieldname in my releases (back to 7.40, SPsomething).

I'm sure your field is part of the view.

If you write an ABAP

DATA struct TYPE cds_entity.
BREAK-POINT.

you should see the field in the structure. Do you?

1

Type "CDS_ENTITY" is unknown.

Is there a way code like as below define fieldname for abap cds.

Set alias name in abap cds code ?

@<EndUserText
@<EndUserText.label:'CHARK'@<EndUserText.quickInfo:'Kayıt Var Göstergesi',
0

"Type "CDS_ENTITY" is unknown"

Of course, you have to replace "cds_entity" with the name of your view!

0
Daniel Klein Sep 25, 2017 at 09:53 AM
0

Hello Mustafa and Horst,

in SE16N for view DEMO_CDS_SCASE I can only see 'Generated Column for' as fieldname of field FLIGHT_TYPE.

I was not able to set the fieldname of my field (result of a MAX aggregation) for SE11/SE16N, too. It is always the short description of a generic DDL field (in my case 'Quantity Column', because the system decided the result of my MAX statements is of type DDDDLQUANTYPES-QUAN10_0) in login language:

The cds entity definition contains field annotations that are not reflected in SE11/SE16N:

If I login in german language, SE11/SE16N do not show any field names/short descriptions:

Conclusion: as long as the system uses specific DDL reference table fields for the generated CDS db view in case of aggregate functions (also for case statements, maybe others, too), it is not possible to define the SE11/SE16N field name (a.k.a short description) via DDL source annotations. Fields can only be identified by their technical names. Field descriptions are generic when logged in in english, or empty when logged in other languages, e.g. german.

Fields of the following tables are used by the system as reference fields:

Regards

Daniel


se11-english.png (30.3 kB)
source-code.png (24.9 kB)
se11-german.png (29.6 kB)
ref-tables.png (9.8 kB)
Share
10 |10000 characters needed characters left characters exceeded