10-10-2007 11:23 AM
There is a table in which one field is of type DEC 8 2.
I have to select all records for which this field can have decimal places( I mean decimal places have some value instead of '00' ).
How to write my SELECT stmt ?
For eg 12.00 , 657.00, 123.12...
I need to SELECT only 123.12 value .
Could you please suggest me how can I SELECT those values in my SELECT stmt ?
Thanks,
10-10-2007 11:38 AM
I dont think you can restrict this condition in select qery. Better you can fetch all the records into an int table and then delete which have 00 decimals.
first select all the data in itab.
data : v_amt type i,
v_res type i.
loop at itab.
v_amt = itab-amt * 100.
v_res = v_amt mod 100.
if v_res = 0.
delete itab.
endif.
endloop.
now it will delete all 00 decimals records from itab.
regards
shiba dutta
10-10-2007 11:38 AM
I dont think you can restrict this condition in select qery. Better you can fetch all the records into an int table and then delete which have 00 decimals.
first select all the data in itab.
data : v_amt type i,
v_res type i.
loop at itab.
v_amt = itab-amt * 100.
v_res = v_amt mod 100.
if v_res = 0.
delete itab.
endif.
endloop.
now it will delete all 00 decimals records from itab.
regards
shiba dutta