cancel
Showing results for 
Search instead for 
Did you mean: 

Calculations on CDS View: Convert FLTP to DEC

rafaelchagas
Participant
0 Kudos

Hello experts,

Could you please tell me how I convert the result of this calculation from FLTP to DEC (25,2).

I had to do on FLTP because using DEC was generating this error: "Maximum accuracy 37 at DEC exceeded by an arithmetic expression".

@Semantics.amount.currencyCode: 'waers'
@UI.lineItem.position: 150
@EndUserText.label: 'Variação Cambial'
case when _rank.row_id = 1 then (
(
(cast( case when _camb1.hsl is not null then _camb1.hsl else 0 end as abap.fltp) * cast(-1 as abap.fltp ) ) +
(cast( case when _camb2.hsl is not null then _camb2.hsl else 0 end as abap.fltp) * cast(-1 as abap.fltp ))
)
*
(
(cast( case when _residual.hsl is not null then _bsad.dmbtr - _residual.hsl else _bsad.dmbtr end as abap.fltp ) )//Montante em MI
/
cast( case when _comp.dmbtr <> 0 then _comp.dmbtr else 1 end as abap.fltp ) //Valor Original
)
) else 0 end as var_camb,

Thanks in advance.

denise_meyer
Employee
Employee
0 Kudos

I believe this question belongs in the HANA area, not Data Services. Please ask it under HANA

Accepted Solutions (0)

Answers (0)