2007 Sep 21 11:12 AM
hi experts,,
I am working on a DELETION Report which delete the certain Table entries.i want to insert the PARAMETER so that if I enter the values(ex:1000) only that much of entries to be deleted.
can u please give me some hints regarding the logic..
plz help me
mahesh
2007 Sep 21 11:15 AM
Your do
parameters: p_rows(4) type n.
SELECT * up to (p_rows) rows
into table t_data
from <table>
then <table> from table t_data.
2007 Sep 21 11:25 AM
thank you for replye .
do you mean after 1st select ( SELECT * up to (p_rows) rows
into table t_data
from <table>)
we need to use anothe select to put into data t_data
plz replye
2007 Sep 21 11:18 AM
hi,
Parameter: count type p value 0.
loop at itab into wa.
if count <1000.
delete tablename where fld1 = wa-fld1.
count = count +1.
endif.
endloop.
or you can also wirte:
do 1000 times.
delete table where fld1 = wa-fld1.
enddo.