cancel
Showing results for 
Search instead for 
Did you mean: 

Edm.Decimal - not accepting decimal values in Gateway Calls

former_member190939
Participant
0 Kudos

Hello Experts,

I have a service which looks like below :

And my gateway http call looks like below :

/sap/opu/odata/sap/ZUI5_MAIN_SRV/salesColl_saveInvoicesSet?$filter=AmountCol eq 1.00

The above call ends up in error always and the error is "Property 1.00 not found in type salesColl_saveInvoices".

But If I remove the decimal values, it is working fine.

/sap/opu/odata/sap/ZUI5_MAIN_SRV/salesColl_saveInvoicesSet?$filter=AmountCol eq 1



Where am I going wrong?

Thanks,

Seyed Ismail.

Accepted Solutions (1)

Accepted Solutions (1)

JyotiD
Active Participant
0 Kudos

Hi Seyed,

Can you try suffixing 'm' in you decimal value, It works for me.

/sap/opu/odata/sap/ZUI5_MAIN_SRV/salesColl_saveInvoicesSet?$filter=AmountCol eq 1.00m


Regards,

Tarun

former_member190939
Participant
0 Kudos

Thank you Tarun, It worked. 🙂

Wondering what does 'm' mean actually...

Seyed Ismail.

JyotiD
Active Participant
0 Kudos

Hi Seyed,

Maybe this doc can help you understanding Odata protocol.

Overview (OData Version 2.0) · OData - the Best Way to REST

Regards,

Tarun

Answers (1)

Answers (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Seyed,

Did you try to pass 1.02 , 1.20 , 1.2 and check ?

Regards,

Ashwin

former_member190939
Participant
0 Kudos

Hello Ashwin,

Similar error.

Property 1.02 not found in type salesColl_saveInvoices

Property 1.20 not found in type salesColl_saveInvoices

Seyed Ismail.

Pavan_Golesar
Active Participant
0 Kudos

Hi Seyed,


Please try following URI:

/sap/opu/odata/sap/ZUI5_MAIN_SRV/salesColl_saveInvoicesSet?$filter=AmountCol eq '1.00'

Does this work?


--

PG

former_member190939
Participant
0 Kudos

Thanks,

Anyways for Edm.Decimal, we should not use '1.00'.

Seyed Ismail.