cancel
Showing results for 
Search instead for 
Did you mean: 

OData Gateway not rejecting invalid value

0 Kudos
1,275

Dear Experts,

Problem Description
We have a field in our OData entity having standard ABAP type as DEC_16_12_S

(Data Type: DEC ; Length: 16 ; Decimal Places: 12; Signed +/- ; Output length: 19 ).

As per this data type, allowed number of digits before decimal is 4 (16 -12) and allowed number of digits after decimal is 12.


However, when we execute this entity from gateway client(POST call) with a value of ‘12345’ (5 digits before decimal place) in the corresponding field, gateway does not rejects it ( no conversion error comes up in the gateway). And due to this, Insert operation into DB table fails because of the invalid value; resulting in back-end dump.


But when the same entity is executed with a value of ‘123456’ (6 digits before decimal place) in the corresponding field, gateway upfront rejects it giving error – “Conversion error for property <> at offset <>”

Primary concern/query is:

As the data type should allow only 4 digits before decimal, how come 5 digits when entered, is not being rejected by the gateway. But 6 digits or more (before decimal) is getting rejected by the gateway as expected.


Technical Information –

When 6 digits are entered as the field value, exception CX_SY_CONVERSION_OVERFLOW occurred in Class /IWCOR/CL_DS_EDM_DECIMAL, in Method /IWCOR/IF_DS_EDM_SIMPLE_TYPE~VALUE_OF, in Line 3.

Above API is being called from within Class /IWCOR/CL_DS_EP_READER_JSON,Method READ_SIMPLE_PROPERTY_VALUE

Component Version of Gateway - 752

Best Regards,

Harish

Accepted Solutions (0)

Answers (0)