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

At selection-screen output

Former Member
0 Likes
588

Hi all,

I have 2 radiobuttons and one parameter.

my requirement is if i select one radio button one default value has to be assign to the parameter value

if i select anoth radiobuton another value has to be assign.

can any one help regarding this

thanks and regards

vamsi n

6 REPLIES 6
Read only

Former Member
0 Likes
567

Hi,

If R1 = 'X'.

P1 = def_val1.

elseif r2 = 'X'

p1 = def_val2

endif.

Sudher.A

Read only

Former Member
0 Likes
567

hi,

at selection-screen output.

loop at screen.

if p_r1 eq 'X' and screen-name = 'P_VAL'.

p_val = 'Default1'.

elseif p_r2 eq 'X' and screen-name = 'P_VAL'.

p_val = 'Default2'.

endif.

modify screen

endloop.

regards,

ananth

Read only

Former Member
0 Likes
567

Hi,

Try this code if you want to want to make p1 or p2 in display mode.

if r1 = 'X'.

p1 = default value.

if r2 = 'X'.

p2 = default value.

endif.

loop at screen.

if screen-name = p1.

if not p1 is initial.

screen-input = 0.

endif.

endif.

if screen-name = p2.

if not p2 is initial.

screen-input = 0.

endif.

modify screen.

endloop.

Plz reward points if it solves ur problem.

Thanks

Read only

Former Member
0 Likes
567

Hi,

Assign the Two Radiobuttons to the same group.

At Selection-screen output.

If RB1 = 'X'.

P = 'A'.

Elseif RB2 = 'X'.

P = 'B'.

Endif.

Reward points if it is helpful.

Regards,

Sangeetha.A

Read only

Former Member
0 Likes
567

Hi,

Please check the code below:

  • Selection screen for Processing Options

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'.

SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_rep RADIOBUTTON GROUP g1 .

SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b3.

  • For Upload & processing

IF pa_rep EQ gc_x.

LOOP AT SCREEN.

IF screen-group1 = gc_abc.

screen-input = gc_zero_num.

ELSEIF screen-group1 = gc_def.

screen-active = gc_one_num.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF pa_upd EQ gc_x.

*For Reprocessing

LOOP AT SCREEN.

IF screen-group1 = gc_def.

screen-input = gc_zero_num.

ELSEIF screen-group1 = gc_abc.

screen-active = gc_one_num.

ENDIF.

MODIFY SCREEN.

CLEAR pa_upd.

ENDLOOP.

ENDIF.

Regards

Kannaiah

Read only

Former Member
0 Likes
567

HI Vamsi..

paste the below code and run.. It will work correctly for ur requirement

PARAMETERS: p_rad1 RADIOBUTTON GROUP rad1 USER-COMMAND a DEFAULT 'X'.

PARAMETERS: p_rad2 RADIOBUTTON GROUP rad1.

PARAMETERS : p_sfile(100) TYPE c MODIF ID mo1 default 'nazeer'.

  • At selection Screen Output Event

AT SELECTION-SCREEN OUTPUT.

IF p_rad1 EQ 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'MO1'.

p_sfile = 'ZZZ'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF screen-group1 = 'MO1'.

p_sfile = 'ZZZ11'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

<b>

rewards if useful</b>

regards,

nazeer