SAP Knowledge Base Article - Public

3278586 - Error "DECFLOAT34 to type CURR is not possible" occurs when using a calculation in Custom CDS View - SAP S/4HANA Cloud 

Symptom

When using a calculation in Custom CDS View,  error message "DECFLOAT34 to type CURR is not possible" is being triggered. 

Environment

SAP S/4HANA Cloud 

Reproducing the Issue

  1. Create a Custom CDS View.
  2. Add a calculation.
  3. Add the element properties.
  4. Publish the view.

Cause

It's not possible to convert DECFLOAT34 directly to CURR. 

Resolution

Cast the decfloat in decimal format and then to a currency.

Sample statement:

cast ( cast ( YY1_Sample as ABAP.DEC( xx, x ) ) as ABAP.CURR( xx, x ) )

See Also

SAP Help Portal | Functions for Calculated Fields

Keywords

DECFLOAT34, CURR, calculation, cast, convert, currency, not possible , KBA , BC-SRV-APS-GKE , Generic CDS Key User Editor , How To

Product

SAP S/4HANA Cloud Public Edition all versions ; SAP S/4HANA Cloud all versions