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: 

Perform changes to input screen according to the changes of radiobutton

former_member220801
Participant
0 Kudos

How can I change the search help of a textbox according to the values selected in the radiobutton group?

My case:

Have a radiobutton group containing 2 radiobuttons and a textbox.

When choosing radiobutton 'A', the search help of the textbox becomes file netvigation on app. server. When I choosing radiobutton 'B', the search help of the textbox becomes file netvigation on local PC.

The search help can't change and always corresponding to the default value that I have set for the radiobutton group.

Thanks for your help!

1 ACCEPTED SOLUTION

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Here is the sample code.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 1.

PARAMETERS : p_appl RADIOBUTTON GROUP rad1 DEFAULT 'X' <b>USER-COMMAND rad</b>.

"Appl Srvr

SELECTION-SCREEN COMMENT 4(25) text-002.

PARAMETERS: p_pres RADIOBUTTON GROUP rad1. "Prsnt Srvr

SELECTION-SCREEN COMMENT 40(25) text-003.

SELECTION-SCREEN END OF LINE.

PARAMETERS: p_file LIKE rlgrap-filename.

"I/P File Loc

SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

  • F4 help for the flat file path

PERFORM f4_filepath USING 'P_FILE' p_file.

FORM f4_filepath USING p_applfile p_presfile.

IF p_appl = c_x.

  • F4 help for Application Server

CALL FUNCTION 'F4_DXFILENAME_4_DYNP'

EXPORTING

dynpfield_filename = p_applfile

dyname = sy-cprog

dynumb = sy-dynnr

filetype = c_p

location = c_a

server = space.

ELSEIF p_pres = c_x.

  • F4 help for Presentation server

CALL FUNCTION 'WS_FILENAME_GET'

EXPORTING

def_path = p_file

mask = c_mask

mode = c_0

title = text-006

IMPORTING

filename = p_file

EXCEPTIONS

inv_winsys = 1

no_batch = 2

selection_cancel = 3

selection_error = 4

OTHERS = 5.

ENDIF.

ENDFORM. " F4_FILEPATH

Kindly reward points by clicking the star on the left of reply,if it is helpful.Hope this will solve your problem.

2 REPLIES 2

Former Member
0 Kudos

If u click on radio button group A then remaining radio button B Can do enabled.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Here is the sample code.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 1.

PARAMETERS : p_appl RADIOBUTTON GROUP rad1 DEFAULT 'X' <b>USER-COMMAND rad</b>.

"Appl Srvr

SELECTION-SCREEN COMMENT 4(25) text-002.

PARAMETERS: p_pres RADIOBUTTON GROUP rad1. "Prsnt Srvr

SELECTION-SCREEN COMMENT 40(25) text-003.

SELECTION-SCREEN END OF LINE.

PARAMETERS: p_file LIKE rlgrap-filename.

"I/P File Loc

SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

  • F4 help for the flat file path

PERFORM f4_filepath USING 'P_FILE' p_file.

FORM f4_filepath USING p_applfile p_presfile.

IF p_appl = c_x.

  • F4 help for Application Server

CALL FUNCTION 'F4_DXFILENAME_4_DYNP'

EXPORTING

dynpfield_filename = p_applfile

dyname = sy-cprog

dynumb = sy-dynnr

filetype = c_p

location = c_a

server = space.

ELSEIF p_pres = c_x.

  • F4 help for Presentation server

CALL FUNCTION 'WS_FILENAME_GET'

EXPORTING

def_path = p_file

mask = c_mask

mode = c_0

title = text-006

IMPORTING

filename = p_file

EXCEPTIONS

inv_winsys = 1

no_batch = 2

selection_cancel = 3

selection_error = 4

OTHERS = 5.

ENDIF.

ENDFORM. " F4_FILEPATH

Kindly reward points by clicking the star on the left of reply,if it is helpful.Hope this will solve your problem.