Hi all,
I have a requirement to check lock whether any employee is locked by any user before need to prevent user from editing the employees The tricky part here is initially I use FM 'TH_DELETE_USER' to log off user.
LOOP at t_match_lock INTO w_t_match_lock.
CALL FUNCTION 'TH_DELETE_USER'
EXPORTING
user = w_t_match_lock-guname
client = '800'
EXCEPTIONS
authority_error = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE 'User not found.' type 'I' DISPLAY LIKE 'I'.
ENDIF.
CLEAR w_t_match_lock.
ENDLOOP.
However this method do not look so feasible as it will log off user abruptly so I use FM 'ENQUEUE_DELETE' to delete the user lock enries. This too not feasible as user can still save the entries on the employee they are editing on.
Any other idea?