Application Development 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: 

checkbox ,at selection screen output

Former Member
0 Kudos

i hav 2 checkboxes.at selectionscreen if i click on one of them, the other should get deactive and viceversa..pls let me know the code...points will be awarded..

5 REPLIES 5

Former Member
0 Kudos

Hi,

Using check box its not possible. Use radio button.

Regards,

Bhaskar

suresh_datti
Active Contributor
0 Kudos

PL check this <a href="https://forums.sdn.sap.com/click.jspa?searchID=2287432&messageID=3137380">Thread</a> where a similar issue was discussed.

~Suresh

sreeramkumar_madisetty
Active Contributor
0 Kudos

hi

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF Checkbox= 'X'.

IF SCREEN-GROUP1 = 'CHK'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Regards,

Sreeram

kan_sasivimolkul
Explorer
0 Kudos

Hi Kiran,

Try this. Hope it could give you some idea.

SELECTION-SCREEN BEGIN OF BLOCK BOX1.

PARAMETER: p_all AS CHECKBOX ,

p_chk1 AS CHECKBOX USER-COMMAND ABCD DEFAULT 'X'

p_chk2 AS CHECKBOX MODIF ID XYZ.

SELECTION-SCREEN END OF BLOCK BOX1.

AT SELECTION-SCREEN OUTPUT.

IF p_chk1 = 'X'.

LOOP AT SCREEN.

CHECK SCREEN-GROUP1 = 'XYZ'.

screen-input = '0'.

MODIFY SCREEN.

ENDLOOP.

CLEAR: p_rep2.

ELSE.

LOOP AT SCREEN.

CHECK SCREEN-GROUP1 = 'XYZ'.

screen-input = '1'.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

kan_sasivimolkul
Explorer
0 Kudos

Sorry there are some mistakes in the code above.

Here you are:

SELECTION-SCREEN BEGIN OF BLOCK BOX1.

PARAMETER:

p_chk1 AS CHECKBOX USER-COMMAND ABCD DEFAULT 'X'

p_chk2 AS CHECKBOX MODIF ID XYZ.

SELECTION-SCREEN END OF BLOCK BOX1.

AT SELECTION-SCREEN OUTPUT.

IF p_chk1 = 'X'.

LOOP AT SCREEN.

CHECK SCREEN-GROUP1 = 'XYZ'.

screen-input = '0'.

MODIFY SCREEN.

ENDLOOP.

CLEAR: p_chk2.

ELSE.

LOOP AT SCREEN.

CHECK SCREEN-GROUP1 = 'XYZ'.

screen-input = '1'.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

Regards,