Float Fields Decimal Precision Behavior is Inconsistent

(Doc ID 2147304.1)

Last updated on NOVEMBER 14, 2017

Applies to:

Oracle BigMachines CPQ Cloud Service - Version 2015 R1 and later
Information in this document applies to any platform.

Symptoms

Float Attributes with precision of 4 digits are updated with more than 4 digits through the Web Service API and Advanced Modify BML code, but it throws an error in REST API call.

This issue can be reproduced with the following steps:

  1. Create a quote attribute of type "float" with attribute decimal precision of 4 decimal places.
  2. Add this attribute to the quote layout.
  3. Use a version 2.0 Web Service to set the attribute value to something with 5 or more decimal places, i.e. 5.67892345. This will store that value in the document XML.
  4. Modify an action's advanced modify function to return a value with 5 or more decimal places. Use the action and see that the transaction XML has the exact value.
  5. Use the updateTransaction REST API to set the attribute to a value with 5 or more decimal places. In this case, the following error will occur.

{
"title" : "Could not perform Action: Save and Price\nmb_float_test: You may
only enter up to 4 decimal places for this field. Attempt to save value
7,869788777 failed.",
"type" : "HTTP://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms