Report Writer: Deletion report for extracts (2)
[deletion] [extracts] [quickreport for d7] [REPORTWRITER] [runtime] [SGRW_EXTRACT] [SGRW_PERFORMANCE] [waiting for report]
- Report Writer: Deletion report for extracts (2)Symptom The program Z_DELETE_ALL_EXTRACTS to delete out-of-date extracts in batch provided with note 131374 fails when attempting to delete large numbers of entries in the GRIX/GREP tables. Other terms REPORTWRITER, SGRW_EXTRACT, SGRW_PERFORMANCE,...
Symptom
The program Z_DELETE_ALL_EXTRACTS to delete out-of-date extracts in batch provided with note 131374 fails when attempting to delete large numbers of entries in the GRIX/GREP tables.
Other terms
REPORTWRITER, SGRW_EXTRACT, SGRW_PERFORMANCE, runtime
Reason and Prerequisites
The program has no selection screen so there is no where of reducing the number of extracts to be deleted.
Solution
Create the attached program Z_DELETE_EXTRACTS.
This program provides a selection screen with the following input possibilities:
REPGROUP – Here you can enter a report group or range of report groups for which you want to delete the out-of-date extractsDATE – The date meant here is the expiry date of the extract.
Here you can enter a date or range of dates.
The ‘from’ date is an oblidatory entry. If you leave the ‘to’
date empty then the date used is sy-datum – 1.TESTMODE – If you check this flag, then a test run is made and a log
is issued.
This program is designed to be scheduled as a batch job so if it is executed online and more than 1000 entries are found then the program will not be carried out. A corresponding message is issued.
Schedule this program as a batch job daily after midnight, so that all extracts with expired expiry dates are deleted in the night.