Application Development and Automation 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: 
Read only

Module pool

Former Member
0 Likes
1,468

Moderator message: please use an informative subject in future

Hi Experts,

I am doing module pool pgm. i put two fields ( user name and password) from DB.

Username and Password it will allow to enter into the next screen,but restrict it by not allowing the user entering with the multiple same user name and password.

how is performed it?

Regards,

S.Suresh

Edited by: Matt on Dec 16, 2008 10:56 AM

16 REPLIES 16
Read only

Former Member
0 Likes
1,419

Hi,,

You can do like this.. Take any variable and add 1 to it in the PBO of the next screen when user goes to next screen. And give a check condition on the PBO of the first screen like if Var = 0. give a error message accordingly and restrict it to enter on to the next screen.

reset the value of the var when the user leaves the next screen.

Regards

Mudit

Read only

Former Member
0 Likes
1,419

Hi,

Please note my understanding is correct.

you want the user to enter the user ID and Password first time and if it these details are correct then he can go to next screen.

if there are not correct , then you dont want the user to enter the details again Am i Correct.

if he enters wrong details make the USER_ID and PASSWORD grey mode

if so Please try this.

in PAI.

chain.

field : user_id, password.

module check_user_id on request.

endchain.

in program.

module check_user_id.

if not user_id is initial and not password is initial.

select the details from dbtable and check the sy-subrc.

if not sy-subrc is initial.

entry_wrong = 'X'. declare entry_wrong in top include

else.

call screen next_screen.

endif.

in PBO.

if entry_wrong.

loop at screen.

if screen-name = 'USER_ID' or

screen-name = 'PASSWORD'.

screen-input = 0.

modify screen.

endif.

endloop.

endif.

endmodule.

Read only

Former Member
0 Likes
1,419

Hi,

Please note my understanding is correct.

you want the user to enter the user ID and Password first time and if it these details are correct then he can go to next screen.

if there are not correct , then you dont want the user to enter the details again Am i Correct.

if he enters wrong details make the USER_ID and PASSWORD grey mode

if so Please try this.

in PAI.

chain.

field : user_id, password.

module check_user_id on request.

endchain.

in program.

module check_user_id.

if not user_id is initial and not password is initial.

select the details from dbtable and check the sy-subrc.

if not sy-subrc is initial.

entry_wrong = 'X'. declare entry_wrong in top include

else.

call screen next_screen.

endif.

in PBO.

if entry_wrong.

loop at screen.

if screen-name = 'USER_ID' or

screen-name = 'PASSWORD'.

screen-input = 0.

modify screen.

endif.

endloop.

endif.

endmodule.

Read only

0 Likes
1,419

Hi,

Its could not process about below

module check_user_id on request.

how is change it?

Regards,

S.Suresh.

Read only

0 Likes
1,419

Hi,

What is the problem.

Just change the variable names in your program and check it.if you have any problem Please specify your Problem Very clearly

Regards

Ramchander Rao.K

Read only

0 Likes
1,419

Hi,

some error below it..

select username password from <tablename> and check the sy-subrc.-->Error.

how is change it?

Regards,

S.Suresh.

Read only

0 Likes
1,419

Hi,

I could not get solved!!

Plz can u help me update it!!

Regards,

S.Suresh.

Read only

0 Likes
1,419

Hi

tables dbtab.

Select single * from dbtab where userid = user_id and password = password.

if not sy-subrc is initial.

entry_wrong = 'X'.

else.

call screen 'NEW_SCREE'.

endif.

hope this is clear

Regards

Ramchander Rao.K

Read only

0 Likes
1,419

hi..

what i said??

username and password allowed into the next screen once only.. Donot allow multiple same username and password. i need that...

Regards,

S.Suresh

Read only

Former Member
0 Likes
1,419

Hi,


  INput:User name And Password..
if any one type it has to update in a table... if any one modify the password that also have to be updated

to create password field , check the invisible checkbox in field attribute.
create ztable to save the user name and password.

when 'UPDA'.
ipass-zuname = zpassword-zuname.
ipass-zpassword = zpassword-zpassword.
modify zpassword from ipass.
when 'MODI'.
ipass-zuname = zpassword-zuname.
ipass-zpassword = zpassword-zpassword.
modify zpassword from ipass.

Thanks & Regards,

Krishna...

Read only

0 Likes
1,419

Hi,

one person works his Username and password are allowed to access the next screen only but its restrict it. second person knows one person's username and password but second person donot allow to access one person's same username and password.. can u understand..

i need it.

how is performed it?

Regards,

S.Suresh.

Read only

matt
Active Contributor
0 Likes
1,419

Please use an informative subject in future

Read only

Former Member
0 Likes
1,419

Hi,

you mean you want to restrict multiple logons.

so for this you need to call the system function 'ThUsrInfo'.

please refer to this link which will be very helpful:

http://www.kabai.com/abaps/z24.htm

Regards,

Neha

Read only

Former Member
0 Likes
1,419

Hi,

I Hope I have understod ur question properly, Try something like this.

tables DBTAB.

select single *

from DBTAB into ITAB where userid = P_USERID

password = P_PSWD.

Now PUT A CHECK.

If P_USERID = ITAB-userid.

Message 'USER EXISTS already'.

else.

What ever ur Condition.

Endif.

You can Also use AT SELECTION-SCREEN event to perform this.

Regards,

vikas

Read only

Former Member
0 Likes
1,419

Hi Suresh ,

What I understand of your problem is that

suppose a user A has logged in the system and user B wants to log in the system with userid and password of user A then you want to restrict user B from not entering the system .

You can do it in 2 ways :

I take that u have database table say zuser from where ur gettinh user id & password

Method 1 :

You make another column in Zuser which has datatype C and once the user logs in put the value to that user as 'X' and as soon as user logs out clear the field against his name in database .

So querry goes as

select * from zuser

where userid = sy-uname

and password = <password>

and <new_column> = ' ' .

if sy-subrc ne 0 .

Throw Error Message .

endif .

Method2:

Make a record level data base lock which can help u out .

Thanks

Sahil

Read only

Former Member
0 Likes
1,419

Hi experts,

I got solutions.

Thanks,

S.Suresh.