2006 Dec 12 1:34 PM
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.
2006 Dec 12 1:47 PM
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.
2006 Dec 12 1:37 PM
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.
2006 Dec 12 1:41 PM
i added the modify screen but then when im exceuting the program, the checkboxes are disappeared from the screen!
2006 Dec 12 1:45 PM
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
2006 Dec 12 1:39 PM
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
2006 Dec 12 1:39 PM
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
2006 Dec 12 1:46 PM
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
2006 Dec 12 1:47 PM
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.
2006 Dec 12 2:09 PM