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

selection screen

Former Member
0 Likes
633

in the selection screen, i have two radio button, p1, p2 and one select option field. fd1.....

if the radio button p1 is selected, then i want the fd1 value to be 100 in the selection screen and if the other radio button p2 is selected, then i want the value fd1 to be 200...

does anyone know how to do this?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
609

IF you want to use select-option then follow this..

REPORT zdummy_atg_2.

selection-screen begin of block b2 with frame title text-001.

parameters: radio radiobutton group rnd user-command test default 'X',

radio2 radiobutton group rnd.

select-options : test for bkpf-belnr.

selection-screen end of block b2.

AT SELECTION-SCREEN OUTPUT.

if radio eq 'X'.

test-low = '100'.

else.

test-low = '200'.

endif.

<b><REMOVED BY MODERATOR></b>

Thanks & Regards

ilesh 24x7

Message was edited by:

Alvaro Tejada Galindo

7 REPLIES 7
Read only

Former Member
0 Likes
609

REPORT zdummy_atg_2.

selection-screen begin of block b2 with frame title text-001.
parameters: radio radiobutton group rnd user-command test default 'X',
            radio2 radiobutton group rnd,
            test type bkpf-belnr.
selection-screen end of block b2.

AT SELECTION-SCREEN OUTPUT.
  if radio eq 'X'.
    test = '100'.
  else.
    test = '200'.
  endif.

Greetings,

Blag.

Read only

Former Member
0 Likes
610

IF you want to use select-option then follow this..

REPORT zdummy_atg_2.

selection-screen begin of block b2 with frame title text-001.

parameters: radio radiobutton group rnd user-command test default 'X',

radio2 radiobutton group rnd.

select-options : test for bkpf-belnr.

selection-screen end of block b2.

AT SELECTION-SCREEN OUTPUT.

if radio eq 'X'.

test-low = '100'.

else.

test-low = '200'.

endif.

<b><REMOVED BY MODERATOR></b>

Thanks & Regards

ilesh 24x7

Message was edited by:

Alvaro Tejada Galindo

Read only

0 Likes
609

I did try but no luck.....

actually the two radio buttons are in one block

and the select option field is in another block

when i did write the code in at selection screen output, i am not seeing any value.....

Read only

0 Likes
609

Try this way...It works -:)


REPORT zdummy_atg_2.

TABLES: bkpf.

SELECTION-SCREEN BEGIN OF BLOCK b2.
PARAMETERS: radio RADIOBUTTON GROUP rnd USER-COMMAND test DEFAULT 'X',
            radio2 RADIOBUTTON GROUP rnd.
SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN BEGIN OF BLOCK b1.
SELECT-OPTIONS: test FOR bkpf-belnr.
SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN OUTPUT.
  IF radio EQ 'X'.
    CLEAR test.
    REFRESH test.
    test-low = '100'.
    APPEND test.
  ELSE.
    CLEAR test.
    REFRESH test.
    test-low = '200'.
    APPEND test.
  ENDIF.

Greetings,

Blag.

Read only

0 Likes
609

Thanks Alvaro. It works perfect now!

Read only

0 Likes
609

Thanks for the perfect solution.

Read only

0 Likes
609

REPORT zdummy_atg_2.

selection-screen begin of block b2 with frame title text-001.

parameters: radio radiobutton group rnd user-command test default 'X',

radio2 radiobutton group rnd.

Select-option: test for bkpf-belnr.

selection-screen end of block b2.

AT SELECTION-SCREEN OUTPUT.

DATA: v_temp type P.

if radio1 = 'X'.

v_temp = 100.

elseif radio1 = 'X'.

v_temp = 200.

endif.

LOOP AT SCREEN.

IF SCREEN-NAME = 'test-low'.

SCREEN-VALUE = v_temp.

MODIFY SCREEN.

ENDIF.

ENDLOOP.