‎2009 Oct 09 9:30 AM
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
‎2009 Oct 09 9:37 AM
‎2009 Oct 09 9:40 AM
vijay
Please search in se37 . i found by searching only.
POPUPPASSWORD --- press F4
you get
POPUP_GET_USER_PASSWORD
‎2009 Oct 09 9:44 AM
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
‎2009 Oct 09 9:51 AM
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
‎2009 Oct 09 9:52 AM
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.
‎2009 Oct 09 9:50 AM
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
‎2009 Oct 09 10:13 AM
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
‎2009 Oct 09 10:07 AM
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.
‎2009 Oct 09 10:33 AM
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