2008 Mar 28 8:18 AM
Hi friends by giving emplogin and password i want to validate password.
Please can you help with this...requirement...
i have a table with client name and password as field ..
and my code is this but its not working ..
Data declarations for local variables..
DATA : L_CODE TYPE ZUFPL7.
DATA : L_SUPNAM TYPE ZUFPL7.
data declarations
data: EMPLOGIN TYPE ZFIR_PASS-EMPLOGIN,
PASSWORD TYPE ZFIR_PASS-PASSWORD.
select statement....
MODULE USER_COMMAND_1111 INPUT.
CASE SY-UCOMM.
WHEN 'LOGIN'.
SELECT SINGLE EMPLOGIN
FROM ZFIR_PASS
INTO L_CODE
WHERE EMPLOGIN IN ZFIR_PASS-EMPLOGIN.
IF SY-SUBRC <> 0.
MESSAGE I000.
ENDIF.
SELECT SINGLE PASSWORD
FROM ZFIR_PASS INTO L_SUPNAM
WHERE PASSWORD IN ZFIR_PASS-PASSWORD.
IF SY-SUBRC <> 0.
MESSAGE I000.
ENDIF.
CALL SCREEN 1000. " if emplogin & password matches
ENDCASE.
ENDMODULE. " USER_COMMAND_1111 INPUT
Hi friends by giving emplogin and password i want to validate password.
Please can you help with this...requirement...
i have a table with client name and password as field ..
and my code is this but its not working ..
Data declarations for local variables..
DATA : L_CODE TYPE ZUFPL7.
DATA : L_SUPNAM TYPE ZUFPL7.
data declarations
data: EMPLOGIN TYPE ZFIR_PASS-EMPLOGIN,
PASSWORD TYPE ZFIR_PASS-PASSWORD.
select statement....
MODULE USER_COMMAND_1111 INPUT.
CASE SY-UCOMM.
WHEN 'LOGIN'.
SELECT SINGLE EMPLOGIN
FROM ZFIR_PASS
INTO L_CODE
WHERE EMPLOGIN IN ZFIR_PASS-EMPLOGIN.
IF SY-SUBRC <> 0.
MESSAGE I000.
ENDIF.
SELECT SINGLE PASSWORD
FROM ZFIR_PASS INTO L_SUPNAM
WHERE PASSWORD IN ZFIR_PASS-PASSWORD.
IF SY-SUBRC <> 0.
MESSAGE I000.
ENDIF.
CALL SCREEN 1000. " if emplogin & password matches
ENDCASE.
ENDMODULE. " USER_COMMAND_1111 INPUT
2008 Mar 28 8:26 AM
Hi,
You have to pass both login id and password to where clause.
DATA : L_CODE TYPE ZUFPL7.
DATA : L_SUPNAM TYPE ZUFPL7.
*data declarations
parameters: p_EMPLOGIN TYPE ZFIR_PASS-EMPLOGIN,
p_PASSWORD TYPE ZFIR_PASS-PASSWORD.
MODULE USER_COMMAND_1111 INPUT.
CASE SY-UCOMM.
WHEN 'LOGIN'.
SELECT SINGLE EMPLOGIN
FROM ZFIR_PASS
INTO L_CODE
WHERE EMPLOGIN = p_emplogin and
password = p_password.
IF SY-SUBRC 0.
MESSAGE I000.
ENDIF.
CALL SCREEN 1000. " if emplogin & password matches
ENDCASE.
ENDMODULE. " USER_COMMAND_1111 INPUT
Reward.
2008 Mar 28 3:50 PM
Hi,
By seeing the above code i came to unstand ur new to ABAp.
write select query as follows:
select count(*) from <tab> where emplogin = <field> and password = <password>.
if sy-subrc eq 0.
call screen 100 or some thing else......
else.
message
endif.
2008 Mar 28 4:06 PM
Hi,
use function: SUSR_LOGIN_CHECK_RFC to check the logon id and password of employees into a custom application
Regards
Kiran Sure
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |