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

how to round values in smartforms

Former Member
0 Likes
2,914

hello expert i need help

m trying to round value in smart forms and declare two variable in smart forms

LV_NET_VAL       type           'i'

LV_NET_VAL1     type           'i'

LV_NET_VAL        =          1234567.76

but in

LV_NET_VAL1     = its shows 1234568

but i need to show like 12345678.00

and i also need  to show exact round off value =  .25

pls help

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,045

Hi Sumit,

Why not to declare it as P with decimal 2?

regards,

Archer

8 REPLIES 8
Read only

Former Member
0 Likes
2,046

Hi Sumit,

Why not to declare it as P with decimal 2?

regards,

Archer

Read only

0 Likes
2,045

i al try but no result

Read only

0 Likes
2,045

i exactly need to show like

123456.66 round 1234567

Read only

kmoore007
Active Contributor
0 Likes
2,045

Your text element should have something like this:  &STRUC-FIELD(.2)&

Read only

Former Member
0 Likes
2,045

i exactly need to show like

123456.66 round 1234567.00

Read only

Former Member
0 Likes
2,045

thanks kenneth for reply but can u pls elaborate

Read only

kmoore007
Active Contributor
0 Likes
2,045

Using a TEXT element, when you insert a field, normally the field is entered like so:  &STRUC-FIELD&.  But to specify decimals, enter the field like this: &STRUC-FIELD(.2)&   The .2 is the number of decimals added to the field.

Read only

Former Member
0 Likes
2,045

What exactly your requirement is?

Convert 1234568 to 1234568.00?


You have mentioned

"1234568

but i need to show like 12345678.00"

What is the logic of getting 12345678 from 1234568? Is it a typo?