Child pages
  • Report to fix error where analysis authorizations are showing as inactive
Skip to end of metadata
Go to start of metadata

Purpose

To supply a report to correct analysis authorizations showing as inactive after the 7.0 -> 7.3 Analysis Authorization Migration.

Overview

After a 7.0 -> 7.3 Analysis Authorization Migration 0BI_ALL may be corrupted and showing as "Inactive, Non-executable in RSECADMIN"

This is due to extries in the tables RSECVAL, RSECBIAU and RSECHIE where OBJVER is blank (i.e.  ' ' when it should be 'A' or 'M')

The 'A' and 'M' values may also be there, but the ' ' values are causing the incorrect display and needs to be deleted.

 

Report

 

Error rendering macro 'code': Invalid value specified for parameter 'com.atlassian.confluence.ext.code.render.InvalidValueException'
*&---------------------------------------------------------------------* 
*& Report  ZWK_DELETE_INACTIVE_AUTHS 
*&---------------------------------------------------------------------* 
*& 
*& TITLE: Delete inactive authorizations *& 
*& CREATED ON: 18 Feb 2014 *& 
*& CREATED BY: Brian Keenan *& 
*& DESCRIPTION: This program can be used to find or delete the problem 
*&              of authorizations which are showing as inactive in 
*&              the transaction RSECADMIN. 
*&---------------------------------------------------------------------*
REPORT  ZWK_DELETE_INACTIVE_AUTHS.
TYPE-POOLS: rs, rro04, rzi0, rri1.
TABLES: RSECVAL.
*Declare workareas and table types 
DATA: 	wa_rsecval TYPE rsecval,       
	gt_rsecval TYPE TABLE OF RSECVAL,
      	wa_rsecbiau TYPE rsecbiau,       
	gt_rsecbiau TYPE TABLE OF RSECBIAU,
      	wa_rsechie TYPE rsechie,       
	gt_rsechie TYPE TABLE OF RSECHIE,
	wa_rsectxt TYPE rsectxt,       
	gt_rsectxt TYPE TABLE OF RSECTXT.
 
SELECTION-SCREEN BEGIN OF BLOCK chk WITH FRAME TITLE chkTitle.   
	PARAMETERS: 	Check  RADIOBUTTON GROUP sel DEFAULT 'X',               
			Update RADIOBUTTON GROUP sel.
SELECTION-SCREEN END OF BLOCK chk.

 
SELECTION-SCREEN BEGIN OF BLOCK tab WITH FRAME TITLE tabTitle.
  	SELECTION-SCREEN: BEGIN OF LINE.     
		SELECTION-SCREEN: COMMENT 2(20) textval.     
		PARAMETERS val_tab AS CHECKBOX.   
	SELECTION-SCREEN : END OF LINE.

 
	SELECTION-SCREEN: BEGIN OF LINE.     
		SELECTION-SCREEN: COMMENT 2(20) textbiau.     
		PARAMETERS biau_tab AS CHECKBOX.   
	SELECTION-SCREEN : END OF LINE.
  
	SELECTION-SCREEN: BEGIN OF LINE.     
		SELECTION-SCREEN: COMMENT 2(20) texthie.     
		PARAMETERS hier_tab AS CHECKBOX.   
	SELECTION-SCREEN : END OF LINE.

 
	SELECTION-SCREEN: BEGIN OF LINE.     
		SELECTION-SCREEN: COMMENT 2(20) texttxt.     
		PARAMETERS txt_tab AS CHECKBOX.   
	SELECTION-SCREEN : END OF LINE.
 
SELECTION-SCREEN END OF BLOCK tab.
 
INITIALIZATION.   
textbiau = 'RSECBIAU'.   
textval = 'RSECVAL'.   
texthie = 'RSECHIE'.
texttxt = 'RSECTXT'.
chkTitle = 'Check or Update'.   
tabTitle = 'Select table to Check'.

 
START-OF-SELECTION.
*Select all authorizations that have the error of OBJVERS = ' ' 
*from the tables that the user has selected.
  
IF val_tab = 'X'.       
	SELECT * FROM RSECVAL INTO TABLE gt_rsecval WHERE OBJVERS = ' '.         
	IF sy-subrc = 0.             
		WRITE: / 'The RSECVAL Table contains the following errors:'.
            
		LOOP AT gt_rsecval into wa_rsecval.               
			WRITE: /  'Authorization', wa_rsecval-TCTAUTH, 'has a record with OBJVERS Blanks'.             
		ENDLOOP.
            
		IF Update = 'X'.                 
			DELETE FROM RSECVAL WHERE OBJVERS = ' '.                 
			IF sy-subrc = 0.                   
				WRITE: /  'Above Authorizations with error now removed'.                 
			ENDIF.             
		ENDIF.
       	ENDIF.   
ENDIF.

 
IF biau_tab = 'X'.       
	SELECT * FROM RSECBIAU INTO TABLE gt_rsecbiau WHERE OBJVERS = ' '.         
	IF sy-subrc = 0.             
		WRITE: / 'The RSECVAL Table contains the following errors:'.
            
		LOOP AT gt_rsecbiau into wa_rsecbiau.               
			WRITE: /  'Authorization', wa_rsecbiau-AUTH, 'has a record with OBJVERS Blanks'.             
		ENDLOOP.
            
		IF Update = 'X'.                 
			DELETE FROM RSECBIAU WHERE OBJVERS = ' '.                 
			IF sy-subrc = 0.                   
				WRITE: /  'Above Authorizations with error now removed'.                 
			ENDIF.             
		ENDIF.
       	ENDIF.   
ENDIF.
  
IF hier_tab = 'X'.       
	SELECT * FROM RSECHIE INTO TABLE gt_rsechie WHERE OBJVERS = ' '.         
	IF sy-subrc = 0.             
		WRITE: / 'The RSECVAL Table contains the following errors:'.
            
		LOOP AT gt_rsechie into wa_rsechie.               
			WRITE: /  'Authorization', wa_rsecval-TCTAUTH, 'has a record with OBJVERS Blanks'.             
		ENDLOOP.
            
		IF Update = 'X'.                 
			DELETE FROM RSECHIE WHERE OBJVERS = ' '.                 
			IF sy-subrc = 0.                   
				WRITE: /  'Above Authorizations with error now removed'.                 
			ENDIF.             
		ENDIF.         
	ENDIF.   
ENDIF.
 
IF txt_tab = 'X'.       
	SELECT * FROM RSECTXT INTO TABLE gt_rsectxt WHERE OBJVERS = ' '.         
	IF sy-subrc = 0.             
		WRITE: / .             
		WRITE: / 'The RSECTXT Table contains the following errors:'.             
		LOOP AT gt_rsectxt into wa_rsectxt.               
			WRITE: /  'Authorization', wa_rsectxt-TCTAUTH, 'has a record with OBJVERS Blanks'.             
		ENDLOOP.
            
		IF Update = 'X'.                 
			DELETE FROM RSECTXT WHERE OBJVERS = ' '.                 
			IF sy-subrc = 0.                   
				WRITE: /  'Above Authorizations with error now removed'.                 
			ENDIF.             
		ENDIF.         
	ENDIF.   
ENDIF.

 

 

 

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