ABAP Program to Unlock Login ID in SAP
Posted by Admin, under ABAP, Quick Reference, Sample CodeIt is normal when we hit password wrong and our login gets lock, this small piece of code unlocks the user when user hits wrong password.
*&———————————————————————*
*& program unlock password flag
*&———————————————————————*
REPORT YKC_PWORD.
tables: usr02.
selection-screen begin of block blck1.
*—name of user
parameters: 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.
You might also be interested in these posts:

Post a Comment