Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
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'.

endif.

update usr02 set uflag = 0

where bname = p_user.

if sy-subrc = 0.

message ' User Succesfully unlocked' type 'E'.

else.

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

endif.