‎2008 Jan 07 6:39 AM
Hello Experts,
I need one small help,
I have some ZXXXXX table, In that table i have some 80000 records with dates. Now i want to keep only last 2 days data ( say that means only 100 records will be t here ) now i want to arching the remaning records from the table ZXXXXX to ZXXXXX_XXX.
So can please help me on this ASAP..
Thanks,
Suresh
‎2008 Jan 07 6:41 AM
Suresh,
do you want to archeive from any program or directly. If through program, use select query with the given dates and archive rest into one internal table. Then u append all values from internal table to your Z table.
Suku
‎2008 Jan 07 6:47 AM
Yes i want to do through a program only.. can u give me some tips on this ...
Thanks,
Suresh
‎2008 Jan 07 6:50 AM
hello sukumar,
and also can u tell me is there any other way to do so??
‎2008 Jan 07 6:55 AM
Suresh,
i dont know the other way to do, but in code u can.
First select the last 2 days record from the Z table 1.
select * from ztable1 where date ne date1 and date2.
then move all the balance records to one internal table and move the entire records to your archive table.
loop at itab1 into wa1.
modify zarchive from wa1.
endloop.
try this way.
Suku
‎2008 Jan 07 6:56 AM
Hi,
I understand your requirement.
do onething.while copying from one table to another table
you have to give a conditon on date range i.e you want two last days data so you have to give the condition as from 5/01/08 and leave the upper limit blank.
This can be done with se16 transaction code.
don't go for se11..
regards,
swami