Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How validate the password in screen painter?

Former Member
0 Kudos

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

3 REPLIES 3

former_member667836
Active Participant
0 Kudos

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

0 Kudos

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

0 Kudos

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