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: 

How to update the default value of a field depending on the radio button selected , in selection screen

0 Kudos
1,475

How update the default value of a field depending on the radio button selected , in selection screen

for eg: If Radio Button 1 is selected Mvt Type in a Parameter or select option should be '101'

If Radio Button 2 is selected Mvt Type in a Parameter or select option should be '102'

Thanks

2 REPLIES 2

Former Member
0 Kudos
296

Hi,

Use AT SELECTION-SCREEN OUTPUT event for your scenario to modify the values based on the selected radio button.

Coding:

PARAMETERS: r1 RADIOBUTTON GROUP g1 USER-COMMAND click DEFAULT 'X',

             r2 RADIOBUTTON GROUP g1.

DATA: l_bwart TYPE t156-bwart.

SELECT-OPTIONS: s_mvt FOR l_bwart. "Select-options for Movement type

PARAMETERS: p_mvt TYPE bwart. "Parameters for Movement type

AT SELECTION-SCREEN OUTPUT.

     IF r1 = 'X'.

       CLEAR: s_mvt[], s_mvt.

       s_mvt-sign = 'I'.

       s_mvt-option = 'EQ'.

       s_mvt-low = 101.

       APPEND s_mvt.

       p_mvt = 101.

     ELSEIF r2 = 'X'.

       CLEAR: s_mvt[], s_mvt.

       s_mvt-sign = 'I'.

       s_mvt-option = 'EQ'.

       s_mvt-low = 102.

       APPEND s_mvt.

       p_mvt = 102.

     ENDIF.

0 Kudos
296

Hi Prasanna

Thanks a lot