Application Development 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: 

Enable a field in selection screen using radiobuttons

Former Member
0 Kudos

Hi gurus,

I am having 2 radio buttons in a group.

If I click on the second radio button a field for path should appear i.e enabled or else the field should be in disable mode if it is first radio button.

Please send me the code.

promise to reward

Mac

3 REPLIES 3

Former Member
0 Kudos

hi,

Chk this sample code.

*Code used to Initiate the 'AT selection-screen' EVENT from radiobuttons.

selection-screen begin of block group with frame title text-s04.
parameters: p_sel1 type c radiobutton group sel user-command upd.
parameters: p_sel2 type c radiobutton group sel.
selection-screen end of block group.

AT SELECTION-SCREEN.

  IF p_sel1 = 'X'.
    PERFORM field1_open.
  ENDIF.
  IF p_sel2 = 'X'.
    PERFORM field2_open.
  ENDIF.

Rgds

Reshma

Former Member
0 Kudos

Hi,

Check the following code,

AT SELECTION-SCREEN OUTPUT.

IF p_rtry = 'X'.

LOOP AT SCREEN.

IF screen-name = 'P_FNAME'.

screen-input = '0'.

MODIFY SCREEN.

EXIT.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF screen-name = 'P_FNAME'.

screen-input = '1'.

MODIFY SCREEN.

EXIT.

ENDIF.

ENDLOOP.

ENDIF.

Hope this will solve your problem.

<b>Reward if helpful.</b>

Former Member
0 Kudos

Hi

Try this code

***************----


************************

tables ltak.

parameters :rad_tc radiobutton group rad1 default 'X' user-command ucom,

rad_pr radiobutton group rad1 .

selection-screen begin of block blk1 with frame.

selection-screen begin of line.

selection-screen comment 1(20) text-001.

parameters : p_tanum like ltak-tanum modif id abc.

parameters : p_tapos like ltap-tapos modif id abc.

selection-screen end of line.

selection-screen begin of line.

selection-screen comment 1(20) text-002.

parameters : p_user like sy-uname modif id abc.

selection-screen end of line.

selection-screen end of block blk1.

selection-screen begin of block blk3 with frame.

selection-screen comment 1(20) text-003.

select-options : s_tanum for ltak-tanum modif id cda.

parameters : zp_user like sy-uname modif id cda.

selection-screen end of block blk3.

at selection-screen output.

loop at screen.

if rad_tc = 'X' and screen-group1 = 'CDA'.

screen-input = '0'.

modify screen.

endif.

if rad_pr = 'X' and screen-group1 = 'ABC'.

screen-input = '0'.

modify screen.

endif.

endloop.

*************************----


*********************

If your query is solved kindly close the thread and award points

cheers

Shafiq