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: 

BAPI for user role deletion

Former Member
0 Kudos

Hi,

I want to delete all the roles associated for a USER in SU01, is there any bapi or FM available for the same purpose ??

Thanks in advance.. please reply ASAP.

Kashi

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Use

BAPI_USER_PROFILES_DELETE

BAPI_USER_LOCACTGROUPS_DELETE

Hope this helps.

Vinodh Balakrishnan

11 REPLIES 11

Former Member
0 Kudos

Use

BAPI_USER_PROFILES_DELETE

BAPI_USER_LOCACTGROUPS_DELETE

Hope this helps.

Vinodh Balakrishnan

0 Kudos

Hi,

Thanks for the response.. but deleting the profiles means deleting the roles? As when i see the roles and profiles for a user, lot of roles are there but no profiles found in the profile tab. can you please clarify me regarding this?

Thanks

Kashi

0 Kudos

Hi Kashinath,

Use this FM BAPI_USER_ACTGROUPS_DELETE. It will delete the roles only.

Shylesh

0 Kudos

Hi Vinodh,

The BAPI 'BAPI_USER_LOCACTGROUPS_DELETE' is not for local system, it is for child systems in Central User Administration.

Shylesh

0 Kudos

Hi Sailesh,

BAPI_USER_ACTGROUPS_DELETE this bapi to be used in CUAs or in the local systems?

Kashi

0 Kudos

Hi Kashinath,

It should be used in local systems only.

Is there any central user administration configured in your system?

Shylesh

0 Kudos

Hi Sailesh,

Yes there is CUA configured in our system, for Locking all the users and to change Valid Through date we are using BDC in local systems.

And to inactive the user group and change the license type we are runing the BDC in CUA as it was not possible in local system.

Now i have to delete the roles for a pericular user in all the systems so i shud be using CUA for this right ?

Regards,

Kashi

0 Kudos

Hi Kashinath,

This is a tricky one in CUA systems. If you want to create or delete any roles, use the FM which changes the roles. If you pass a blank value, it will override all the roles. (means, delete all existing roles in your situation).

Hope, this will solve your problem.

Else, give me a mail to saileshch@yahoo.com

I can explain you in more detail abt CUA

Shylesh.

0 Kudos

Hi Kashi,

In this case, you can use either of FMs BAPI_USER_LOCACTGROUPS_ASSIGN or BAPI_USER_LOCACTGROUPS_DELETE.

I used the first one, in order to remove or change the existing roles.

shylesh

0 Kudos

Thanks!! points awarded

Edited by: Kashinath Pai on Jan 29, 2008 11:35 PM

Former Member
0 Kudos

Check BAPI.

BAPI_USER_PROFILES_DELETE (Delete Local Profile Assignments of a User )

Functionality

This method deletes all of the profile assignments of the user USERNAME

Regards,

Maha