Reputation: 45
Hi, currently my company create a program to upload roles in txt file to insert and delete roles of a user, however, I am facing a problem which is the program unable to add new roles for the new user in sap ABAP. This is because the new user without any role will not available in the standard table agr_users, any recommended ways to insert roles to the new users using any function module or bapi? Thank you.
Upvotes: 1
Views: 1068
Reputation: 69663
You can find BAPI function modules in your own SAP system using the transaction code BAPI
. The one you are looking for can be found under the path:
Basis Components > Security > USER > Actgroups Assign
No, I won't give you the name of that function module directly, because when you learn how to use the transaction BAPI yourself, you no longer need to ask questions like this. You don't need to wait a day for an answer. You can just go to the transaction and find the function module you need in under 5 minutes. Also pay some attention to the documentation tab in the transaction BAPI. The one for this particular function module also mentions a class you can use and links to a comprehensive documentation of that class.
Upvotes: 0
Reputation: 10621
Why reinvent the wheel? Use SU10
transaction aka User Maintenance: Mass Changes
Step 1: select user(s) you wanna process
you can select by different criteria, the criteria are highlighted in yellow on the screen
Step 2: press Edit button
Step 3: go to Roles tab and add the required roles to the table selecting the action (add or delete)
Bingo!
Upvotes: 0