Application Development 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: 

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

kalpesh_pandey
Contributor
0 Kudos

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

former_member16553
Active Participant
0 Kudos

Hi,

Please check by using replacement object NSDM_E_MSKU.

Regards,

Girdhari

3 REPLIES 3

former_member16553
Active Participant
0 Kudos

Hi,

Please check by using replacement object NSDM_E_MSKU.

Regards,

Girdhari

GK817
Active Contributor
0 Kudos

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,

kalpesh_pandey
Contributor
0 Kudos

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

Thanks,

Kalpesh