‎2006 Oct 27 2:51 PM
Hi Friends,
can you tell me how to remove the decimals using FM (Ex: 20.000) It should display 20.
Thanx in advance,
Venu
‎2006 Oct 27 2:56 PM
Hi,
I think this meet ur needs.
data: data1 type WERTV8 value '16.98'.
write: data1 decimals 0.
Message was edited by: JITHENDRA CHADICHAL
‎2006 Oct 27 2:54 PM
Hi,
You can do that by just using write statement.
WRITE AMOUNT decimals 0.
But if you want to store the the value in ternally ten define a variable with a packed decimals type with decimals 0
Thanks,
Ramakrishna
‎2006 Oct 27 2:56 PM
Hi,
I think this meet ur needs.
data: data1 type WERTV8 value '16.98'.
write: data1 decimals 0.
Message was edited by: JITHENDRA CHADICHAL
‎2006 Oct 27 2:58 PM
‎2006 Oct 27 3:20 PM
Hi Rich,
I am getting the value through subroutine in the form &OFKIMG&, Now I want to display the value without decimals.
Pls tell me how to code it.
Thanx in advance,
Venu.
‎2006 Oct 27 2:58 PM
Hi, u can use this logic.
data: p1 type p decimals 3 value '20.000'.
data: p2 type p decimals 3.
data: p3 type i.
p2 = frac( p1 ).
write:/ p2.
p3 = trunc( p1 ).
write:/ p3.
regards,
VIjay
‎2006 Oct 27 3:05 PM
hi Venu,
Pass those values to an integer variable ..
i.,e
data : v_int type i,
v_flo type f value '20.00'.
v_int = v_flo.
write : v_int, v_flo.Regards,
Santosh
‎2006 Oct 27 3:36 PM
Hi , in ur form
lets say &itab-OFKIMG& is giving u 20.00
&itab-OFKIMG(4.0)&,
will give u 20.
&itab-OFKIMG(4.0)&,
do this and check the value ..save +activate.
regards,
Vijay
‎2006 Oct 27 3:48 PM
hi
good
use this function module
CONVERSION_EXIT_ALPHA_OUTPUT converts any number with zeroes right into a simple integer
store your value into a string and conver it
200000 than pass that variable through this function module you ll get your result.
thanks
mrutyun^