2012 Apr 04 7:24 AM
Hi Experts,
I hav a selection screen contain user id ,password and pushbuttton.i hav a table zlogin which contains user id and password.when i will click on the button ,it will check the user id and password in the table zlogin.if its match ,then i can able to see a report which contains some fields of another table.
Moderator message: sounds basic, please work yourself first on your requirement, search for available information and documentation.
Message was edited by: Thomas Zloch
Hi Experts,
I hav a selection screen contain user id ,password and pushbuttton.i hav a table zlogin which contains user id and password.when i will click on the button ,it will check the user id and password in the table zlogin.if its match ,then i can able to see a report which contains some fields of another table.
Moderator message: sounds basic, please work yourself first on your requirement, search for available information and documentation.
Message was edited by: Thomas Zloch
2012 Apr 04 7:38 AM
Check this link
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba81635c111d1829f0000e829fbfe/content.htm
For <ucom>, you must specify a code of up to four characters. When the user clicks the pushbutton on the selection screen, <ucom> is entered in the UCOMM of the SSCRFIELDS interface work area. You must use the TABLES statement to declare the SSCRFIELDS structure. The contents of the SSCRFIELDS-UCOMM field can be processed during the AT SELECTION-SCREEN event.
2012 Apr 04 7:43 AM
Hi,
say p_val is id and p_val1 is pasword.
AT SELECTION SCREEN OUTPUT.
select id password from ZTABLE(where data exist) into wa(contain pass,id) where id = p_val and
pass = p_val1.
if sy-subrc ne 0.
message i888(sabapdocu) with 'ERROR in password'.
else.
"write logic
endif.
Thanks
2012 Apr 04 7:47 AM
Try using the below logic. Let me know if you have any questions.
REPORT ZTEST.
tables sscrfields.
selection-screen begin of line.
parameters: user type <TYPE>.
selection-screen end of line.
selection-screen begin of line.
parameters: pw type <type>.
selection-screen end of line.
selection-screen begin of line.
selection-screen pushbutton 2(10) but user-command BUT.
selection-screen end of line.
at selection-screen.
case sscrfields.
when 'BUT'.
* Add necessary validations here
message s000(zzz) with 'button press detected'.
endcase.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |