cancel
Showing results for 
Search instead for 
Did you mean: 

User and User groups in Query Builder

former_member530232
Participant
0 Kudos

Dear All,

I need the list of BO users and the User Groups to which the users are part of.

Can anyone please help me with the query that i should execute in Query builder to get the user and the group.

I am executing the below query but separately.But not sure how to find the relation between the user and the user group.

Query for users:

Select SI_NAME, SI_USERFULLNAME, SI_ID, SI_NAMEDUSER From CI_SYSTEMOBJECTS Where SI_KIND='User' Order by SI_NAME

- Query for user groups:

Select SI_ID, SI_NAME, SI_REL_USERGROUPS, SI_USERGROUPS, SI_GROUP_MEMBERS, SI_SUBGROUPS from CI_SYSTEMOBJECTS where SI_KIND = 'UserGroup' order by SI_NAME

Thanks

Faizan

Accepted Solutions (1)

Accepted Solutions (1)

former_member185603
Active Contributor
0 Kudos

Try this

select si_name from ci_systemobjects where children ("si_name = 'usergroup-user'", "si_name = '<ENTER GROUP NAME HERE>'")

former_member530232
Participant
0 Kudos

Thanks a lot.Yes i can get the user id and email addr of the user belonging to a user group.

former_member530232
Participant
0 Kudos

Hi Jawahar,

I need user Id ,User email id,User group from the query.I am executing the below query not sure how to frame the query to get the third column "Group".Can you please help me out in that.


select si_name ,SI_EMAIL_ADDRESS from ci_systemobjects where children ("si_name = 'usergroup-user'", "si_name = 'Administrators'")

former_member185603
Active Contributor
0 Kudos

Unfortunately, we cannot get both user name and group from the same query.

Below is the query to get in reverse way to get the group

select si_id, si_name from ci_infoobjects, ci_appobjects, ci_systemobjects Where parents("si_name='UserGroup-User'", "si_name='<UserNameHere>'")

Answers (2)

Answers (2)

former_member230921
Active Contributor
0 Kudos

cannot get user and user group details using 1 query.

you have to write SDK script for this. (if you have rights to pull this info from query builder, same can be achieved using script with same credentials)

https://help.sap.com/viewer/0225aa3e7b4b4b17b2d4a882e6f2de96/4.2.5/en-US/45a597f86e041014910aba7db0e...

amitrathi239
Active Contributor
0 Kudos

check attached link for download users/groups

http://www.forumtopics.com/busobj/viewtopic.php?p=932160

former_member530232
Participant
0 Kudos

Thanks Amit for your response.Unfortunately,i dont have the CMS database credentials.I wanted to fetch the details by executing query in query builder.