There is an easy way to lock/unlock large numbers of users in R/3 4.0B (and perhaps earlier). Although apparently intended for use in Euro conversions, the effect is to lock all users except those selected. Users that are already locked are not affected. How? Use the steps below.
1. Call transaction EWZ5. You will see a list of users and their current status.
2. Click the Choose User button.
3. Put a check mark beside the users that you do NOT want the system to lock (SAP*, DDIC, TMSADM, other administrators, etc.)
4. Once you have selected the users that will not be locked, click the Save button. You will be returned back to the initial screen.
5. Now click the Lock User button. All users that were not checked or not already locked will be locked.
6. You can unlock the users using the Unlock User button. This will not unlock users that were locked prior to using EWZ5.