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: 

FM to assign role to the user, based on HRPOSITION

kunwar_rajnish
Employee
Employee
0 Kudos

Hi All,

I have a query. I am working on security based product where in our current functionality role is assigned to user based on position.

EX:

Current Scenario:

role1, role2, role3, role4 are assign to position P1.

and that position P1 is assign to USER so USER is able to have those roles.

Now, Required functionality is:

Every position has one HRPOSITION maintained in our product. so now all roles should assign to user based on HRPOSITION.

********************************************************

My colleague is saying, To achieve this, we have a BAPI. I got some word as hint for that BAPI which is : HR*INITIAL*DATA*. It can be in any combination.

I tried to find in se37, even did goggling but couldn't succeed.

This is what I got as requirement. May be, I am not understanding the requirement or understanding but not able to get the desire output.

Please help. Thanks in advance

1 REPLY 1

shivraj_singh2
Active Participant
0 Kudos

Sonu,

I believe you will have to use the following BAPIs

BAPI_USER_GET_DETAIL

BAPI_USER_ACTGROUPS_ASSIGN

second BAPI may need modification , i.i.r.c. it overwrites instead of append.

These are used for direct role assignment so you might have to make few adjustments

Another one which you might want to explore is

BAPI_REL_CREATERELATION

Approach is to create relationships among object (i.e. HRPOSITION & AGR Activity Groups)

Regards,

Shivraj