Application Development and Automation 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: 
Read only

Radio Button Parameters +Select Options

Former Member
0 Likes
9,265

Hello Experts

I have following requirement

Radio button 1

Parameters

SELECT-OPTIONS1a

SELECT-OPTIONS1b

Radiobutton 2

Parameters

SELECT-OPTIONS2a

SELECT-OPTIONS2b

If we select Radiobutton 1 then radiobutton2 and its options should be grayed out or invisible. If we select Radiobutton 2 then radiobutton1 and its options should be grayed out or invisible.

I am using Loop at screen and using screen-input = '1' for individual radiobutton group. But in this case it is not allowing to go back to previous radiobutton group.

Please let me know If anyone has any Idea for this

Thanks in Advance

-Hark

3 REPLIES 3
Read only

Former Member
0 Likes
3,302

Hello Harkamal Singh,

There is an event called AT SELECTION-SCREEN OUTPUT.

Make use of this to acheive ur functionality.

plz Assign points, if helpful.

Rgds,

Raghu.

Read only

Former Member
3,302

Hello,

To achieve this you can't set one of the radiobuttons disabled, only the dependent fields.

See the code bellow:


TABLES spfli.

DATA lv TYPE c LENGTH 3.

PARAMETERS:
 p1 RADIOBUTTON GROUP 1 DEFAULT 'X' USER-COMMAND cm1,
 p2 RADIOBUTTON GROUP 1.

SELECT-OPTIONS: s1 FOR spfli-carrid MODIF ID m1,
 s2 FOR spfli-connid MODIF ID m2.

AT SELECTION-SCREEN OUTPUT.

  IF p1 IS NOT INITIAL.
    lv = 'M1'.
  ELSE.
    lv = 'M2'.
  ENDIF.

  LOOP AT SCREEN.
    IF screen-group1 = lv.
      screen-active = '0'.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

Regards.

Read only

Former Member
0 Likes
3,302

Check out this code:


*&---------------------------------------------------------------------*
*& Report  ZTEST_SOURAV9
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
 
REPORT  ztest_sourav9.
 
PARAMETERS:
p_desk RADIOBUTTON GROUP 1 DEFAULT 'X' USER-COMMAND flag, "Desktop location
p_unix RADIOBUTTON GROUP 1 ,  "Unix location
p_file1 LIKE rlgrap-filename MODIF ID m1 DEFAULT 'File 1' ,
p_file2 LIKE filename-fileextern MODIF ID m2 DEFAULT 'File 2'.
 
AT SELECTION-SCREEN OUTPUT.
 
  LOOP AT SCREEN.
    IF p_desk = 'X' AND
      screen-group1 = 'M2'.
      screen-active = '0'.
    ELSEIF p_unix = 'X' AND
       screen-group1 = 'M1'.
      screen-active = '0'.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.
 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
*....
 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file2.
*...
 
START-OF-SELECTION.
  IF p_desk = 'X'.
    WRITE: p_file1.
  ELSE.
    WRITE:  p_file2.
  ENDIF.