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
- Create a Custom CDS View.
- Add a calculation.
- Add the element properties.
- 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
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