cancel
Showing results for 
Search instead for 
Did you mean: 

Querying Users of all Groups

former_member600162
Discoverer
0 Kudos
370

I trying to query users of all groups in business objects.

SELECT *
FROM ci_systemobjects 
WHERE descendants("si_name='Usergroup-User'", "si_name='<group name>'")

The above query will return users of one group. But, I want users of all groups with group name in the below format.

User_id group_name

Thanks and Regards,

Diwakar G

denis_konovalov
Active Contributor
0 Kudos

I have fixed your tag, please select more careful next time.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member230921
Active Contributor
0 Kudos

Using queryBuilder you can get UserName and UserGroup IDs

(1 User may belongs to multiple UserGroups).

(see : https://answers.sap.com/answers/725951/view.html)

If you need exact same format like : USER NAME : GROUP NAME,

Then you have to write SDK script to achieve this.

former_member209323
Active Participant
0 Kudos

Hi Diwakar,

You can run the below query which gives the group name and User-ID belonging to that group under

SI_GROUP_MEMBERS

SELECT SI_NAME, SI_DESCRIPTION, SI_ID, SI_ALIASES, SI_GROUP_MEMBERS FROM CI_SYSTEMOBJECTS
WHERE SI_KIND = 'usergroup'

Regards,

Shreejith

former_member230921
Active Contributor
0 Kudos

SELECT SI_NAME, SI_USERGROUPS FROM CI_SYSTEMOBJECTS where SI_KIND = 'User'