cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal places in Smartforms

Former Member
0 Kudos

Hi All,

In smartforms, to control the number of decimal points in a field we can use the formatting option

&symbol(.N)&

for e.g.

The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.

&EKPO-MENGE(.1) -> 1,234.6

&EKPO-MENGE&(.4) -> 1,234.5600

&EKPO-MENGE&(.0) -> 1,235

Can we use a variable instead to giving the number directly ?

like

data length type i .

length = '1'.

&EKPO-MENGE(.length) -> 1,234.6

Will this approach work.

Thanks,

Mandeep

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hope you have declared the length variable in global data only.

Former Member
0 Kudos

i think there is no wildcharacter options for decimal places but inly there on output lenght....

Former Member
0 Kudos

hi!

I think it cannot be done...hav u tried it...

try it and tell if it works....

Former Member
0 Kudos

I tried this way, but didn't get the output.

If any one has done this before, please share the experience.

Might be I am missing some wildcharacter etc in formatting.

Former Member
0 Kudos

Hi,

remove quotes.

length = 1.

try it now.