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.
Showing results for 
Search instead for 
Did you mean: 

User <-> Profile link table?

Former Member
0 Kudos

Hi All,

We are connecting via SAP JCo to an ECC 6.0 system. The task is to retrieve all users that have a specific set of profiles.

Currently we are using RFC_READ_TABLE on USR02 to get a list of User Names, and then with each name making a call to BAPI_GET_USER_DETAIL and then checking if the user has the specified profile.

This works fine if almost all users have one of the specified profiles, but isnt so great if only a few of them do as it makes a call to the BAPI for every user. It would be much better if we only had to make the BAPI call for those users that we already knew had the specified profiles.

My question, Surely there is a link table or somewhere that links the users to the profiles, Where abouts is this, or what is it called.

Any help or pointers would be much appreciated.


Former Member
0 Kudos

Hi Paul,

There is a standard SAP report that list users assigned to a specific role (program name is RSUSR002). I've had a quick skim through the code and there's nothing obvious, but you may find something of use in there.



Former Member
0 Kudos

Hi Paul,

You can use the function module 'SUSR_GET_USERS_WITH_SPEC_PROFS' to get users with the specific profile. But this is a normal function module, so you can create your own remote function module in which you can use this function.