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

Reg Selection Screen Events

Former Member
0 Likes
356

Hi Friends,

I have 3 input field and two radio button in my selection screen, On clicking the first radio button, the sum of two fields should be displayed in the third input field. Similarly when i click the second radio button, the multiply of two fields should be displayed in third inpur field.

Could you please all help me on this?

Regrads,

Sundaresan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
330

Hi,

Check this code..

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
parameter : num1 TYPE i,
            num2 TYPE i,
            num3 TYPE i.

PARAMETERS: r1 RADIOBUTTON GROUP rad1 user-command usr DEFAULT 'X',
            r2 RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK b1.


AT SELECTION-SCREEN OUTPUT.
  IF r1 EQ 'X'.
    num3 = num1 + num2.
  ENDIF.

  IF r2 EQ 'X'.
    num3 = num1 * num2.
  ENDIF.

Hi,

Check this code..

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
parameter : num1 TYPE i,
            num2 TYPE i,
            num3 TYPE i.

PARAMETERS: r1 RADIOBUTTON GROUP rad1 user-command usr DEFAULT 'X',
            r2 RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK b1.


AT SELECTION-SCREEN OUTPUT.
  IF r1 EQ 'X'.
    num3 = num1 + num2.
  ENDIF.

  IF r2 EQ 'X'.
    num3 = num1 * num2.
  ENDIF.

1 REPLY 1
Read only

Former Member
0 Likes
331

Hi,

Check this code..

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
parameter : num1 TYPE i,
            num2 TYPE i,
            num3 TYPE i.

PARAMETERS: r1 RADIOBUTTON GROUP rad1 user-command usr DEFAULT 'X',
            r2 RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK b1.


AT SELECTION-SCREEN OUTPUT.
  IF r1 EQ 'X'.
    num3 = num1 + num2.
  ENDIF.

  IF r2 EQ 'X'.
    num3 = num1 * num2.
  ENDIF.