Skip to Content
author's profile photo Former Member
Former Member

Check SAP username and password.

Hello Experts,

I program a RFC-Function modul which check SAP logon-data.

Import-parameter is username and password.

I would like to know if the password is correct.

Any help would be greatly appreciated.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Oct 04, 2005 at 04:27 PM

    You can always check the user name against the user tables, USR01, USR02, etc. I am not sure about checking the password, but I'm not optimistic.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2005 at 04:37 PM

    Hello Rich,

    the password in table USR02 is encrypted.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 04, 2005 at 04:41 PM

    You can check the User/Password with this FM :

        CALL FUNCTION 'SUSR_LOGIN_CHECK_RFC'
             EXPORTING
                  BNAME            = BNAME
                  PASSWORD         = PASSWORD
             EXCEPTIONS
                  PASSWORD_EXPIRED = 0
                  USER_LOCKED      = 1
                  USER_NOT_ACTIVE  = 2
                  WRONG_PASSWORD   = 3
                  NO_CHECK_FOR_THIS_USER = 4
                  OTHERS           = 5.
        CASE SY-SUBRC.
          WHEN 0.  "that's what we know - it's ok
          WHEN 1.  MESSAGE E158(00) RAISING CHANGE_NOT_ALLOWED.
          WHEN 2.  MESSAGE E148(00) RAISING CHANGE_NOT_ALLOWED.
          WHEN 3.  MESSAGE E152(00) RAISING CHANGE_NOT_ALLOWED.
          WHEN 4.  MESSAGE E199(00) WITH BNAME RAISING CHANGE_NOT_ALLOWED.
          WHEN OTHERS.
                   MESSAGE E191(00) RAISING INTERNAL_ERROR.
        ENDCASE.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2005 at 04:49 PM

    thanks for the helpful and quick answer.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.