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

Disable second selection block.

Former Member
0 Likes
571

Hi everyone,

Can anyone answer this...

In the selection screen there are 2 blocks. In the first selection screen there is a check box.The user can input values in either if the selection blocks,NOT both. If the user checks the checkbox the second selection block should be disabled.How should i code this...Please advice.Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
547

Hi madhavi,

1. Just copy paste

2.

report abc.

PARAMETERS : CHK AS CHECKBOX USER-COMMAND ABC.

*----


Block 1

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME .

PARAMETERS : A(10) TYPE C MODIF ID BK1.

SELECTION-SCREEN END OF BLOCK B1.

*----


Block 2

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME .

PARAMETERS : B(10) TYPE C MODIF ID BK2.

PARAMETERS : C(10) TYPE C MODIF ID BK2.

PARAMETERS : D(10) TYPE C MODIF ID BK2.

SELECTION-SCREEN END OF BLOCK B2.

*----


AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF CHK = 'X'.

IF SCREEN-GROUP1 = 'BK1'.

SCREEN-INVISIBLE = 1.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

IF CHK IS INITIAL.

IF SCREEN-GROUP1 = 'BK2'.

SCREEN-INVISIBLE = 1.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

regards,

amit m.

3 REPLIES 3
Read only

Former Member
0 Likes
548

Hi madhavi,

1. Just copy paste

2.

report abc.

PARAMETERS : CHK AS CHECKBOX USER-COMMAND ABC.

*----


Block 1

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME .

PARAMETERS : A(10) TYPE C MODIF ID BK1.

SELECTION-SCREEN END OF BLOCK B1.

*----


Block 2

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME .

PARAMETERS : B(10) TYPE C MODIF ID BK2.

PARAMETERS : C(10) TYPE C MODIF ID BK2.

PARAMETERS : D(10) TYPE C MODIF ID BK2.

SELECTION-SCREEN END OF BLOCK B2.

*----


AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF CHK = 'X'.

IF SCREEN-GROUP1 = 'BK1'.

SCREEN-INVISIBLE = 1.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

IF CHK IS INITIAL.

IF SCREEN-GROUP1 = 'BK2'.

SCREEN-INVISIBLE = 1.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

regards,

amit m.

Read only

ferry_lianto
Active Contributor
0 Likes
547

Hi,

You can use the event AT SELECTION-SCREEN OUTPUT and LOOP AT SCREEN to disable the selection block.

Please check this link for sample programs.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
547

Hello,

Try something like this,

AT SELECTION-SCREEN OUTPUT .

if first_chk eq 'X' AND secnd_check eq 'X'.

MESSAGE 'NOT BOTH' TYPE 'E'.

ENDIF.