03-28-2008 6:11 AM
Hi friends, i have got a requirement such that i have to create a screen with Empd_id and password, its like login screen.
After giving the password and then by pressing enter it has to pass to next screen i have no idea for this can any please help with this requirement.
Table is to be created again the passwords has to be stored in a table all this i am fully confused please help with this requirement.....
Points will be Rewarded for the help
Thks
03-28-2008 5:16 PM
Hi,
it is very simple.
1.Create table in SE11.
2.create one module pool program using SE80.
3.Create one screen in this program
4.add two fields empid and password in this screen.
5.create one transaction for the above program
6.check syntax and activate the program.
7.write one select query in the PAI of the screen to validate the empid and password.
8.if the query success call the next screen.(need to create the second screen in your program).
start do the coding ,if u got stucked let us know
cheers
shibu
03-30-2008 5:40 AM
Hi Shibu, thks for responding to me i know the whole procedure to create the screen but in coding part i am going some where wrong i am sending you my code please do check with error where i am going wrong...
Data declarations for local variables..
DATA : L_CODE TYPE ZUFPL7.
DATA : L_SUPNAM TYPE ZUFPL7.
data declarations
parameters: 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
03-30-2008 10:16 AM
Dear Venkatesh,
Here is your problem
parameters: EMPLOGIN TYPE ZFIR_PASS-EMPLOGIN,
PASSWORD TYPE ZFIR_PASS-PASSWORD.
CASE SY-UCOMM.
WHEN 'LOGIN'.
SELECT SINGLE EMPLOGIN
FROM ZFIR_PASS
INTO L_CODE
WHERE EMPLOGIN IN ZFIR_PASS-EMPLOGIN.
+*why are you checking ZFIRPASS-EMPLOGIN?+_
*you should check with value from the screen the login *entered by the user in the parameter field EMPLOGIN
IF SY-SUBRC 0.
MESSAGE I000.
ENDIF.
it should be
SELECT SINGLE EMPLOGIN
FROM ZFIR_PASS
INTO L_CODE
WHERE EMPLOGIN = EMPLOGIN .
IF SY-SUBRC 0.
MESSAGE I000.
ENDIF.
*same problem repeated here ...instead of checking the screen
*password value passed you are checking something else
SELECT SINGLE PASSWORD
FROM ZFIR_PASS INTO L_SUPNAM
WHERE PASSWORD IN ZFIR_PASS-PASSWORD.
IF SY-SUBRC 0.
MESSAGE I000.
ENDIF.
replace it as
SELECT SINGLE PASSWORD
FROM ZFIR_PASS INTO L_SUPNAM
WHERE PASSWORD = PASSWORD.
IF SY-SUBRC 0.
MESSAGE I000.
ENDIF.
please check and revert and reward if helpful
Regards
Byju