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

making checkbox invisible

Former Member
0 Likes
3,244

hi everyone

i have 2 checkboxes on a selection-screen

when i select one, the other shd be invisible, but my code is not working, can you check that plz

SELECTION-SCREEN: BEGIN OF BLOCK b02 WITH FRAME.

PARAMETERS:

p_rs_ch TYPE c AS CHECKBOX modif id B1 user-command com1,

p_ri_ch TYPE c AS CHECKBOX modif id B1 user-command com1.

SELECTION-SCREEN: END OF BLOCK b02.

INCLUDE zzfl0031obj_b.

*INCLUDE zzfl0031obj_lvp.

INITIALIZATION.

at selection-screen output.

loop at screen.

if p_rs_ch NE 'X' and screen-group1 = 'B1'.

screen-input = '0'.

screen-invisible = '1'.

endif.

if p_ri_ch NE 'X' and screen-group1 = 'B1'.

screen-input = '0'.

screen-invisible = '1'.

endif.

endloop.

PERFORM f_check_authorization.

  • Ending of modification <CM0554 New Version>

PERFORM init_data.

AT SELECTION-SCREEN.

IF p_rs_ch IS INITIAL AND p_ri_ch IS INITIAL.

MESSAGE e917(zz).

ENDIF.

IF NOT p_rs_ch IS INITIAL.

PERFORM f_check_rights USING 'FINANCE_RS' lc_rs.

ENDIF.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,854

Hi sia,

1. I just checked, and now it works fine.

2. Just replace this small code .

3.

at selection-screen output.

loop at screen.

if screen-name = 'P_RI_CH' and P_RS_CH = 'X'.

screen-input = '0'.

screen-invisible = '1'.

MODIFY SCREEN.

endif.

if screen-name = 'P_RS_CH' and P_RI_CH = 'X'.

screen-input = '0'.

screen-invisible = '1'.

MODIFY SCREEN.

endif.

endloop.

regards,

amit m.

hi everyone

i have 2 checkboxes on a selection-screen

when i select one, the other shd be invisible, but my code is not working, can you check that plz

SELECTION-SCREEN: BEGIN OF BLOCK b02 WITH FRAME.

PARAMETERS:

p_rs_ch TYPE c AS CHECKBOX modif id B1 user-command com1,

p_ri_ch TYPE c AS CHECKBOX modif id B1 user-command com1.

SELECTION-SCREEN: END OF BLOCK b02.

INCLUDE zzfl0031obj_b.

*INCLUDE zzfl0031obj_lvp.

INITIALIZATION.

at selection-screen output.

loop at screen.

if p_rs_ch NE 'X' and screen-group1 = 'B1'.

screen-input = '0'.

screen-invisible = '1'.

endif.

if p_ri_ch NE 'X' and screen-group1 = 'B1'.

screen-input = '0'.

screen-invisible = '1'.

endif.

endloop.

PERFORM f_check_authorization.

  • Ending of modification <CM0554 New Version>

PERFORM init_data.

AT SELECTION-SCREEN.

IF p_rs_ch IS INITIAL AND p_ri_ch IS INITIAL.

MESSAGE e917(zz).

ENDIF.

IF NOT p_rs_ch IS INITIAL.

PERFORM f_check_rights USING 'FINANCE_RS' lc_rs.

ENDIF.

8 REPLIES 8
Read only

Former Member
0 Likes
1,854

Your missing the <b>modify screen.</b>


loop at screen.
if p_rs_ch NE 'X' and screen-group1 = 'B1'.
screen-input = '0'.
screen-invisible = '1'.
modify screen.
endif.

if p_ri_ch NE 'X' and screen-group1 = 'B1'.
screen-input = '0'.
screen-invisible = '1'.
modify screen.
endif.

endloop.

Greetings,

Blag.

Read only

0 Likes
1,854

i added the modify screen but then when im exceuting the program, the checkboxes are disappeared from the screen!

Read only

0 Likes
1,854

Try this -:)


**************
p_rs_ch TYPE c AS CHECKBOX modif id B1 user-command com1,
p_ri_ch TYPE c AS CHECKBOX modif id B2 user-command com1.
**************

loop at screen.
if p_rs_ch NE 'X'.
if screen-group1 = 'B1'.
screen-input = '0'.
screen-invisible = '1'.
modify screen.
else.
screen-input = '1'.
screen-invisible = '0'.
modify screen.
endif.

if p_ri_ch NE 'X'.
if screen-group1 = 'B2'.
screen-input = '0'.
screen-invisible = '1'.
modify screen.
else.
screen-input = '1'.
screen-invisible = '0'.
modify screen.
endif.

Greetings,

Blag.

Message was edited by:

Alvaro Tejada

Read only

Former Member
0 Likes
1,854

Hi Anjali,

Parameters p1 as checkbox modif id z1.

at selection-screen output.

loop at screen.

if screen-group1 = 'Z1'.

screen-input = 0.

modify screen.

endloop.

Reward if usefull..

Regards,

Srini

Read only

Former Member
0 Likes
1,854
INITIALIZATION.
at selection-screen output.
loop at screen.
if p_rs_ch NE 'X' and screen-group1 = 'B1'.
screen-input = '0'.
screen-invisible = '1'.
<b>mdify screen.</b>
endif.

if p_ri_ch NE 'X' and screen-group1 = 'B1'.
screen-input = '0'.
screen-invisible = '1'.
<b>mdify screen.</b>
endif.
endloop.

Regards,

Santosh

Read only

Former Member
0 Likes
1,854

Hi sia,

why don't you use Radiobutton in your Report, i think it's the better way.

here a short example:

PARAMETERS: P_X1 RADIOBUTTON GROUP GRP1 DEFAULT 'X'.

PARAMETERS: P_X2 RADIOBUTTON GROUP GRP1.

*

START-OF-SELECTION.

*

WRITE: / 'P_X1:', P_X1.

WRITE: / 'P_X2:', P_X2.

WRITE: / 'Ende'.

*

Regards, Dieter

Read only

Former Member
0 Likes
1,855

Hi sia,

1. I just checked, and now it works fine.

2. Just replace this small code .

3.

at selection-screen output.

loop at screen.

if screen-name = 'P_RI_CH' and P_RS_CH = 'X'.

screen-input = '0'.

screen-invisible = '1'.

MODIFY SCREEN.

endif.

if screen-name = 'P_RS_CH' and P_RI_CH = 'X'.

screen-input = '0'.

screen-invisible = '1'.

MODIFY SCREEN.

endif.

endloop.

regards,

amit m.

Read only

0 Likes
1,854

thanks a lot amit