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: 

Disabling check box.....

Former Member
0 Kudos

Hi All,

I need to disable a check box when i click on a radiobutton. How can i achieve this.

8 REPLIES 8

former_member188685
Active Contributor
0 Kudos

Based on Radio button value Disable the check box using loop at screen.

if it is Module pool then you can do that in PBO module. If it is Report program then you can place the logic under the event at selection-screen output.

loop at screen.
 if screen-name = 'CHECK'.
  screen-input = 0.
  modify screen.
 endif.
endloop.

0 Kudos

Hi,

I am working on Module Pool and i wrote this code in PBO Module but it is not working.

IF RB_CYCLE = 'X'.

LOOP AT SCREEN.

IF SCREEN-NAME = C_RIP.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Former Member
0 Kudos

Hi,

try this-

At selection-screen output.

if rad1 = 'X'.

Loop at screen.

if screen-name CS 'P_CHECK'.

screen-input = 0.

Modify screen.

Endif.

Endloop.

Endif.

Former Member
0 Kudos

Hi,

Try this.

In the click event of the radiobutton, use loop at screen concept and make the checkbox disabled.

Sharin.

Former Member
0 Kudos

Hi,

Use this type of logic


  IF p_rdb EQ 'X'.
    p_chk1 = 'X'.
    p_chk2 = 'X'.
  ELSE.
    p_chk1 = ' '.
    p_chk2 = ' '.
  ENDIF.

Regards

Abhijeet

0 Kudos

Dear Abhijeet,

Your logic will make it uncheck. But i need to make it disabled.

Thanks.

0 Kudos

Hi Mohammed,

Then use this type of logic. Though this code is for selection screens but you can use same logic on screen.

and Implement your code in PAI because on clicking of radiobutton checkboxes are getting disabled, that means you are interacting with your screen and PAI triggers if user interacts with screen.


REPORT z_sdn.

PARAMETERS:
  p_num RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND abc,
  p_char RADIOBUTTON GROUP rad1.

PARAMETERS:
  p_chk1 AS CHECKBOX DEFAULT 'X' MODIF ID num,
  p_chk2 AS CHECKBOX MODIF ID num.


AT SELECTION-SCREEN OUTPUT.
  IF p_num EQ 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'NUM'.
        screen-input = 1.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      IF screen-group1 = 'NUM'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

Regards

Abhijeet

Former Member
0 Kudos

Thansk everybody