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: 

display a value in the parameter when we select a radio button

Former Member
0 Kudos

HI,

can any one help me regarding this as soon as possible.

in a report program i have a radiobutton group with 6 radio buttons and i also have a parameter. when i select a radio button a value should be displayed in the parameter without executing that screen should refresh and display the value in the parameter field. every radio button will have a default value to display in the parameter when we select that radio button.

i tried like this but i did not get it.

AT SELECTION-SCREEN ON RADIOBUTTON GROUP rad1.

IF passport EQ c_x.

p_ictyp = 'PP'.

ELSEIF workperm EQ c_x.

p_ictyp = '04'.

ELSEIF iqama EQ c_x.

p_ictyp = '03'.

ELSEIF license EQ c_x.

p_ictyp = '06'.

ELSEIF exit EQ c_x.

p_ictyp = '06'.

ELSEIF visa = c_x.

p_ictyp = '07'.

ELSEIF insurid EQ c_x.

p_ictyp = '05'.

ENDIF.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Declare the USER-COMMAND for one of your radio button.

And use case staement with sy-ucomm.

Under that you perform your action.

Regards,

madan.

5 REPLIES 5

Former Member
0 Kudos

Declare the USER-COMMAND for one of your radio button.

And use case staement with sy-ucomm.

Under that you perform your action.

Regards,

madan.

0 Kudos

i am getting this requirement when i execute but i need to get it without executing. user-command is to check whether that radio button is checked or not right. i want the logic todisplay the value automatically in the parameter by refreshing hte screen. if it is in module pool we can write in pai and it triger when we select that.

0 Kudos

Can you try with this code?

PARAMETERS: p_pass RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND ABC,
            p_wper RADIOBUTTON GROUP rad1,
            p_iqma RADIOBUTTON GROUP rad1,
            p_lics RADIOBUTTON GROUP rad1,
            p_exit RADIOBUTTON GROUP rad1,
            p_visa RADIOBUTTON GROUP rad1,
            p_insu RADIOBUTTON GROUP rad1,
            p_icty TYPE char2.

AT SELECTION-SCREEN OUTPUT.
  CASE 'X'.
    WHEN p_pass.
      p_icty = 'PP'.
    WHEN p_wper.
      p_icty = '04'.
    WHEN p_iqma.
      p_icty = '03'.
    WHEN p_lics.
      p_icty = '06'.
    WHEN p_exit.
      p_icty = '06'.
    WHEN p_visa.
      p_icty = '07'.
    WHEN p_insu.
      p_icty = '05'.
  ENDCASE.
  LOOP AT SCREEN.
    IF screen-name CP 'P_ICTY'.
       screen-input = 0.
       MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

0 Kudos

Thank you very much. i got it. it had helped me a lot.

sivaprasad_ml
Participant
0 Kudos

Dear Eswar, the only display mode option in the example is very useful.

Regards

Sivaprasad