Application Development 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: 

SELECTION SCREEN

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

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.

0 Kudos

Thank You!

vinod_gunaware2
Active Contributor
0 Kudos

**********************************************************************

      • 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

Former Member
0 Kudos

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.

former_member188685
Active Contributor
0 Kudos

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