2008 Feb 05 11:01 AM
Hi All!!
I have made a custom table Yrepost. I want to maintain the data records in the table such that the table gets refreshed after every 40 days.
It means the data records be deleted after 40 days.
Can you please suggest how to do this? Will a basis administrator reqd. or can a developer do the same through settings etc.
Thanks in advance..
Prabhas
2008 Feb 05 11:06 AM
Hi,
I think you have to write a report for that.
like:
delete dbtab.
then schedule it in background for every 40 days.
Regards,
Renjith Michael.
Hi All!!
I have made a custom table Yrepost. I want to maintain the data records in the table such that the table gets refreshed after every 40 days.
It means the data records be deleted after 40 days.
Can you please suggest how to do this? Will a basis administrator reqd. or can a developer do the same through settings etc.
Thanks in advance..
Prabhas
2008 Feb 05 11:06 AM
Hi,
I think you have to write a report for that.
like:
delete dbtab.
then schedule it in background for every 40 days.
Regards,
Renjith Michael.
2008 Feb 05 11:09 AM
Hi..
Could you please elaborate on that..like the program that is required to be written.
Thanks.
2008 Feb 05 11:19 AM
Hi,
Create a program with name starting with Z or Y.
Inside the program write code like:
tables: <your Y table>.
parameters : date1 type dats value sy-datum.
DELETE <ytable>.
Activate and create a variant.
Then;
Again in the start screen of se38. Just give program name.
Then from menu Program->Execute->Background->You can schedule it there
Regards,
Renjith Michael.
2008 Feb 05 11:44 AM
Hi Michael,
Thanks. But I would need to run the program.
How can I use table maintenence for archiving...records ?
2008 Feb 05 12:54 PM
Hi Prakash
As per my understanding, there is no option to archieve the data in extended table maintenance. You can only delete selected records in table maintainence.
If you want to archieve, then you have to work with SARA - T-Code, Since you are talking abt the Ztable, there will be no SAP standard archieving object. You have to develop an archiving object for the same.
In my opinion, it is better to create an ABAP program which will delete records based upon the creation date ( if Creation date >= 40).
For this there should be a creation date field in your Zreport.
After creating a Zreport, then create a background job using this zreport and schedule it for every 40 days.
Please reward, if you problem is solved.
BR
Sree
2008 Feb 05 1:07 PM
Hi Sreekanth,
Thanks for the reply.
Actually, can you suggest how can I schedule the job for 40 days from SM36.
thanks for the help.
prabhas
2008 Feb 05 1:12 PM
Hi prabhas,
1. In sm36,
2. click button Start-Condition
new screen will come
3. press button 'Date/Time'
Enter the start date and time. eg. today
4. then below, press the button 'Period Values'
new small screen will come
5. Press button 'Other Period'
new screen will come
6. in the textbox for Day(s), enter 40.
regards,
amit m.
2008 Feb 05 1:49 PM
Hi..
Actually the table does not have created date. Is it then not possible to use the earlier method..
thanks..
prabhas
2008 Feb 05 4:33 PM
Hi,
I did not get your point. What is the other method.
Creation date field should be there. it is the only identitfying field which says about the expire of the record.
There is no point in emptying the table after 40 days, only those records have to be elimitaed which exist for more than 40 days.
BR
Sree
2008 Feb 05 11:14 AM
One of the simplest way that can be done is you can archive all the records in the table after 40 days.
One that was suggested to you earlier in the same thread was to write a delete statement on all the entries of the tables. And schedule that report in every 40 day's.
Best is archieving the records in 40 days.
You need to run the table maintanence generator to maintain entries in the table.
Jayant Sahu.
2008 Feb 05 11:42 AM
Hi Jayant..
Actually the archiving the records is more appropriate in my case as we do not need to run any report for the same.The data is to be automatically archived after 40 days.
Can you please suggest how do we do the table maintenence generator. When I go that in my custom table, I find technical dialog, maintenence screens tab. How can I archive the records.
Thanks in advance..
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |