on 2024 Dec 27 2:48 PM
Hello,
I am trying to create below CDS view entity, but getting error at lbkum field. This is due to reference information missing for unit of measure.
Its allowing , If I create CDS view with same code but iF I want to create CDS View Entity, the code is failing. Please help how to fix the issue.
//@AbapCatalog.sqlViewName: 'ZTESTMBEW10'
//@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Material DATA'
@VDM.viewType: #CONSUMPTION
define view entity ZTEST_MBEW_10
as select from Mbv_Mbew as A1
left outer join marc as A2
on A1.matnr = A2.matnr
and A1.bwkey = A2.werks
{
A1.matnr,
A1.bwkey,
A1.lbkum,
A2.prctr
}
Regards,
Vasu
Request clarification before answering.
if it is asking for uom, why not just give it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @junwu
The uom field is not available in this CDS view tables, it is available in table (MARA-MEINS) and tried to join and getting same issue.
define view entity ZTEST_MBEW_10
as select from Mbv_Mbew as A1
left outer join marc as A2
on A1.matnr = A2.matnr
and A1.bwkey = A2.werks
inner join mara as A3 //Unit of Measure > Meins
on A3.matnr = A1.matnr
{
A1.matnr,
A1.bwkey,
//@Semantics.unitOfMeasure: true
@Semantics.quantity.unitOfMeasure: 'LBKUMUnit'
@DefaultAggregation: #SUM
A3.meins as LBKUMUnit,
A1.lbkum,
A2.prctr
}
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.