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

Radiobutton Handling in Module pool

Former Member
0 Likes
652

Hi Experts,

I have requirment where in, I have to assign two radiobuttons in a group say R1 and R2, If R1 is checked call screen 100 else call screen 200.

Please tell me how to go about.

Regards,

Ram

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
628

hiii

use like below code

AT SELECTION-SCREEN OUTPUT .

  IF p_rad2 IS INITIAL .
    LOOP AT SCREEN.
      IF screen-name CS 'p_docno'.
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.                           " IF screen-name CS 'p_docno'.
    ENDLOOP.                           " LOOP AT SCREEN.

  ELSE.
    LOOP AT SCREEN .
      IF screen-name CS 'p_docno'.
        screen-active = 1.
        screen-input = 1.
        MODIFY SCREEN.
      ENDIF.                           " IF screen-name CS 'p_docno'.
    ENDLOOP.                           " LOOP AT SCREEN .
  ENDIF.                               " IF p_rad2 IS INITIAL .

if p_rad1 = 'X'.
call screen 100.
else.
call screen 200.
endif.

regards

twinkal

Hi Experts,

I have requirment where in, I have to assign two radiobuttons in a group say R1 and R2, If R1 is checked call screen 100 else call screen 200.

Please tell me how to go about.

Regards,

Ram

4 REPLIES 4
Read only

Former Member
0 Likes
629

hiii

use like below code

AT SELECTION-SCREEN OUTPUT .

  IF p_rad2 IS INITIAL .
    LOOP AT SCREEN.
      IF screen-name CS 'p_docno'.
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.                           " IF screen-name CS 'p_docno'.
    ENDLOOP.                           " LOOP AT SCREEN.

  ELSE.
    LOOP AT SCREEN .
      IF screen-name CS 'p_docno'.
        screen-active = 1.
        screen-input = 1.
        MODIFY SCREEN.
      ENDIF.                           " IF screen-name CS 'p_docno'.
    ENDLOOP.                           " LOOP AT SCREEN .
  ENDIF.                               " IF p_rad2 IS INITIAL .

if p_rad1 = 'X'.
call screen 100.
else.
call screen 200.
endif.

regards

twinkal

Read only

Former Member
0 Likes
628

take 2 R1 AND R2 radiobuttons on the screen .assgin them to one group say G .

now inthe pai of the screen write the logic as if R1 = 'X'

DO SOMETHING and if R2 = 'X' do something......

IF R1 = 'X'.

CALL SCREEN '100'.

ENDIF.

LIKE THAT...

Read only

Former Member
0 Likes
628

Hi

add a function code to the radiobutton by going to screen painer and in the properties of radion button

on the pai of screen having radio buttons.

case ok_code.

when 'function_code'.

if r1 = 'X'.

call screen 100.

else.

call screen 200.

endif.

endcase.

Regards

Aditya

Read only

Former Member
0 Likes
628

Hi,

Give this in the PAI of the initial screen where the radio buttons are designed..

IF sy-ucomm = 'ENTER'.

IF ra1 = 'X'.

CALL SCREEN '0002'.

ELSE.

CALL SCREEN '0003'.

ENDIF.

where enter is selected once u decide on the radio button ..ENTER is a push button.....

Regards,

Sai

Edited by: Saikumar on Jul 8, 2008 4:17 PM