Application Development and Automation 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: 
Read only

BAPI for user role deletion

Former Member
0 Likes
3,981

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
Read only

Former Member
0 Likes
2,752

Use

BAPI_USER_PROFILES_DELETE

BAPI_USER_LOCACTGROUPS_DELETE

Hope this helps.

Vinodh Balakrishnan

11 REPLIES 11
Read only

Former Member
0 Likes
2,753

Use

BAPI_USER_PROFILES_DELETE

BAPI_USER_LOCACTGROUPS_DELETE

Hope this helps.

Vinodh Balakrishnan

Read only

0 Likes
2,752

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

Read only

0 Likes
2,752

Hi Kashinath,

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

Shylesh

Read only

0 Likes
2,752

Hi Vinodh,

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

Shylesh

Read only

0 Likes
2,752

Hi Sailesh,

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

Kashi

Read only

0 Likes
2,752

Hi Kashinath,

It should be used in local systems only.

Is there any central user administration configured in your system?

Shylesh

Read only

0 Likes
2,752

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

Read only

0 Likes
2,752

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.

Read only

0 Likes
2,752

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

Read only

0 Likes
2,752

Thanks!! points awarded

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

Read only

Former Member
0 Likes
2,752

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