Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete a lot of roles comfortable

Former Member
0 Kudos

Hi,

we've got to delete a lot of roles and don't want to do it step by step. Is there a possibility to do this more comfortable by a special program or with any tool ?

Regards

p121848

5 REPLIES 5

Former Member
0 Kudos

You can create an eCATT to do this (google for ecatt tutorial if you are not familiar with this) very easily.

Deleting 4000 roles in a working day should be achievable on an OK dev box.

If they are in Prod then don't forget to put them in a transport before you delete them.

Former Member
0 Kudos

Hi p121848...

You can run program AGR_DELETE_ALL_ACTIVITY_GROUPS in Debug mode and enter in the AGR's you want to delete, when you come across the syntax below:

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.

You may also try it through SCAT

Thanks,

Saby..

0 Kudos

Hi Alex and Saby..,

thank you for your useful help. Meanwhile I found note Note 313587 "Mass deletion of activity groups" which gives a good solution as well. A report is attached that starts the function modul CALL FUNCTION 'PRGN_ACTIVITY_GROUP_DELETE' for all roles selected.

Regards

p121848

0 Kudos

hi p121848

i tried to do the PRGN_ACTIVITY_GROUP_DELETE

but its asking like enter the object beloning to the role in the transport request if you want to transport the deletion.

so can you please help me on this

0 Kudos

Hi p574906,

the report Z_DEL_AGR, which is attached to the note 313587, calls the FM in this way:


        CALL FUNCTION 'PRGN_ACTIVITY_GROUP_DELETE'
             EXPORTING
                  ACTIVITY_GROUP                = ACTTAB-AGR_NAME
                  show_dialog                   = ' '
                  ENQUEUE_AND_TRANSPORT         = 'X'
             EXCEPTIONS
                  . . .

The PARAMETER SHOW_DIALOG is set to space. So no dialog is poping up , no message appears saying:

First enter the object belonging to the role in a transport request if you want to transport the deletion. If you continue processing now, you can then only transport the deletion if the role was already entered in a transport request.

This message tries to say what Alex already mentioned:

"If they are in Prod then don't forget to put them in a transport before you delete them."

The parameter ENQUEUE_AND_TRANSPORT is switched on. That means: if a role is not enqueued by an other user, the role is enqueued during deletion. Though the parameter is set to 'X' there is no check, whether the role is already fixed in a transport.

Regards

p121848