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

Check-boxes in Selection Screen

Former Member
0 Likes
938

Pls tell me with respect to check-boxes in the selection-screen.

i have following selection-screen with 2 check-boxes.

PARAMETERS : A as checkbox,

B as checkbox.

i would like to have two conditions satisfied while i check the BOX.

1) Both boxes should be UNCHECKED if not selected.

2) ONLY one of the two should be CHECKED if user wants to.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
911

Hi,

Plz put this code it will work.

REPORT  ZZ1 MESSAGE-ID ZZ              .

SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.
SELECTION-SCREEN SKIP 1.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) text-014.
PARAMETERS p_tstrun AS CHECKBOX.
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) text-015.
PARAMETERS  p_bkgpr AS CHECKBOX.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.


at selection-screen on p_tstrun.
IF p_tstrun = 'X'.
IF p_bkgpr = 'X'.
MESSAGE e022.
ENDIF.
ENDIF.

at selection-screen on p_bkgpr.
IF p_bkgpr = 'X'.
IF p_tstrun = 'X'.
MESSAGE e022.
ENDIF.
ENDIF.

This will surely work.

plz reward if useful.

thanks,

dhanashri.

7 REPLIES 7
Read only

Former Member
0 Likes
911

use radio buttom.

this will slove ur problrm............

Regards

Anbu

Read only

Former Member
0 Likes
911

hi,

You can put the code in INITIALIZATION.

Leave both the checkbox blank in initialization.

In AT SELECTION-SCREEN OUTPUT.

if chkA = 'X'.

if ChkB = 'X'.

ChkB= ''.

endif.

elseif.Chkb = 'X'.

if chkA = 'X'.

chkA = ''.

Endif.

endif.

Hope this will Help.

Regards

Sumit Agarwal

Read only

Former Member
0 Likes
911

Hi,

I think you can achieve the result easily by

1. using RADIO BUTTON

2. Set no default value to them

Regards,

anirban

Read only

Former Member
0 Likes
911

Hi,

at selection-screen on a.

IF A = 'X'.

IF B = 'X'.

MESSAGE "ERROR" TYPE 'E'.

ENDIF.

ENDIF.

at selection-screen on B.

IF B = 'X'.

IF A = 'X'.

MESSAGE "ERROR" TYPE 'E'.

ENDIF.

ENDIF.

Read only

former_member787646
Contributor
0 Likes
911

Hi

Try this...

For Case-2:

IF chk_A = 'X' AND chk_B = 'X'.

chk_B = ''.

ENDIF.

Hope this would help you.

Murthy

Read only

Former Member
0 Likes
912

Hi,

Plz put this code it will work.

REPORT  ZZ1 MESSAGE-ID ZZ              .

SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.
SELECTION-SCREEN SKIP 1.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) text-014.
PARAMETERS p_tstrun AS CHECKBOX.
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) text-015.
PARAMETERS  p_bkgpr AS CHECKBOX.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.


at selection-screen on p_tstrun.
IF p_tstrun = 'X'.
IF p_bkgpr = 'X'.
MESSAGE e022.
ENDIF.
ENDIF.

at selection-screen on p_bkgpr.
IF p_bkgpr = 'X'.
IF p_tstrun = 'X'.
MESSAGE e022.
ENDIF.
ENDIF.

This will surely work.

plz reward if useful.

thanks,

dhanashri.

Read only

Former Member
0 Likes
911
PARAMETERS : A AS CHECKBOX,
             B AS CHECKBOX.

START-OF-SELECTION.

IF A IS NOT INITIAL AND B IS NOT INITIAL.

MESSAGE 'Select only one' TYPE 'S'.

ENDIF.