SAP Knowledge Base Article - Public

3485827 - User Number Format not applied to Dynamic attributes

Symptom

When User Number Format contains comma as decimal separator, and user attempts to assign a number to a Dynamic Attribute, system throws error informing that Value is not supported for characteristic.

 

Environment

SAP SALES CLOUD CPQ Integrated with SAP Variant Configuration

Reproducing the Issue

  1. Check if User Number Format contains comma as decimal separator (such as 1 234,56)
  2. Inside a Quote, configure a VC product that contains dynamic attributes
  3. Using following snippet, attempt to assign a value to a dynamic attribute:

    Val= UserPersonalizationHelper.ToUserFormat(650.58)

    Trace.Write('UserPersonalized formatted Input == '+str(Val))

    Product.Attributes.GetBySystemId(<Attribute_ID>).AssignValue(str(Val)) 

  4. Error message informing that value is not supported is thrown.

Cause

CPQ and CPS Limitation

Resolution

  • CPS accepts numbers only in a standard format using '.' as the decimal separator. Language dependent formats (using ',' as decimal separator) are not supported
  • For Standard Attributes, when CPQ performs CPS calls, there is an implicit number format conversion, to dot decimal separator, in order to allow number to be passed to CPS
  • For Dynamic Attributes the same conversion is not done, thus error is thrown
  • Workaround is to avoid using Number Formats that contains comma as decimal separator when having Dynamic Attributes, or change number format using script
  • Currently there is no plan to add the implicit conversion in the CPS call for Dynamic Attributes
  • It is recommended to create/upvote enhancement request for feature.

See Also

Keywords

Number Format, User Number Format, CPS, Characteristic, Dynamic Attribute, Dynamic, Limitation, CPQ , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Bug Filed

Product

SAP CPQ 2023