‎2006 Sep 19 12:25 PM
hi friends,
Could u please help me how to do this i already fetch the data from the qals-anzgeb
Calculated field: square root of QALS-ANZGEB (round up the value if the decimal point value is > 0.5 else round down the value) plus 1. example: if the square root value is 5.2 then the results will be 5 + 1 = 6 but if the square root value is 5.5 then the results will be 6 + 1 = 7.
but my problem is in smart form how to squreroot the value after that how round that value
Any one of them could u please help
regards
siri
‎2006 Sep 19 12:37 PM
Hi Sireesha,
In the program lines import the variable(declare another variable of similar type say v_compute) and then find the square root....
v_compute = sqrt( qals-anzeb).
if v_compute GE 5.5
v_compute = ceil( v_compute).
else.
v_compute = floor( v_compute).
endif.
Now export v_compute and print it in the text node.
Regards,
Vidya.
‎2006 Sep 19 12:51 PM
Hi,
use below logic
data l_t type i.
compute l_t = sqrt( 9 ).
l_t = l_t + 1.
write l_t.
use interger variable for rounding
or use function
CEIL Smallest integer value not less than x
FLOOR Greatest integer value not greater than x
TRUNC Integer part of x
FRAC Decimal part of x
Regards
Amole