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?
Thanks,
Anuj