Hi,
Can any one please let me know i have a filed having 13 characters.in that 3 are decimals.
now my requirement is that i need to remove dot as well as 3 decimals from the value.
For ex: user is giving the width as 50 but while displaying it is showing 50.000.
and another possibility is that user may give 50.50 then 50.50 only to be displayed in the output.
Please any one suggest me the solution.
Regards,
Koti
HI Koti
if it's classical output then use
WRITE <value> NO ZERO.
If alv then put no_zero in field catalog as 'X'
Pushpraj
Hi,
Check this logic:
data: val type p decimals 3. data: val1 type i. val = '234.000'. move val to val1. write:/ val1.
thanks\
Mahesh
Hi Koti Reddy
Refer this link somebody faced same issue
hi-removing-the-leading-zero's-before-the-particul
Thanks
Syfulla
Hi,
This works for sure.
Try this.
DATA w_p TYPE p DECIMALS 2 VALUE '123.00'.( take ur packed with ur decimals needed )
DATA w_c(30) TYPE c.
DATA w_temp TYPE i.
w_c = w_p.
CONDENSE w_c.
SEARCH w_c FOR '...'.
IF sy-subrc EQ 0.
w_temp = sy-fdpos.
ENDIF.
ADD 1 TO w_temp.
IF w_c+w_temp EQ 0.
subtract 1 from w_temp.
WRITE :/ w_c+0(w_temp).
ELSE.
WRITE :/ w_c.
ENDIF.
Add a comment