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.