on 2020 Sep 04 8:52 AM
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
Request clarification before answering.
User | Count |
---|---|
79 | |
22 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.