2010 Apr 23 11:24 AM
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
2010 Apr 23 11:41 AM
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
2010 Apr 23 11:51 AM
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
2010 Apr 23 11:57 AM
>
> 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 ?
2010 Apr 23 12:00 PM
Hi,
I have not provided any formatting options for the text element.
Thanks,
Anju
2010 Apr 23 12:10 PM
>
> 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 ?
2010 Apr 23 12:12 PM
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
2010 Apr 23 9:58 PM
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.
2010 Apr 23 10:39 PM
for smartforms, use the format:
&field(<10.2)&
means your field value, with 10 positions, and two decimals....
hope it helps
2010 Apr 26 6:12 AM
Hello,
If I try using p(.3) It gives me an error "incorrect formatting".
Thanks,
Anju
2010 Apr 24 5:25 AM
Hi,
If you want to display 2 decimal places in smartforms then use
&fieldname(.2)&
Regads,
Chintan Shah
2010 Apr 29 11:44 AM