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_USER_ACTGROUPS_ASSIGN deleting roles

Former Member
0 Kudos

Hello,

we are trying to create a process where we can change the "valid to" date on a role for about 400 users. this process will be done once a year. I have found a bapi "BAPI_USER_ACTGROUPS_ASSIGN" that I can call in a program. the process will be to use a csv file containing the data and read it in the program and call this bapi to update the date.

I am testing the bapi in SE37 with a user that has multiple roles. I add the role and the new date to the ACTIVITYGROUPS table and when I run the func module, the role gets updated with the new date but all of the roles there were assigned to the user are now gone.

I have search SDN and I could find anything that references this issue.

has anyone else had this problem and were you able to correct it?

Am I running the func module incorrectly which is cuasing the roles to get deleted?

thanks in advance for the help

1 REPLY 1

Former Member

I have done some more searching and I think that this is only way to do this

(1) Get current user roles using BAPI_USER_GET_DETAIL

(2) read the ACTIVITYGROUPS table and change the date for the role that I want

(3) run BAPI_USER_ACTGROUPS_ASSIGN using the updated ACTIVITYGROUPS table

if there is any other way to do this, please le me know

thanks...