cancel
Showing results for 
Search instead for 
Did you mean: 

Screen - Radio Button

Former Member
0 Kudos

Hi,

I have a screen, where I have two radio buttons and input fields in front of them.

I want to make the input fields of one Radio button invisble when the other is selected.

However, when I select the radio button, I have to press Enter to make the input fields visible again.

I want the fields to be visible when the Radio button is selected.Is it possible to do so.

Please suggest.

Thanks in advance,

Archana

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi archana,

If your requirement is for Report, then first or second answer meets your requirement.

If your requirement is for Transactions, then srilatha's answer meets your requirement.

Former Member
0 Kudos

Hi Archna,

Yeah it is possible without pressing enter.Just assign

<b>Function code</b> to the radio button so automatically

it will trigger no need to press Enter agian.

In the screen (SE51), attributes give function code.

In PBO, loop at screen and do invisible depending on

the requirement.

Thanks&Regards,

Siri.

Message was edited by: Srilatha T

Former Member
0 Kudos

Hi Archana,

Please go through the follwing code it may be useful for u.

PARAMETERS: p_radio1 RADIOBUTTON GROUP g1 USER-COMMAND comm,

p_date1 TYPE sy-datum,

p_radio2 RADIOBUTTON GROUP g1 DEFAULT 'X',

p_date2 TYPE sy-datum.

AT SELECTION-SCREEN OUTPUT.

IF p_radio1 = 'X'.

LOOP AT SCREEN.

CASE screen-name.

WHEN 'P_DATE1'.

screen-input = '1'.

WHEN 'P_DATE2'.

screen-input = '0'.

ENDCASE.

MODIFY SCREEN.

ENDLOOP.

ELSEIF p_radio2 = 'X'.

LOOP AT SCREEN.

CASE screen-name.

WHEN 'P_DATE1'.

screen-input = '0'.

WHEN 'P_DATE2'.

screen-input = '1'.

ENDCASE.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

Thanks,

Anu.

former_member188685
Active Contributor
0 Kudos
1.PARAMETERS: R_SHIP RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND ABC,
               R_HU  RADIOBUTTON GROUP G1 .

2.AT SELECTION-SCREEN OUTPUT.
  IF R_SHIP = 'X'.
    PERFORM DISABLE_HU.
  ENDIF.
  IF R_HU = 'X'.
    PERFORM DISABLE_SHIP.
  ENDIF.

3.FORM DISABLE_HU .
  LOOP AT SCREEN.
    CASE SCREEN-NAME.
      WHEN 'P_EXIDV'.
        SCREEN-INPUT = 0.
        CLEAR P_EXIDV.
        MODIFY SCREEN.
      WHEN 'P_BUKRS'.
        SCREEN-INPUT = 0.
        CLEAR P_BUKRS.
        MODIFY SCREEN.
      WHEN 'P_TKNO'.
        SCREEN-INPUT = 0.
        CLEAR P_TKNO.
        MODIFY SCREEN.
      WHEN 'P_ENTRY'.
        SCREEN-INPUT = 0.
        CLEAR P_ENTRY.
        MODIFY SCREEN.
      WHEN 'P_EXIT'.
        SCREEN-INPUT = 0.
        CLEAR P_EXIT.
        MODIFY SCREEN.
      WHEN 'P_ROUTE'.
        SCREEN-INPUT = 0.
        CLEAR P_ROUTE.
        MODIFY SCREEN.
      WHEN 'P_TRAIL'.
        SCREEN-INPUT = 0.
        CLEAR P_TRAIL.
        MODIFY SCREEN.

    ENDCASE.
  ENDLOOP.
ENDFORM.                    " disable_Hu