0
votes

I'm having a bit of trouble finding a proper solution to mass user locking/unlocking in SAP.

When I lock users i want to be able to distinguish between already locked users and users to be locked.

When unlocking users i want to be able to distinguish between users that were locked before I locked them and users we locked with the program. I only want to unlock the users that were locked by the program.

The program we use is a z program that uses the BAPI_USER_LOCK and BAPI_USER_UNLOCK function module.

I've done quite a bit of research, and I'm thinking of adding 1 to the value of users that I lock via the program as a possible solution but I'm not too sure.

Any help would be appreciated.

1
You do know about the existing program EWULKUSR...?vwegert
Yes, that was one of the first solutions I proposed but was told we should create a different solution...oceanlab1

1 Answers

0
votes

The problem with just tracking value of 1 for the users that you lock via the program is that if you want to be able to determine which ones you locked via the program and not, doesn't that cut down the possibility of you doing locks for different reasons?

It would be a better solution to create & maintain a custom table of users that were locked by the program and the reason they were locked, with a selection screen for the reason on your program along with user ID.

This way you can mass lock/mass unlock but for only certain groups for certain reasons. If you want to make this more robust, I've implemented a tool on a client that allows you to display user accounts in an ALV grid, which their account lock status, expiry date, business unit, name etc. From there you can email their manager, the person who last changed their validity date and unlock/lock users.