cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Add/ Remove a User Role

lrayapat73
Participant
0 Kudos

Hi Team,

I have come across following BAPIs to add or remove a role.

BAPI_USER_LOCACTGROUPS_ASSIGN - This is removing all existing roles and adding the new role. Is there any alternative BAPI to add a specific role, without removing current roles ?

Does the timestamp for the existing roles will change each time we add a new role ?

BAPI_USER_LOCACTGROUPS_DELETE - This is removing all the roles, is there any alternative BAPI to remove any specific role ?

Thanks in advance!!!

BR,

Kumar

View Entire Topic
jmodaal
Active Contributor

Hello,

BAPI_USER_LOCACTGROUPS_ASSIGN is the one for CUA's. Don't have experience with it, but I guess it is nearly the same as for non CUA's (BAPI_USER_ACTGROUPS_ASSIGN).
If so, then use function module BAPI_USER_LOCACTGROUPS_READ to read the already assigned roles. Use the received ACTIVITYGROUPS table to fill the one in the ...ASSIGN function module.

For adding a role just add an entry in table ACTIVITYGROUPS.

For removing a role just delete the entry for the role.

lrayapat73
Participant
0 Kudos

Thanks Jan