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

Disabling check box.....

Former Member
0 Likes
1,025

Hi All,

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

Hi All,

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

8 REPLIES 8
Read only

Former Member
0 Likes
999

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.

Read only

0 Likes
999

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.

Read only

Former Member
0 Likes
999

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.

Read only

Former Member
0 Likes
999

Hi,

Try this.

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

Sharin.

Read only

Former Member
0 Likes
999

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

Read only

0 Likes
999

Dear Abhijeet,

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

Thanks.

Read only

0 Likes
999

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

Read only

Former Member
0 Likes
999

Thansk everybody