Проверить статус пароля у пользователя
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
PARAMETERS: p_usr TYPE sy-uname DEFAULT sy-uname. PARAMETERS: p_pwd TYPE rsyst-bcode. AT SELECTION-SCREEN OUTPUT. LOOP AT screen INTO DATA(screen_wa). IF screen_wa-name = 'P_PWD'. screen_wa-invisible = 1. MODIFY screen FROM screen_wa. ENDIF. ENDLOOP. START-OF-SELECTION. CALL FUNCTION 'SUSR_LOGIN_CHECK_RFC' EXPORTING bname = p_usr password = p_pwd EXCEPTIONS wait = 1 user_locked = 2 user_not_active = 3 password_expired = 4 wrong_password = 5 no_check_for_this_user = 6 internal_error = 7. CASE sy-subrc. WHEN 0. WRITE: / 'Password OK'. WHEN 1. WRITE: / 'wait'. WHEN 2. WRITE: / 'user_locked '. WHEN 3. WRITE: / 'user_not_active'. WHEN 4. WRITE: / 'password_expired'. WHEN 5. WRITE: / 'wrong_password '. WHEN 6. WRITE: / 'no_check_for_this_user'. WHEN 7. WRITE: / 'internal_error'. WHEN OTHERS. WRITE: / 'Other error.'. ENDCASE. |