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

Reg: Function module for pop up password

Former Member
0 Likes
2,812

Hi Experts,

I have a requirement like, i need to maintain the user id and password in a separate Ztable, each user need to enter the user id and password to run a report program.

So i need to call pop up for password function module, then once they entered the password, i will check the user id and password in Ztable, then i will display corresponding data,

Requirement : Need to know the pop-up function module with user id and password parameter.

Thanks in advance.

Vijay.R

9 REPLIES 9
Read only

Former Member
0 Likes
1,610

POPUP_GET_USER_PASSWORD for dsiplaying userid and password

Read only

Former Member
0 Likes
1,610

vijay

Please search in se37 . i found by searching only.

POPUPPASSWORD --- press F4

you get

POPUP_GET_USER_PASSWORD

Read only

0 Likes
1,610

Thanks kumar and sowmya,

But i tried this function module previosly, but when i executed, it is throwing dump.

In the tables section, i dont know how to give the entries.

I ma not able to execute this function module.

Do you have any idea?

Thanks

Vijay.R

Read only

0 Likes
1,610

Hi Vijayendra,

Delcare table of type UDDICLS_REGISTRY_ATTR and pass to the FM which inturn will give u the user id and password

Regards,

Aditya

Read only

0 Likes
1,610

here is the sampel code .

data : user type string,

password type string,

i_registry type UDDICLS_REGISTRIES.

CALL FUNCTION 'POPUP_GET_USER_PASSWORD'

IMPORTING

USER = user

PASSWORD = password

TABLES

registry_tab = i_registry

EXCEPTIONS

CANCEL_PRESSED = 1

OTHERS = 2

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Read only

Former Member
0 Likes
1,609

by the way this FM will only validate user name password which is in system.

DATA : gt type UDDICLS_REGISTRIES. " this is a table type
CALL FUNCTION 'POPUP_GET_USER_PASSWORD'
* IMPORTING
*   USER                 = sy-
*   PASSWORD             =
  TABLES
    registry_tab         = gt
 EXCEPTIONS
   CANCEL_PRESSED       = 1
   OTHERS               = 2
          .

actually you do not need this.

create your own screen.

for the password field, in the PBO or at selection-screen output..

loop at screen,
 if screen-name = 'P_PWD'.
   screen-invisible = '1'.
endif.
modify screen.
endloop.

and after getting this you can write a select statement to fetch the matching record. and validate

Edited by: Soumyaprakash Mishra on Oct 9, 2009 2:33 PM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,609

Dear Soumya,

by the way this FM will only validate user name password which is in system

Once again read the OP's post. He doesnot want to use this FM to validate the usename. He just wants to get the POP-UP for USER & PWD.

I hope i am clear.

I tried this code & it works for me:

DATA: V_DATE TYPE DATUM.

DATA: V_USER TYPE STRING,
V_PWD TYPE STRING.

SELECT-OPTIONS: DATE FOR V_DATE.

AT SELECTION-SCREEN OUTPUT.

DATA: ITAB TYPE UDDICLS_REGISTRIES.

CALL FUNCTION 'POPUP_GET_USER_PASSWORD'
  IMPORTING
    USER           = V_USER
    PASSWORD       = V_PWD
  TABLES
    REGISTRY_TAB   = ITAB
  EXCEPTIONS
    CANCEL_PRESSED = 1
    OTHERS         = 2.

IF SY-SUBRC = 0.
  IF V_USER NE 'SSAHA' AND V_PWD NE '12345'. "Do your Validations here
    MESSAGE 'No Auth. to Run report' TYPE 'A'.
  ENDIF.
ENDIF.

BR,

Suhas

Read only

kiran_k8
Active Contributor
0 Likes
1,609

Vijay,

When we have the Authorisation concept why do you need a ZProgram to do this stuff.Based on the User profile you can give the authorisation to the T Code.

K.Kiran.

Read only

Former Member
0 Likes
1,609

Hi All,

Thanks for your replies,

i found the solution.

i have created a screen and i selected option as invisible for the text field in the attributes.

It is appearing like a password field and i can able to enter the password.

Thanks to all.

Vijay.R