cancel
Showing results for 
Search instead for 
Did you mean: 

Truncation after decimal point

Former Member
0 Kudos
275

Hi,

I have to print two value fields on the Smartform.

These are for example say 22.20 and second is 35.50

Now I am using a custom data element called ZNUM6 whose <b>Domain I used is NUMC</b>.

So it was getting printed as 22 and 36.

So I created new <b>Domain ZN8</b> where I tried to put 6 as length and 2 decimal places and associated it with data element ZNUM6.

Now for ZN8 domain I used data type FLTP but still I find truncation for the values after decimal places.

Can someone suggest me what data type should I use while creating custom domain in this case so that there will be no truncation of decimal values after decimal point?

Tushar.

Accepted Solutions (1)

Accepted Solutions (1)

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

There must be some kind of formatting in the smartform code that is making it do that. In the code for the field &YOUR_FIELD& is there parenthesis with characters in it like......&YOUR_FIELD(Z)&

Regards,

Rich Heilman

Former Member
0 Kudos

Hi,

Data Type DEC with 2 decimals should work. As Rich said there could be a problem in writing variables in smartform. Try debugging the smartform just before writing the variables.

Regards,

Gagan

Former Member
0 Kudos

FLTP domain definitions have fixed lenght of 16 digits and 16 decimals. It is not possible to restrict the definition to 2 decimals. You should have the domain defined to DEC type with 6 digits and 2 decimals and that should fix the errors you have.. - Muthu

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try with DEC type , if the problem with printing means try to use char type with suitable length.

Cheers,

Sasi

Former Member
0 Kudos

hi!!!

try to use data type curr13.

james