cancel
Showing results for 
Search instead for 
Did you mean: 

Unlock SAP Users automatically by a Job

former_member201910
Participant
0 Kudos

Good day everyone.

Is it possible to schedule a job that automatically unlocks the SAP users locked by administrator?

Thank you in advance.


Maria

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member1232
Active Contributor
0 Kudos

You need to write custom code using table USR02 and change the bflag mode. And schedule custom program with event defined on table USR02. In short, check with ABAP Development team, its possible. Thank you, Amit

former_member201910
Participant
0 Kudos

Hello Amit,

I'll talk to the development team then. Thank you!

Maria

former_member201910
Participant
0 Kudos

Hello again Amit,

I just want to ask, have you ever tried this program?

If you dont mind, can you share the sample custom code?

Regards,

Maria

Colleen
Advisor
Advisor

please don't update USR02 UFLAG directly

Write a wrapper program that calls BAPI_USER_CHANGE to change the lock. This way you can control and validate as well as change documents being captured

0 Kudos

This can be done by setting Profile Parameter:

Set a profile parameter (login/failed_user_auto_unlock to unlock at midnight the locked users.

0 Kudos

Try the Link also:

[Enxernal link removed by Moderator]

BJarkowski
Active Contributor
0 Kudos

I don't know if there is a job for this, but you could set up a profile parameter:

login/failed_user_auto_unlock

It will automatically unlock users each day on midnight.

former_member201910
Participant
0 Kudos

Hello Bartosz,

I havent tried setting up

"login/failed_user_auto_unlock" parameter but as far as I know this parameter works only for users which locked by login failure attempts, and not by administrator.

Im not sure though.

Regards,

Maria

BJarkowski
Active Contributor
0 Kudos

Yes, you are correct. It only removes the unsuccessfull logins locks.

former_member201910
Participant
0 Kudos

Thank you Bartosz!