2006 Mar 29 8:23 AM
Hi,
I have done an Selection screen with some radiobuttons. After a radiobutton was checked, I want to show some parameter fields, specific ones for each radiobutton. (Something like another selection screen for each radiobutton).
How can I do that?
Regards Michael
2006 Mar 29 8:32 AM
Hi michael,
1. simple.
2. we have to use MODIF ID,
at selection-screen output event,
and SCREEN.
3. just copy paste in new program
REPORT abc.
*----
PARAMETERS : a RADIOBUTTON GROUP g1 USER-COMMAND abc,
b RADIOBUTTON GROUP g1.
PARAMETERS : t1(10) TYPE c MODIF ID m,
t2(10) TYPE c MODIF ID m,
t3(20) TYPE c MODIF ID n,
t4(20) TYPE c MODIF ID n.
*----
initialization.
*----
AT SELECTION-SCREEN OUTPUT.
PERFORM mycontrols.
*----
FORM mycontrols.
LOOP AT SCREEN.
IF a = 'X'.
IF screen-group1 = 'N'.
screen-invisible = 1.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
IF b = 'X'.
IF screen-group1 = 'M'.
screen-invisible = 1.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. "mycontrols
regards,
amit m.
2006 Mar 29 8:32 AM
Hi michael,
1. simple.
2. we have to use MODIF ID,
at selection-screen output event,
and SCREEN.
3. just copy paste in new program
REPORT abc.
*----
PARAMETERS : a RADIOBUTTON GROUP g1 USER-COMMAND abc,
b RADIOBUTTON GROUP g1.
PARAMETERS : t1(10) TYPE c MODIF ID m,
t2(10) TYPE c MODIF ID m,
t3(20) TYPE c MODIF ID n,
t4(20) TYPE c MODIF ID n.
*----
initialization.
*----
AT SELECTION-SCREEN OUTPUT.
PERFORM mycontrols.
*----
FORM mycontrols.
LOOP AT SCREEN.
IF a = 'X'.
IF screen-group1 = 'N'.
screen-invisible = 1.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
IF b = 'X'.
IF screen-group1 = 'M'.
screen-invisible = 1.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. "mycontrols
regards,
amit m.
2006 Mar 29 8:38 AM
2006 Mar 29 8:36 AM
**********************************************************************
SELECTION SCREEN
**********************************************************************
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_ver RADIOBUTTON GROUP g1 <b>USER-COMMAND rad</b> DEFAULT 'X',
p_sab RADIOBUTTON GROUP g1 .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln NO INTERVALS MODIF ID gr1.
PARAMETERS: p_dwfile TYPE rlgrap-filename
DEFAULT 'C:\test1.txt' MODIF ID gr2, "#EC NOTEXT
p_upfile TYPE rlgrap-filename
DEFAULT 'C:\test.txt' MODIF ID gr3. "#EC NOTEXT
SELECTION-SCREEN END OF BLOCK b2.
<b>AT SELECTION-SCREEN OUTPUT.</b>
LOOP AT SCREEN.
IF p_sab = 'X'.
IF screen-group1 = 'GR1' OR screen-group1 = 'GR2'.
screen-active = '0'.
screen-invisible = '1'.
ELSE.
screen-active = '1'.
screen-invisible = '0'.
ENDIF.
MODIFY SCREEN.
ELSE.
IF screen-group1 = 'GR3'.
screen-active = '0'.
screen-invisible = '1'.
ELSE.
screen-active = '1'.
screen-invisible = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
regards
vinod
2006 Mar 29 8:36 AM
Hi Michael,
I think the solution is to call different selection screens.
TABLES sscrfields.
PARAMETERS: rad1 RADIOBUTTON GROUP rad USER-COMMAND radio1,
rad2 RADIOBUTTON GROUP rad USER-COMMAND radio2,
rad3 RADIOBUTTON GROUP rad USER-COMMAND radio3.
AT SELECTION-SCREEN.
CASE SSCRFIELDS-UCOMM.
WHEN 'radio1'.
call selection-screen '100'.
WHEN 'radio2'.
call selection-screen '200'.
WHEN 'radio3'.
call selection-screen '300'.
endcase.
I suppose your query is answered.
Regards,
Sylendra.
2006 Mar 29 8:40 AM
Hi,
check this code,,
report ztest_radio_button .
parameters: p_matnr like mara-matnr,
p_vbeln like vbak-vbeln.
parameters: sales radiobutton group g1 default 'X' user-command abc,
material radiobutton group g1.
at selection-screen output.
if sales = 'X'.
loop at screen.
if screen-name = 'P_MATNR'.
screen-input = 0.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-name = 'P_VBELN'.
screen-input = 0.
modify screen.
endif.
endloop.
Regards
Vijay