‎2007 Apr 27 11:25 AM
Hi friends,
i have a value for exp 1,56
can i just pick up the non-decimal part
1,56----
> 1
or 45,78----
> 45
i don't want to stock the value as a text using write 1.45 to X, i want to stock it as a numeric value.
Thanks
Soufiane
‎2007 Apr 27 11:30 AM
‎2007 Apr 27 11:27 AM
hi,
move that value to an integer variable.
u will get the ifrst part.
Regards
Reshma
‎2007 Apr 27 11:29 AM
Hi,
Define a var as integer and use move to decimal value into the integer var.
Thanks,
Rohan
‎2007 Apr 27 11:30 AM
‎2007 Apr 27 11:31 AM
REPORT YCHATEST1.
DATA : V_NUM TYPE P DECIMALS 2 VALUE '1.45',
V_INT TYPE I.
V_INT = V_NUM.
WRITE :V_INT.
‎2007 Apr 27 11:32 AM
Hai,
Use:
<b>FLOOR(VALUE)</b> to get integer part.
CIEL(VALUE) to get next integer of the integer part
Example Code:
<b>DATA:
W_VAL1 TYPE P DECIMALS 2 VALUE '23.4'.
W_VAL1 = FLOOR( W_VAL1 ).
WRITE:
/ W_VAL1.</b>
Hope this helps you.
Regds,
Rama.Pammi
‎2007 Apr 27 11:35 AM
‎2007 Apr 27 11:35 AM