cancel
Showing results for 
Search instead for 
Did you mean: 

How to get no.of users in a specific client

v_veeramalla
Active Participant
0 Kudos

HI,

I need to find the no of users in a specific client , but i don't have accounts to all the clients. I tried from one client where i have the account and executed SE16N and table usr02 got only client specific users list. And as per my understanding USR02 is a client speicific table.

What is the best to find the no of users for all the clients , is it possible from SQL query lik select count(*)from usr02 where mandt etc.. ? or is there any best way ?

Regards

Veeramalla.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi

Try this query

select * from schema.USR02 where MANDT='999' and USTYP='A'

what is your db?

if it Sqlserver the schema is SID.sid.tablename.( eg TST.tst.USR02),use management studio >>newquery

it its Oracle

SAPSR3.usr02 or SAP<SID>.tablename

Regards

Arun.H

Former Member
0 Kudos

Just go to AL08 you can cumulative user in all application server. The same can be verified through SMLG Tcode with Global user list. Save some grey matter for other purposes.

Former Member
0 Kudos

Hello,

i think transaction AL08 could also do the job. It displays all users in all clients and all instances. You can export he list to a spreadsheet to analyze it further.

regards

Christian

Former Member
0 Kudos

Dear venkateshwarlu,

You have asked a question and answered it yourself.

USR02 is table and group by MANDT feild.

Hope it helps.

Hussian S

v_veeramalla
Active Participant
0 Kudos

Iam not expert in sql queries, can you please let me know the syntax. And we have 40+ client in our produciton box . Do i need to execute the query for each client ?

ashish_vikas
Active Contributor
0 Kudos

Hello,

i think you may get your desired results with this SQL :

select count(*) "No. of User", mandt "Client" from usr02 group by mandt;

*you can execute SELECT SQl from SAP(any one client only) only: ST04 > Additional Functions > SQL Command Editor.

thanks

ashish

former_member188883
Active Contributor
0 Kudos

Hi venkatesh,

Incase you can access the database you can take the dump of user count in all the clients using the below mentioned queries

Select count(bname) from <schema>.usr02 where mandt='xxx';

You need to run this for each client.

Another alternative is to create an aBAP program in the client for which u have access to get the details.

Code could have the following lines

data: number(6); clientno(3);

parameters: clientlist like t000-mandt; //fill in this clientlist parameter with the list of clients u have in ur system

clientno= 1

loop

if clientno < 40

Select count(bname) into number from <schema>.usr02 where mandt= clientlist(clientno);

clientno = clientno + 1

clear number;

else

exit;

endloop.

v_veeramalla
Active Participant
0 Kudos

HI Deepak,

Thank for the syntax, Again i need to put one restriction in the query .

I need only dialogue users count.

ashish_vikas
Active Contributor
0 Kudos

u just need to add a where clause n select..

select count(*) "DIA User", mandt "Client" from usr02 where USTYP = 'A' group by mandt;

thanks

ashish

marcin_cholewczuk
Active Contributor
0 Kudos

Hi,

To add condition "mandt =" you have to add to your query key word CLIENT SPECIFIED. Look in SAP help for details.

BR

Marcin Cholewczuk