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: 

Delete roles in group

Former Member
0 Kudos

Hello...someone knows how to delete roles in group?? i want to delete a lots of roles and i need some help

thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

If you do a search on mass role delete you will find a few threads which give you some ideas how you can achieve this.

9 REPLIES 9

Former Member
0 Kudos

Hi,

If you do a search on mass role delete you will find a few threads which give you some ideas how you can achieve this.

0 Kudos

thanks for answer, but...do you have the link where the peolple talk about mass role delete?? thanks for all

0 Kudos

Yes, the FAQ sticky thread at the top of the forum.

There are some other usefull infos and general idea of using the search a layer below it.

Cheers,

Julius

Former Member
0 Kudos

Hi,

You dont have any option for deleting mass roles. can do one by one using PFCG.

Step 1: Go to PFCG

Step 2: Enter the role name to delete.

Step 3: Push the 'Delete' icon.

But please ensure that there are no other open transports where the roles are involved.(Use SE03 for this purpose).

Edited by: Ponmozhi on Sep 8, 2009 8:52 AM

0 Kudos

> You dont have any option for deleting mass roles. can do one by one using PFCG.

Funny, in that case I have done the impossible several times

If OP uses the search some options like using SECATT to repeat the pFCG steps for multiple roles will pop up.

0 Kudos

may be.... sinece the word itself says "I'm possible'......

Good to know that there are options for doing the same. May i know the procedure for the same....

Former Member
0 Kudos

Go to t-Code SE38

Enter the below mention Program

AGR_DELETE_ALL_ACTIVITY_GROUPS

Enter the list of roles

Select delete

0 Kudos

Hi Ravi,

That won't work without changes to the code in that program.

0 Kudos

Hi everybody, yesteday looking for some information about delete roles, i found this...

https://service.sap.com/sap/support/notes/313587

here, there is a program that delete all roles in mass.... you need to have your id and pass in SAP, well if you dont have..here are the code source. This solve my problem..i hope that solves yours problems

REPORT Z_DEL_AGR .

*----


*

  • Version valid from 4.5b - 7.00 *

*----


*

TABLES : AGR_DEFINE.

DATA: BEGIN OF ACTTAB OCCURS 0,

AGR_NAME LIKE AGR_DEFINE-AGR_NAME,

END OF ACTTAB.

SELECT-OPTIONS ACTGRP FOR AGR_DEFINE-AGR_NAME.

PARAMETERS: TEST(1) DEFAULT 'X'.

  • F4 Hilfe für die Aktivitäsgruppe

AT SELECTION-SCREEN ON VALUE-REQUEST FOR ACTGRP-LOW.

DATA: SELECTED_VALUE LIKE AGR_DEFINE-AGR_NAME.

CALL FUNCTION 'PRGN_ACTIVITY_GROUPS_F4_HELP'

IMPORTING

SELECTED_VALUE = SELECTED_VALUE

EXCEPTIONS

NO_ACTIVITY_GROUP_SELECTED = 1

OTHERS = 2.

IF SY-SUBRC = 0.

ACTGRP-LOW = SELECTED_VALUE.

ENDIF.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR ACTGRP-HIGH.

DATA: SELECTED_VALUE LIKE AGR_DEFINE-AGR_NAME.

CALL FUNCTION 'PRGN_ACTIVITY_GROUPS_F4_HELP'

IMPORTING

SELECTED_VALUE = SELECTED_VALUE

EXCEPTIONS

NO_ACTIVITY_GROUP_SELECTED = 1

OTHERS = 2.

IF SY-SUBRC = 0.

ACTGRP-HIGH = SELECTED_VALUE.

ENDIF.

START-OF-SELECTION.

SELECT AGR_NAME FROM AGR_DEFINE

INTO CORRESPONDING FIELDS OF TABLE ACTTAB

WHERE AGR_NAME IN ACTGRP.

LOOP AT ACTTAB.

CALL FUNCTION 'PRGN_AUTH_ACTIVITY_GROUP'

EXPORTING

ACTIVITY_GROUP = ACTTAB-AGR_NAME

ACTION_DELETE = 'X'

  • MESSAGE_OUTPUT = 'X'

EXCEPTIONS

NOT_AUTHORIZED = 1

OTHERS = 2.

IF SY-SUBRC EQ 0.

IF TEST EQ SPACE.

WRITE : / 'Delete : ', ACTTAB.

CALL FUNCTION 'PRGN_ACTIVITY_GROUP_DELETE'

EXPORTING

ACTIVITY_GROUP = ACTTAB-AGR_NAME

show_dialog = ' '

ENQUEUE_AND_TRANSPORT = 'X'

EXCEPTIONS

NOT_AUTHORIZED = 1

TRANSPORT_CHECK_PROBLEM = 2

TRANSPORT_CANCELED_OR_PROBLEM = 3

ONE_OR_MORE_USERS_ENQUEUED = 4

FOREIGN_LOCK = 5

USER_CANCELS_ACTION = 6

OTHERS = 7.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ELSE.

WRITE : / 'Test Delete : ', ACTTAB.

ENDIF.

ELSE.

WRITE : / 'Missing authorization for :', ACTTAB-AGR_NAME.

ENDIF.

ENDLOOP.