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: 

Remove multiple roles from multiple user.

Former Member
0 Kudos

I want to remove multiple Roles from multiple users but there is also condition that in all user there is no all roles exist.

in  some user there is one or two roles or more roles are not exist .

so give me easy way to remove roles.

and i don't want to remove user using PFCG or SU01 it's to much long process.

..thanks in advance

9 REPLIES 9

Former Member
0 Kudos

how about export the users from agr_users or suim to excel, create listing of user/role-to-remove.  create ecatt script on su10 to automate one user-role at a time to remove the role from excel list.

0 Kudos

This is what I would do also.

0 Kudos

I thought it might be useful to add why I think SU10 & scripting is good for this.  SU10 can be used to append or remove single roles from a user.

In the case of removing roles you only need to create your file with the following data elements:

USER ID, ROLE, FROM DATE, TO DATE

Script SU10 so it performs a single removal operation and it can then work it's way through the file only removing what is required.  There is no need to do any clever stuff in SU01 to pick out specific roles.  I was doing all sorts of fancy stuff until someone showed me the SU10 trick.

Former Member
0 Kudos

It does not matter whether User A has all the roles and User B only has one or two roles or another variant you want to remove.

SU10 basically contains the functionality you require http://www.sapsecuritypages.com/mass-user-changes/

0 Kudos

He's right.  Just remove all required roles from all required users.
Users who do NOT have a particular role - no change will happen.

0 Kudos

But that means that if the user does have the role and is meant to keep it, then it is removed.

use the "Authorization data" tab and in the select options of the users dialog there is a taskbar for import from file / clipboard.

Or do it in one go via BAPIs...

Cheers,

Julius

0 Kudos

Yes, this seems to fit the requirement - if I understood it correctly :-).

For selective removals, a SAPGui Script or ECATT with SU10 would be my preference.

Former Member
0 Kudos

Try LSMW t-code. You can create a custom script for your requirements.

Former Member
0 Kudos

This message was moderated.