Unlock TMSADM user automatically in SAP

SAP

While working on STMS, mostly users faced issue that TMSADM user lock continuously in 000 client. Due to this RFC’s stop working & STMS_IMPORT screen is also asking password multiple time.

for coming out from this situation we have developed 1 customise report for unlocking TMSADM automatically.

1. Create 1 report in SE38 (paste the below content) & save it as executable program.
2. Schedule 1 job in SM36 to run every 5 min in 000 client.

Let me know if you face any difficulty or share you comments.

*&———————————————————————*
*& Report ZUNLOCK_TMSADM
*&
*&———————————————————————*
*&
*&
*&———————————————————————*

REPORT ZUNLOCK_TMSADM.
TABLES: usr02.

DATA: l_rt_uflag TYPE RANGE OF XUUFLAG,
l_t_usr02 TYPE TABLE OF usr02,
l_s_usr02 TYPE usr02.

CLEAR: l_t_usr02.
SELECT * FROM usr02 INTO CORRESPONDING FIELDS OF TABLE l_t_usr02
WHERE
bname = ‘TMSADM’ and
uflag in (’64’, ‘128’).

IF l_t_usr02 IS INITIAL.
MESSAGE s306(rsec).
EXIT.
ENDIF.

SET
UFLAG = ‘0’
WHERE
bname = ‘TMSADM’ AND
uflag in (’64’, ‘128’).

CALL FUNCTION ‘DB_COMMIT’.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.