Application Development 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: 

display decimals in smartforms

Former Member
0 Kudos

Hello All,

I want to display a weight field in a smartform. when the value is 2.10 it shows the proper value but if the value is 2.00 it shows the value as 2. How can I display the value with decimals.

Please help.

Thanks,

Anju

11 REPLIES 11

SuhaSaha
Advisor
Advisor
0 Kudos

Check if there are any formatting option associated with the text element ?

If not, i think there must be some coding which is removing the decimals in case of zero decimal value.

Check & then revert back.

BR,

Suhas

Former Member
0 Kudos

Hello Suhas,

There is no coding which is removing the values from the data. The value is displayed as 2.00 just before the value is printed but not displayed in the form.

Thanks,

Anju

0 Kudos

>

> There is no coding which is removing the values from the data.

So we rule out one possibility. Are there any formatting options associated with the text element ?

Former Member
0 Kudos

Hi,

I have not provided any formatting options for the text element.

Thanks,

Anju

0 Kudos

>

> I have not provided any formatting options for the text element.

What is the definition of the field you are using to display the text-element ?

0 Kudos

Hi,

Whts the type of the field u r displaying in the smartform?

if u r using other types just use the correct type for tht.

so it will automatically adjusted according to that.

With Regards,

Sumodh.P

Former Member
0 Kudos

Try passing the current itab-value to a Global variable inside the smartform:

create global variable:

*variable type P decimals 2

so in the window's text you can pass the current value to the global variable so it displays the 2 decimals places.

global_value = curr_value

hope it helps.

Former Member
0 Kudos

for smartforms, use the format:

&field(<10.2)&

means your field value, with 10 positions, and two decimals....

hope it helps

Former Member
0 Kudos

Hello,

If I try using p(.3) It gives me an error "incorrect formatting".

Thanks,

Anju

0 Kudos

Hi,

If you want to display 2 decimal places in smartforms then use

&fieldname(.2)&

Regads,

Chintan Shah

Former Member
0 Kudos

k