2012 Feb 20 1:37 PM
Dear Experts,
We are having a Mobile Application using Sybase where user sends his user name and password to SAP via a Custom Bapi. In this Bapi how can i Authenticate whether the users login Credentials are correct.
Please kindly let me know.
Regards
Sam
2012 Feb 20 3:38 PM
Hi
In your custom BAPI use the function module 'RFC_LOGIN' and check the sy-subrc value to check the LOGON details of the user..
Regards,
Vijay V
2012 Feb 20 3:38 PM
Hi
In your custom BAPI use the function module 'RFC_LOGIN' and check the sy-subrc value to check the LOGON details of the user..
Regards,
Vijay V
2012 Feb 21 8:52 AM
Dear Vijay,
The RFC_LOGIN is not working. whatever password we provide it is giving sy-subrc 0.
Please give some other solution.
Regards
Sam
2012 Feb 21 9:04 AM
Hello Sam,
try the Function Module SUSR_LOGIN_CHECK_RFC.
Kind regards,
Hendrik
2012 Feb 21 10:41 AM
Hi,
I gave my user name and password correct to SUSR_LOGIN_CHECK_RFC but its always giving wrong password.
please help.
regards
sam
2012 Feb 21 10:41 AM
Hi
Add this piece of code in your Function module or create a test program and run this.
NOTE: Depending on the system your password might be case sensitive.
parameters: p_name type sy-uname,
p_bcode type XUBCODE.
CALL 'INTERNET_USER_LOGON' ID 'AUTHTYPE' FIELD 'P' "passwor
ID 'TESTMODE' FIELD SPACE
ID 'UNAME' FIELD p_name
ID 'PASSW' FIELD p_bcode.
If sy-subrc = 0.
write: 'success'.
endif.
Regards,
Vijay V
2012 Feb 21 11:04 AM
Hi,
If you will use this FM in your program, then it will work fine perfectly.
It is showing error because you didn't check the uppercase/lowercase checkbox in FM execution screen.
It automatically converts it into Uppercase hence error.
Try by checking that checkbox.
Regards,
Harsh Bansal
2012 Feb 21 9:10 AM
Hi,
You can use SUSR_LOGIN_CHECK_RFC for verifying credentials.
sy-subrc = 0 will mean correct credentials. Otherwise based on error, different exceptions like 'wrong password' will be caught.
You can put check also like if user sends wrong password 3 times then you can lock the user by using 'BAPI_USER_LOCK'
Regards,
Harsh Bansal