‎2008 Mar 25 6:56 AM
Hi,
I have a little issue.
I have one variable v = 25.000
and i want to remove (.000) from this variable so my result will be only 25 and i want this.
So, is ther any function to remove this?
I want to do it in one shot.
No 2-3 statements.
Points rewarded soon
Regards
RH
‎2008 Mar 25 7:06 AM
HI
Declare the variables as
data: v_number type p decimals 0.
Regards
Aditya
‎2008 Mar 25 7:07 AM
Define one integer type variable and pass the data to it.
data: v_amt type i.
v_amt = 25.000.
‎2008 Mar 25 7:09 AM
‎2008 Mar 25 7:15 AM
Hi Ronny,
Calling a function is performance intensive for this functionality. Why do you want to use a function when the same could be attained only by two statements.
Still if you think, the same should be done... you could write your own function module for it with the two lines of code.
Reward points if this helps,
Kiran
‎2008 Mar 25 7:10 AM
Hi Ronny,
You move this variable data to an integer variable.
Data: v_tempint type i.
move your_variable to v_tempint.
v_tempint will have the required result.
Reward points if this helps,
Kiran
‎2008 Mar 25 7:11 AM
data: tt type p decimals 3,
ch(10) type c.
tt = '233.453'.
write:/ tt decimals 0.
reward if useful........
‎2008 Mar 25 7:12 AM
data: tt type p decimals 3,
ch(10) type c.
tt = '233.453'.
write tt to ch decimals 0.
write:/ ch.
‎2008 Mar 25 7:18 AM