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

Output using checkbox in selection-screen.

Former Member
0 Likes
983

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

1 ACCEPTED SOLUTION
Read only

anversha_s
Active Contributor
0 Likes
892

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

8 REPLIES 8
Read only

anversha_s
Active Contributor
0 Likes
893

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

Read only

0 Likes
892

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

Read only

0 Likes
892

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

Read only

Former Member
0 Likes
892

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

Read only

Former Member
0 Likes
892

Hi Rajesh

CHECK <checkbox_name> IS NOT INTIAL.

Do a submit statement.

Regards

Meera

Read only

gopi_narendra
Active Contributor
0 Likes
892

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

Read only

Former Member
0 Likes
892

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.

Read only

Former Member
0 Likes
892

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.