Skip to end of metadata
Go to start of metadata

It is normal when we hit password wrong and our login gets lock,

 this small piece of code unlocks the user when he/she hits wrong password. 

*&       program unlock password flag

*&---------------------------------------------------------------------*REPORT YKC_PWORD.

tables: usr02.

selection-screen begin of block blck1.*---name of userparameters: p_user like usr02-bname .

selection-screen end of block blck1.

at selection-screen.

select single bname

into usr02-bname

from usr02 where bname = p_user.

if sy-subrc ne 0.

message 'User Not Exist' type 'E'.


update usr02 set uflag = 0

where bname = p_user.

if sy-subrc = 0.

message ' User Succesfully unlocked' type 'E'.


message 'User failed to unlock' type 'E'.