Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding arching tables data

Former Member
0 Likes
561

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

5 REPLIES 5
Read only

Former Member
0 Likes
526

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

Read only

0 Likes
526

Yes i want to do through a program only.. can u give me some tips on this ...

Thanks,

Suresh

Read only

0 Likes
526

hello sukumar,

and also can u tell me is there any other way to do so??

Read only

0 Likes
526

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

Read only

Former Member
0 Likes
526

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