Introduction


Admin tables archiving is a process to archive the data from admin and log tables to improve the system performance.
We should not delete the data from certain admin and log tables as it could lead to irreversible issues, dumps and lead to unstable system. So to free up the disk space it is only possible to archive the data which is still accessible by the system and then delete the data from the system. The archived files should never be deleted and should always remain in the system.
Performing this activity manually by process chain or tcode SARA periodically (yearly or half yearly) allows up to save space on the database and also improves the system performance. It can't be automatically because we need to:

  1. Change variants
  2. Make sure that there is no job running to update admin tables during archive data

The below mentioned tables are part of the admin archiving process. This information can be found in transaction 'AOBJ' for the archiving object 'BWREQARCH'


Table 

Description

RSBMLOGPAR 

Hierarchical Log: Field/Value Pair

RSBMLOGPAR_DTP 

DTP Log: Field/Value Pairs

RSBMNODES 

Hierarchical Log: Nodes

RSBMONMESS 

Hierarchical Log: Table with Messages

RSBMONMESS_DTP

DTP Log: Table With Messages

RSBMREQ_DTP 

DTP Log: Status of Header Table

RSCRTDONE 

CRT Packages Enhancements for Apollo

RSDELDONE 

BW: Selection Table for Deletion with Full Update Scheduler

RSHIEDONE 

Selection table for Fields Scheduler

RSLDTDONE 

Texts on the requested InfoPackages and groups

RSMONFACT 

Fact table monitor

RSMONICTAB 

Monitor IC table

RSMONIPTAB 

InfoPackage for the monitor

RSMONMESS 

Messages for the monitor

RSMONRQTAB 

Monitor table for request IDocs

RSREQDONE 

Monitor: Saving of the QM entries

RSRULEDONE 

ABAP Code for Scheduler Selections

RSSELDONE 

Monitor: Selections for executed request

RSTCPDONE 

Selection table for 3rd party; Scheduler

RSUICDONE 

BIW: Selection table for user-selection update ICs


The size of the following SAP Tables cannot be reduced as they contain important information for the smooth operation of the BW System

Table

Description

RSBKREQUEST

(SAP Table - DTP Request)

RSPCCHAIN

(SAP Table - Table for Process Chain details)

RSREQDONE

(SAP Table - Monitor: Saving of the QM entries)

RSMONICDP

(SAP Table – Monitor Request Data Packet Table)

Prerequisites

Logical file names

In SARA t-code as shown in the below screen shot.
Provide the archiving object name as 'BWREQARCH', Click on 'Customizing' and then double click on the 'Technical Settings'.

Check if the logical file name is maintained or not.


We can check the physical file path in 'FILE' transaction or using the FM 'FILE_GET_NAME'
Execute the FM and provide the file path to get the physical file paths.

File name = [Folder]/"archive__"[MMDD]"_."[HHMMSS].[UserID]

[Folder] = /saparchive/technical  in WBP

Background Jobs

Ensure the background jobs stopped (including process chains) before the archiving process gets started 

Others!?

Is the Central Repository for storage maintained using the SAP Content Management Infrastructure? Need to check on this aspect.

Are the deletion program variants maintained?

Is the maximum archive file size correctly set?
Is the deletion program to run automatically?
Have authorization to archive data?
Are enough locks exists in the system?

Capture before image of the admin tables

Execute the program ZTECH_TABLES_REC_CNT to get the before image of the admin tables i.e. get the record count of the admin tables.


Capture before image of DB02

Step by step process

There are two steps involved while performing the archiving.

  1. Write data to archive files
  2. Delete the archived data from the respective tables

1. Write data to archived files

Go to T-code 'SARA' and provide the archiving object name as 'BWREQARCH'
Click on 'Write' button

We need to create a variant for the data archival process i.e. selection parameters which specifies what data to be written on files.
Click on the 'Maintain' button then provide the new variant name and click on 'Create' button

As shown below check the option and click 'Continue' button

Provide the date range if a specific period of data to archive else just provide the value in the filed 'Request Older than (months)'
Choose the radio button 'Only Archive New Requests' if we want to archive the new data (which was not archived before); Choose 'Only Reloaded Requests' if we want to archive the reloaded requests(i.e.Archived data which was reloaded); Choose 'Archive All Requests' if we want to archive both the new and reloaded data.
Let the Min. Number Requests remain '1000' i.e. If the no requests to be archived be more than 1000 else the archiving won't start.
Check the button 'With DTP Requests' as we also archive the DTP requests.
For a simulation run then select the radio button 'Test Run' and select 'Production Mode' for the archiving the data

Maintain the start date and spool parameters and then click execute button.

Click on the Job Icon to view the request in the background.

2. Delete the archived data from the respective tables

Go to t-code 'SARA' and click on 'Delete' button

Maintain the Archive Selections, Start Date & Spool Parameters.




Maintain start date and spool parameters and then click execute.

Check logs

Click on management & Statistics to check the load status & overall statistics.


Check the files on AL11.

How to archive by process chain

Process chain PC_AAT_01 (Admin Tables Archiving) includes 2 programs that are the same as tcode SARA. 

  1. To archive data, which use program RSREQARCH_WRITE with variant ZV_2014_ALL (it must be changed the date before run the PC)
  2. To delete data, which use program RSREQARCH_DELETE with variant SAP&PROD (no need to change - only mark production mode)However, we need change variant manually. 

Reference SAP Notes

 SAP NOTE

 SHORT TEXT – remark

1812238

Archive File Not Accessible" in SARA (no backup available)

 950612

 P9; request archiving: Archiving multiple requests as initial

 2177801

provides report RSREQARCH_DTP_CONDENSE_LOGS in order to delete after the 'normal' archiving, more records of table RSBMONMESS_DTP, RSBMREQ_DTP, and RSBMLOGPAR_DTP, correction of SAP Note  2239379 should be available

 2346654

 report RSREQARCH_CHECK_DEL_OBS_MESS


Reference Links

https://help.sap.com/saphelp_erp60_sp/helpdata/en/42/ea99e6b2161bc9e10000000a11466f/content.htm?no_cache=true
https://help.sap.com/saphelp_erp60_sp/helpdata/en/4d/8c8487910b154ee10000000a42189e/frameset.htm
https://wiki.scn.sap.com/wiki/display/BI/Reduce+BW+Request+Administration+Tables https://wiki.scn.sap.com/wiki/display/BI/Archiving+Request+Information+in+BW