Mass Deletion of Roles

Is there a way to delete bunch of roles?.
 
Yeap sure is, but you have to use Debug to do it.

In SE38 run program AGR_DELETE_ALL_ACTIVITY_GROUPS, run in Debug mode, enter in the AGR's you want to delete, when you get to these commands:

CALL FUNCTION 'PRGN_CHECK_SYSTEM_TYPE'
                 EXCEPTIONS
                   SAP_SYSTEM = 1
                       OTHERS = 2.

IF SY-SUBRC <> 1. EXIT. ENDIF.

You need to change SY-SUBRC to equal 1.

This tells the program that it is a SAP AG system, which in turn will let the program continue.

You have the choice of deleting the roles by using Modules (Same as clicking the delete button in PFCG) or directly from tables (this misses a lot of tables and usally leaves the profiles still on the system).

Better to setup a Macro using Modules.
 
Beam Back -> SAP Cafe for Basis Components