‎2021 May 20 5:43 AM
Hello,
I am creating CDS table which is having one field type of MENGE for quantity,
but it is throwing error for annotaions
I tried with Semantics.quantiy,unitofmeasue: 'Base UOM' but didn't work.
If anyone has solution please share.
error : Annotation with reference to unit code for field HOT_WEIGHT is uncomplete
Thanks
@EndUserText.label : 'xxxxx Item Table'
@AbapCatalog.enhancementCategory : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #RESTRICTED
define table /lsp/xxxxxxxxx {
key client : abap.clnt not null;
key carcass_nr : /lsp/e_carcass_nr not null;
key side_nr : /lsp/e_side_nr not null;
harvest_date : /lsp/e_harvest_date;
hot_date_time : /lsp/e_hot_date_time;
hot_shift : /lsp/e_hot_shift;
@Semantics.quantity.unitOfMeasure: 'BaseUnitOfMeasure'
hot_weight : /lsp/e_hot_weight;
hot_weight_uom : /lsp/e_hot_weight_uom;
}
‎2021 May 20 6:02 AM
Should be:
...
@Semantics.quantity.unitOfMeasure: 'hot_weight_uom'
hot_weight : /lsp/e_hot_weight;
@Semantics.unitOfMeasure
hot_weight_uom: /lsp/e_hot_weight_uom;
...@Semantics.quanity.unitOfMeasure must be a reference to a Unit of Measure field; in your case hot_weight_uom. The Unit of Measure field must be annotated with @Semantics.unitOfMeasure
‎2021 May 20 6:02 AM
Should be:
...
@Semantics.quantity.unitOfMeasure: 'hot_weight_uom'
hot_weight : /lsp/e_hot_weight;
@Semantics.unitOfMeasure
hot_weight_uom: /lsp/e_hot_weight_uom;
...@Semantics.quanity.unitOfMeasure must be a reference to a Unit of Measure field; in your case hot_weight_uom. The Unit of Measure field must be annotated with @Semantics.unitOfMeasure
‎2021 May 20 6:15 AM
‎2021 May 20 6:21 AM
vikash.pathak What is the warning message for the @Semantics.unitOfMeasure annotation?
Maybe you have to add "true" as value (which is the default in new version):
@Semantics.unitOfMeasure: true
‎2021 May 20 6:25 AM
‎2021 May 20 6:29 AM
vikash.pathak What is the type behind data element /lsp/e_hot_weight_uom?
‎2021 May 20 6:49 AM
Hi
It is MEINS,
This issue is resolved now.
with semantics annotation table name has to be added
@Semantics.quantity.unitOfMeasure:'/xx/xx.hot_weight_uom'
‎2025 Jul 29 3:16 PM
Thanks @Semantics.quantity.unitOfMeasure : 'TABLENAME.REFERENCEUNIT'