Skip to Content
0
Jan 27, 2011 at 10:44 AM

No-Rounding

2503 Views

Hi,

Please, could somebody help me??

I would like to solve this aritmethic expression but without rounding. I found some commands like TRUNC, FRAC etc; but it doesn't help me. I didn't find any article in internet explanning it.

The result must be 4.14 instead of 4.40!

DATA: vl_total_frete(15) TYPE n ,

vl_icsf(15) TYPE p DECIMALS 2,

vl_aliq_cof(6) TYPE n .

WRITE '54.55' TO vl_total_frete.

WRITE '7.60' TO vl_aliq_cof .

*vl_icsf = ( ( vl_total_frete * vl_aliq_cof ) / 100 ).*

Thanks,

Marcos F. Dotta

Edited by: Marcos Dotta on Jan 27, 2011 11:44 AM