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

Smartform leading zeros

brkcnplt
Explorer
0 Likes
1,540

Hi experts ,
I'm trying to delete zeros from a variable.
I have already tried

&variable(Z)& 

and

&variable(.0)&

and

REPLACE ALL OCCURRENCES OF '.000' IN gv_amount_str WITH ' '.


But non of them is worked for my stituation.
If I give to variable as value 2,500 (with comma) , displaying as 2.500 (with dot).
But I want to display it as 2,5 (with comma).

Is there any idea please ?
Regards .

Hi experts ,
I'm trying to delete zeros from a variable.
I have already tried

&variable(Z)& 

and

&variable(.0)&

and

REPLACE ALL OCCURRENCES OF '.000' IN gv_amount_str WITH ' '.


But non of them is worked for my stituation.
If I give to variable as value 2,500 (with comma) , displaying as 2.500 (with dot).
But I want to display it as 2,5 (with comma).

Is there any idea please ?
Regards .

3 REPLIES 3
Read only

venkateswaran_k
Active Contributor
1,405

Slight confusion

You said leading zeros and asking for comma instead of dot

Can you please show your requirement - screenshot.

is this value is numeric data type?

Read only

venkateswaran_k
Active Contributor
1,405

Hi

In form initialization section add the following statement.

SET COUNTRY 'GB' or 'US'

or you can use &variable(K)&

Secondly,

&variable(.N)& Display up to N decimal places ( N can be 0)

&variable(C)& Compress Spaces

I hope both above you know it.

Just set the Country in Initialization tab of Form -

This will correct the dot / comma issue.

Read only

0 Likes
1,405

Hi

Is this resolve the issue?