‎2006 Nov 29 5:44 AM
Hi Techies,
I want to devlop a selection screen in such a way that once i check the check box in the selection creen it shuld give the o/p.
The req is there is a user name and job in selection screen which the user is going to give and the he will check the check box and press f8 . he shuld get the o/p.
so can anyone hlp me regarding this.
regards,
rajesh sahakla
‎2006 Nov 29 5:47 AM
hi,
look this.
report zchk.
tables: sscrfields.
PARAMETERS: p_hold AS CHECKBOX DEFAULT 'X' USER-COMMAND hold.
at selection-screen.
PERFORM sscr_user_commands.
*---------------------------------------------------------------------*
* FORM sscr_user_commands *
*---------------------------------------------------------------------*
FORM sscr_user_commands.
CASE sscrfields-ucomm.
WHEN 'HOLD'. " Make this uppercase.
break-point.
ENDCASE.
ENDFORM.
.rgds
Anver
‎2006 Nov 29 5:47 AM
hi,
look this.
report zchk.
tables: sscrfields.
PARAMETERS: p_hold AS CHECKBOX DEFAULT 'X' USER-COMMAND hold.
at selection-screen.
PERFORM sscr_user_commands.
*---------------------------------------------------------------------*
* FORM sscr_user_commands *
*---------------------------------------------------------------------*
FORM sscr_user_commands.
CASE sscrfields-ucomm.
WHEN 'HOLD'. " Make this uppercase.
break-point.
ENDCASE.
ENDFORM.
.rgds
Anver
‎2006 Nov 29 5:51 AM
Hi Anversha..
Thnks for ur reply. But i think u didnt get my problem. see i hav user name and job 2 selection screen parameters or select-options,
and i need to hav a checkbox in such a way that once a user give the username and password and checks the checkbox, and presses f 8 or executes then he shuld get the appropriate o/p for the following i/p.
I think u hav got my req well.
regards,
sahakla
‎2006 Nov 29 6:31 AM
hi rajesh,
i think the posts above r sufficient to solve ur prob
Hope this solves the query
U can use the 2 events
AT SELECTION-SCREEN
here u check the sy-ucomm field and the checkbox
if sy-ucomm eq 'ONLI' and chk_box eq 'X'.
fetch the corresponding data 2 be displayed n store it in an internal table
endif.
AT SELECTION-SCREEN OUTPUT
check the internal table for data.
if not int_table is initial....."Data exists"
put the data onto the screen by assigning the screen variables to the table fields
endif.
****if found helpful u can mark some points
Regds,
Vs
‎2006 Nov 29 5:47 AM
Hi,
Check this example..Once the user presses the check box the start-of-selection will be triggered..
TABLES: SSCRFIELDS.
PARAMETERS: P_CHECK AS CHECKBOX USER-COMMAND USR.
AT SELECTION-SCREEN.
IF SY-UCOMM = 'USR' AND P_CHECK = 'X'.
SY-UCOMM = 'ONLI'.
SSCRFIELDS-UCOMM = 'ONLI'.
ENDIF.
START-OF-SELECTION.
WRITE: / 'SUCCESS'.
Thanks,
Naren
‎2006 Nov 29 5:48 AM
Hi Rajesh
CHECK <checkbox_name> IS NOT INTIAL.
Do a submit statement.
Regards
Meera
‎2006 Nov 29 5:49 AM
if u wnt the O/P on checking the Chk Box u should write all the code in the
<b>at selection-screen output</b> event
if not if ur req is that u need to execute only if the Chk box is checked then write th code in <b>at selection-screen output</b> event
loop at screen.
if chk_box = 'X'
if screen-name = 'USERNAME'. or screen-name = 'JOB'.Parameter name
screen-input = 1.
modify screen.
endif.
endif.
endloop.
Regards
- Gopi
‎2006 Nov 29 6:17 AM
Hi ,
see my req is like this.
Jobname==
Stepno.===
scheduled=
sucessful=
terminated=
Chk4=
Chk5=
If u check any one it will processed with the required job and stepno.
‎2006 Nov 29 6:25 AM
Hi rajesh,
DATA : BEGIN OF ITAB OCCURS 0,
USERNAME LIKE ABC-USERNAME,
JOB LIKE ABC-JOB,
END OF ITAB.
PARAMETERS: p_username LIKE XXXXXX ,
p_job LIKE YYYYYY,
p_checkbox as checkbox.
START-OF-SELECTION.
select xx yy zz form table abc
into table itab
where username eq p_username and
job eq p_job.
Loop at itab.
WRITE : ITAB-USERNAME ,15(20) JOB.
endloop.