Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

smart forms

Former Member
0 Likes
445

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

2 REPLIES 2
Read only

Former Member
0 Likes
391

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.

Read only

Former Member
0 Likes
391

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