Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos

Users Role change

Basically SAP users have one or more roles.

In SAP User Management we can’t just add, delete or edit the
roles which are assigned to the particular user.

We are assigning the roles to the user while creating the
new user using BAPI ‘BAPI_USER_LOCACTGROUPS_ASSIGN’ . 

SAP doesn’t have any BAPI or RFC for changing the user’s
roles separately.

Solution:

If you want to add the additional roles to the user, then
first read the users previous assigned roles from the system & add this
additional new roles to the previous roles list and call the BAPI ‘BAPI_USER_LOCACTGROUPS_ASSIGN’
and pass the previous roles list which is having new roles also.

Same way if you want to delete some roles of the user, then
remove the particular roles from the user’s previous roles list and call the
BAPI ‘BAPI_USER_LOCACTGROUPS_ASSIGN’ and pass new roles list.