cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

reference information missing or data type wrong using abap cds views with entity

durgaprasanth_vemula
Participant
0 Kudos
6,358

Hi,

I am developing abap cds views with entity and below code  and getting error ZI_PLANNING-MON1 reference information missing or data type wrong, see long text

 

 

define view entity ZI_PLANNING as select from ZPS_REVENUE_PLAN

 

{

key proj_def as ProjDef,

key wbs_no as WbsNo,

key item_no as ItemNo,

key zyear as Zyear,

key vsn as Vsn,

tcurr as Tcurr,

deptm as Deptm,

dept_desc as DeptDesc,

prart_lvl4 as PrartLvl4,

prart_lvl5 as PrartLvl5,

prart_lvl6 as PrartLvl6,

prart_des4 as PrartDes4,

prart_des5 as PrartDes5,

prart_des6 as PrartDes6,

 

mon_1 as Mon1,

mon_2 as Mon2,

mon_3 as Mon3,

mon_4 as Mon4,

mon_5 as Mon5,

mon_6 as Mon6,

mon_7 as Mon7,

mon_8 as Mon8,

mon_9 as Mon9,

mon_10 as Mon10,

mon_11 as Mon11,

mon_12 as Mon12,

created_date as CreatedDate,

changed_date as ChangedDate,

created_by as CreatedBy,

changed_by as ChangedBy,

del_ind as DelInd,

remark as Remark,

tot_cost as TotCost,

tot_rev_cst as TotRevCst,

status as Status,

proj_def_back as ProjDefBack,

wbs_def_back as WbsDefBack,

billable as Billable

}

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

sdig89
Participant
0 Kudos

Hello, is that field a quantity field? a currency field? 

I will suppose that MON1 field is a quantity field.

You will need to: 

  • To add a base unit of measure in the CDS view
    • let's give "as BaseUnit" an alias of this new field
  • To link the “BaseUnit” of measure to the quantity field with this annotation: @Semantics.quantity.unitOfMeasure: 'BaseUnit'

Thus your cds view will look like this: 

{...

prart_des5 as PrartDes5,

prart_des6 as PrartDes6,

@Semantics.quantity.unitOfMeasure: 'BaseUnit'

mon_1 as Mon1,

...

}

This will make the error disappear