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,

In selection screen 6 select options are there .

Here my requirement is i want to keep first three one radiobutton

and second three another radiobutton.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can try this way-

TABLES mara.

SELECT-OPTIONS:
  s_opt1 FOR mara-matnr MODIF ID md1,
  s_opt2 FOR mara-matnr MODIF ID md1,
  s_opt3 FOR mara-matnr MODIF ID md1,
  s_opt4 FOR mara-matnr MODIF ID md2,
  s_opt5 FOR mara-matnr MODIF ID md2,
  s_opt6 FOR mara-matnr MODIF ID md2.

PARAMETERS:rad1 RADIOBUTTON GROUP gr1 user-command gr1,
                  rad2 RADIOBUTTON GROUP gr1.


AT SELECTION-SCREEN OUTPUT.
  IF rad1 = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'MD2'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSEIF rad2 = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'MD1'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

Regards,

Sujit

4 REPLIES 4

Former Member
0 Kudos

Check below code and adjust code accordingly...

----


  • S E L E C T I O N S C R E E N

----


SELECTION-SCREEN BEGIN OF BLOCK FILE WITH FRAME TITLE TEXT-000.

SELECTION-SCREEN : BEGIN OF LINE.

PARAMETERS: RB_APPN RADIOBUTTON GROUP RAD1 DEFAULT 'X' USER-COMMAND RAD.

SELECTION-SCREEN COMMENT 3(25) TEXT-030.

PARAMETERS: RB_PRTN RADIOBUTTON GROUP RAD1.

SELECTION-SCREEN COMMENT 32(20) TEXT-031.

SELECTION-SCREEN : END OF LINE.

PARAMETERS : P_LPATH TYPE FILEPATH-PATHINTERN MODIF ID Z1,

P_FILE TYPE RLGRAP-FILENAME OBLIGATORY.

PARAMETERS : P_SUBGRP TYPE RLGRAP-FILENAME,

P_INVEN TYPE RLGRAP-FILENAME,

P_SALES TYPE RLGRAP-FILENAME.

SELECTION-SCREEN END OF BLOCK FILE.

SELECTION-SCREEN BEGIN OF BLOCK FILE1 WITH FRAME TITLE TEXT-032.

SELECT-OPTIONS:

S_WERKS FOR T001W-WERKS OBLIGATORY DEFAULT 5210,

S_SPART FOR MARA-SPART,

S_MATNR FOR MARA-MATNR.

SELECTION-SCREEN END OF BLOCK FILE1.

----


  • A T S E L E C T I O N - S C R E E N O U T P U T

----


AT SELECTION-SCREEN OUTPUT.

PERFORM F_MODIFY_SCREEN.

----


  • A T S E L E C T I O N S C R E E N

----


AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

PERFORM VALIDATE_FILE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SUBGRP.

IF RB_PRTN = 'X'.

PERFORM GET_LOCAL_FILE_NAME USING P_SUBGRP .

ELSEIF RB_APPN = 'X'.

MESSAGE I000 WITH

'No F4 help for files on Application Server.'(033).

ENDIF.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_INVEN.

IF RB_PRTN = 'X'.

PERFORM GET_LOCAL_FILE_NAME USING P_INVEN .

ELSEIF RB_APPN = 'X'.

MESSAGE I000 WITH

'No F4 help for files on Application Server.'(033).

ENDIF.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SALES.

IF RB_PRTN = 'X'.

PERFORM GET_LOCAL_FILE_NAME USING P_SALES .

ELSEIF RB_APPN = 'X'.

MESSAGE I000 WITH

'No F4 help for files on Application Server.'(033).

ENDIF.

&----


*& Form F_MODIFY_SCREEN

&----


  • text

----


FORM F_MODIFY_SCREEN .

*-- For Output Options

IF RB_PRTN = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'Z1' .

SCREEN-INVISIBLE = 1.

SCREEN-ACTIVE = 0.

ELSE.

SCREEN-INVISIBLE = 0.

SCREEN-ACTIVE = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

ENDFORM. " F_MODIFY_SCREEN

Former Member
0 Kudos

Hi,

Write like this:

PARAMETERS:

p_r1 RADIOBUTTON GROUP grp1,

p_r2 RADIOBUTTON GROUP grp1,

p_r3 RADIOBUTTON GROUP grp1,

p_r4 RADIOBUTTON GROUP grp2,

p_r5 RADIOBUTTON GROUP grp2,

p_r6 RADIOBUTTON GROUP grp2.

Regards,

Rama.

Former Member
0 Kudos

Hi,

You can try this way-

TABLES mara.

SELECT-OPTIONS:
  s_opt1 FOR mara-matnr MODIF ID md1,
  s_opt2 FOR mara-matnr MODIF ID md1,
  s_opt3 FOR mara-matnr MODIF ID md1,
  s_opt4 FOR mara-matnr MODIF ID md2,
  s_opt5 FOR mara-matnr MODIF ID md2,
  s_opt6 FOR mara-matnr MODIF ID md2.

PARAMETERS:rad1 RADIOBUTTON GROUP gr1 user-command gr1,
                  rad2 RADIOBUTTON GROUP gr1.


AT SELECTION-SCREEN OUTPUT.
  IF rad1 = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'MD2'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSEIF rad2 = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'MD1'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

Regards,

Sujit

Former Member
0 Kudos

Hi,

Pls find the below example and you can design your selection screen using the same.

tables:

mara.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-s00.

PARAMETERS: r_ppath RADIOBUTTON GROUP g1 DEFAULT 'X'

USER-COMMAND u1.

select-options:

s_v1 for mara-matnr,

s_v2 for mara-matnr,

s_v3 for mara-matnr.

PARAMETERS: r_dpath RADIOBUTTON GROUP g1.

select-options:

s_v4 for mara-matnr,

s_v5 for mara-matnr,

s_v6 for mara-matnr.

SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN OUTPUT.

IF NOT r_dpath IS INITIAL.

LOOP AT SCREEN.

IF screen-name = 'S_V1-LOW' OR

screen-name = 'S_V1-HIGH' OR

screen-name = 'S_V2-LOW' OR

screen-name = 'S_V2-HIGH' OR

screen-name = 'S_V3-LOW' OR

screen-name = 'S_V3-HIGH'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

IF NOT r_ppath IS INITIAL.

LOOP AT SCREEN.

IF screen-name = 'S_V4-LOW' OR

screen-name = 'S_V4-HIGH' OR

screen-name = 'S_V5-LOW' OR

screen-name = 'S_V5-HIGH' OR

screen-name = 'S_V6-LOW' OR

screen-name = 'S_V6-HIGH'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Thanks,

Sreeram.