Child pages
  • Cleaning the RSECPROT log tables
Skip to end of metadata
Go to start of metadata

Purpose

To describe how to clean up the analysis authorization log tables. 

Overview

 The wiki contains the report ZRSEC_PROT_DEL which will delete entries from the rseclog_cl and the rseclog.  The main advantage of this program overdeleteing them in RSECADMIN is that you can run this in the background.

How to use Report

Execute the report ZRSEC_PROT_DEL in SE38, choose the timestamps that you will to delete from and run.

Report

REPORT ZRSEC_PROT_DEL.
TABLES: rseclog_cl.

DATA: l_rt_timestamp     TYPE RANGE OF rsddtimestmp,
      l_t_rseclog_cl TYPE TABLE OF rseclog_cl,
      l_s_rseclog_cl TYPE rseclog_cl,
      l_pid        TYPE sysuuid_c,
      l_t_pid      TYPE rsec_t_pid.

"SELECTION-SCREEN BEGIN.
SELECT-OPTIONS s_tmstmp FOR rseclog_cl-timestmp.
INSERT LINES OF s_tmstmp INTO  TABLE l_rt_timestamp.

SELECT * FROM rseclog_cl INTO CORRESPONDING FIELDS OF TABLE l_t_rseclog_cl WHERE timestmp IN l_rt_timestamp.

IF l_t_rseclog_cl IS INITIAL.

   MESSAGE s306(rsec).
EXIT.

ENDIF.
LOOP AT l_t_rseclog_cl INTO l_s_rseclog_cl.
  l_pid = l_s_rseclog_cl-sessionid.
  INSERT l_pid INTO TABLE l_t_pid.
ENDLOOP.

CLEAR: l_t_rseclog_cl.
SELECT * FROM rseclog_cl INTO TABLE l_t_rseclog_cl
  FOR ALL ENTRIES IN l_t_pid
   WHERE sessionid = l_t_pid-table_line.

IF l_t_rseclog_cl IS INITIAL.

  MESSAGE s306(rsec).
  EXIT.
ENDIF.

CLEAR l_pid.
LOOP AT l_t_rseclog_cl INTO l_s_rseclog_cl.

  l_pid = l_s_rseclog_cl.
  DELETE FROM rseclog    WHERE pid       = l_pid.
  DELETE FROM rseclog_cl WHERE sessionid = l_pid.
  CLEAR  l_pid.
ENDLOOP.

CALL FUNCTION 'DB_COMMIT'.

Related Content

Related Documents

Insert SAP Help links or other WIKI content

Related Notes

Insert links to any related notes/KBA that support your topic or are related

  • No labels