Skip to Content
author's profile photo Former Member
Former Member

Delete roles from a certain system : BAPI_USER_LOCACTGROUPS_ASSIGN

Hi All,

I have written a code which determines which users' roles should be deleted from which systems. The code is using BAPI_USER_LOCACTGROUPS_ASSIGN to delete the roles. Now here is what happens in the code:

1. Prepare a list of user's roles ( Lets say user has 5 roles in each of the 10 systems, table has 50 entries in it).

2. Delete the entries corresponding to SYSTEM1 and SYSTEM7. ( The table is left with 40 entries in it). I am deleted ALL the roles so after this there is no entry for SYSTEM1 and SYSTEM7 in the table.

3. Run the BAPI by passing table (with 40 entries).

Once BAPI runs the system send out 10 idocs (one for each system). And idocs for SYSTEM1 and SYSTEM7 still have the roles in it. So essentially the BAPI just ignored my filtering and sent out idocs with situation as is.

I did try to change the idoc by removing all the roles segment and that does the job for me. But I am not sure why BAPI is not doing it. I can not use BAPI_USER_LOCACTGROUPS_DELETE as I want to delete roles only from certain systems.

Any idea whats up here?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 21, 2013 at 09:52 PM

    I figured it out. For others who may be looking to do the same -->> If you want to remove all the roles from system A , you need to pass a row with just system id in it ( no role name/dates) and delete all the other rows for that system. That will delete all the roles for that system while keeping the system in system list.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.