cancel
Showing results for 
Search instead for 
Did you mean: 

decimal point shifting in subtotal display

Former Member
0 Kudos

hello all,

I have a smartform where I am calculating the subtotal of the field using calculations tab in the table. With variable v _subtotal.

My problem is that, at the output it displays incorrect subtotal i.e. it shifts the decimal point to 1 place right. For example it gives output as 1230.0 instead of the desired output which is 123.00.

Also I am passing the same variable(v_subtotal) to the FM spell_amount and the out put of the FM is displayed correctly. For example in above case the output is ONE HUNDRED TWENTY THREE .

Please can anyone suggest me wat may be the reason for it and how can a solve it.

regards

Prakash

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Prakash,

define that field of type KWERT.

This may help you.

Ravi

Former Member
0 Kudos

Hi Prakash,

I guess your Quantity field will be 3 decimals so u manipulate your Quantity Field by dividing it with 10 and move to a variable and calculate the Total....

Regards,

Vijaya Lakshmi

Former Member
0 Kudos

hello Vijaya,

i am calculating the subtotal for currency field(CURR) with 2 decimals.

Former Member
0 Kudos

what is the type of ur field,

Former Member
0 Kudos

hello kartik,

The field for which i am calculating the subtotal is of datatype CURR with 2 decimal places.

Former Member
0 Kudos

use

Replace '.0' with '.00' into field name..

otherwise

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

&EKPO-MENGE(.2) -> 1,234.60

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

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