How To Lock SAP Client

1. How to lock the client from logon
2. How to see the all the users connected per day (with the activities they have done and resource utilization)

I cannot answer the first straight away, but the second questions, there are many available SAP transactions. 

use STAT very useful and many options available if you use them correctly.
 

1. I don't know how how to lock the client, but you can lock the system with "tp locksys <SID>" and unlock it with "tp unlocksys <SID>". You can also stop the service, but then noone can login including yourself.  However, I had problems with tp locksys when applying some Hot Packages and exporting client. It wouldn't work with system locked. I didn't try, but a   simple ABAP that locks and unlocks all the users in table usr02 (with exceptions of yourself, SAP*, DDIC... - ofcourse) might be an interesting idea.

2. STAT transaction
 

You can lock the system thro "tp locksys" (Transport Utility).
Check the other options of "tp" command for locking the specific client under the system thro "tp help".
 

With this solution I can lock the whole system, but not specified by client.
Send me in more detail....
 

There's no way to lock a client.
You have to lock all users from loging in of this specified client.
The way you do is by user administration setting the lock.
 

We can lock a client using SCCR_LOCK_CLIENT and unlock SCCR_UNLOCK_CLIENT functions.

Once we run this functions with a client as input , that client will be locked/unlocked. Actually this function set flag '' Client is locked temporarly for client copy" in client maintanance menu. And the client will be available for users other than DDIC and SAP*. If you try to login in that client as any user , system gives message that ' Client locked temporarly'..
 

Is there any t-code to lock a client?

There is no direct tcode to lock a client. the easiest way to lock a client is 
1. run tcode SE37
2. type function module name - SCCR_LOCK_CLIENT
3. enter the Client No.
4. execute the function module.

SAP Basis Admin Books
SAP System Administration, Security, Authorization, ALE, Performance Tuning Reference Books

SAP Basis Tips
SAP BC Tips and Basis Components Discussion Forum

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.