Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP CDS View is not showing correct value of Unrestricted Quantity Field

kalpesh_pandey
Contributor
0 Kudos
3,110

I am creating an ABAP CDS view over table MSKU. My purpose is to expose this table as OData. I created basic view with all the fields. Now when I look into data in Hana Modeler then I see KULAB values as 0.000 only. When I check data in MSKU in SE16N then I see valid values. I did cast this field as char and decimal but still I am getting 0.000 values only. We are on S4HANA 1809.

Thanks,

1 ACCEPTED SOLUTION
Read only

former_member16553
Active Participant
0 Kudos
1,546

Hi,

Please check by using replacement object NSDM_E_MSKU.

Regards,

Girdhari

3 REPLIES 3
Read only

former_member16553
Active Participant
0 Kudos
1,547

Hi,

Please check by using replacement object NSDM_E_MSKU.

Regards,

Girdhari

Read only

GK817
Active Contributor
0 Kudos
1,546

Hi Kalpesh,

Have you used annotation for quantity and unit?

  @Semantics.currencyCode
    currency_code as CurrencyCode,
    
    @Semantics.amount.currencyCode: 'CurrencyCode' 
    gross_amount as GrossAmount,
    
    @Semantics.unitOfMeasure
    unit_of_measure as UnitOfMeasure,
    
    @Semantics.quantity.unitOfMeasure: 'UnitOfMeasure' 
    quantity as Quantity,
Read only

kalpesh_pandey
Contributor
0 Kudos
1,546

Thanks, NSDM_V_MSKU is the view I have to use for MSKU. It is displaying fine now.

Thanks,

Kalpesh