2006 Dec 06 6:42 AM
hi experts,
we have two blocks in our selection screen.each block have one radio button .
what i require is if we select one radioo button in first block ,the radiobutton which is in other block will have to enable.how?
i want logic also.
thanks in advance.
2006 Dec 06 6:50 AM
HI Surendra
Radiobuttons are treated as a group. So we need more than one in your group, whereas your requirement seems to be 1:1. So if the blocks have two radiobutton of different groups, once the radiobutton is selected it can never be un-selected. In this case itz better to go for Checkboxes. Please check on the requirement.
Below code might give you some idea on the same:
selection-screen begin of block blk1 with frame.
parameters: p_chk1 as checkbox user-command ABC.
selection-screen end of block blk1.
selection-screen begin of block blk2 with frame.
parameters: p_chk2 as checkbox.
selection-screen end of block blk2.
at selection-screen output.
loop at screen.
check screen-name = 'P_CHK2'.
if p_chk1 is initial.
screen-active = 0.
else.
screen-active = 1.
endif.
modify screen.
endloop.Kind Regards
Eswar
hi experts,
we have two blocks in our selection screen.each block have one radio button .
what i require is if we select one radioo button in first block ,the radiobutton which is in other block will have to enable.how?
i want logic also.
thanks in advance.
2006 Dec 06 6:48 AM
hai
u give different radiobutton group for each one.
and use this,
AT SELECTION-SCREEN ON RADIOBUTTON GROUP rad1.
within this u write coding for diable another block radiobutton
2006 Dec 06 6:50 AM
HI Surendra
Radiobuttons are treated as a group. So we need more than one in your group, whereas your requirement seems to be 1:1. So if the blocks have two radiobutton of different groups, once the radiobutton is selected it can never be un-selected. In this case itz better to go for Checkboxes. Please check on the requirement.
Below code might give you some idea on the same:
selection-screen begin of block blk1 with frame.
parameters: p_chk1 as checkbox user-command ABC.
selection-screen end of block blk1.
selection-screen begin of block blk2 with frame.
parameters: p_chk2 as checkbox.
selection-screen end of block blk2.
at selection-screen output.
loop at screen.
check screen-name = 'P_CHK2'.
if p_chk1 is initial.
screen-active = 0.
else.
screen-active = 1.
endif.
modify screen.
endloop.Kind Regards
Eswar
2006 Dec 06 6:51 AM
hi,
pls chk this logic.
u can give radio buton in the blocks. now i gave parameters.
by slight chnages u can adopt this logic.
report abc.
*-------------------------------------------
PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
PARAMETERS : R2 RADIOBUTTON GROUP RG .
*-------------------------------------------
selection-screen begin of block b1 with frame.
parameters : a(10) type c modif id abc.
parameters : b(10) type c modif id abc.
selection-screen end of block b1.
selection-screen begin of block b2 with frame.
parameters : c(20) type c modif id def.
parameters : d(20) type c modif id def.
selection-screen end of block b2.
*-------------------------------------------
at selection-screen output.
IF R1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'DEF'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF R2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.Regards
Anver
2006 Dec 06 6:52 AM
Surendra,
one radio button in one group is not necessary. Each group atleat two radio buttons required. if the radio button in 2nd group want to diable, write code in first group radio button selection.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |