cancel
Showing results for 
Search instead for 
Did you mean: 

open dropdown box after click radiobutton

0 Kudos

hi,

i want a dropdown box after clicking radiobutton?

please help me.

Regards,

priyanka gore.

former_member751964
Participant
0 Kudos

Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with Community Q&A, as the overview provides tips for preparing questions that draw responses from our members.

For example, you can:

- outline what steps you took to find answers (and why they weren't helpful)

- share screenshots of what you've seen/done

- make sure you've applied the appropriate tags

- use a more descriptive subject line.

The more details you provide, the more likely it is that members will be able to respond. Feel free to also take our Q&A tutorial Q&A tutorial

Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a Picture to your profile you encourage readers to respond.

Accepted Solutions (1)

Accepted Solutions (1)

Nikhil_Rao_ABAP
Participant

Hello,

This should be close to what you want to achieve:

PARAMETERS:
  p_hidedd RADIOBUTTON GROUP rg1 DEFAULT 'X' USER-COMMAND ddn,
  p_showdd RADIOBUTTON GROUP rg1,

  p_dropdn AS LISTBOX VISIBLE LENGTH 30 MODIF ID ddg.

AT SELECTION-SCREEN OUTPUT.
  IF p_hidedd = abap_true.
    cl_selection_screen=>get_instance( )->set_field( |P_DROPDN| )->hide_group( |DDG| ).
  ELSE.
    DATA: drop_down_filled TYPE abap_bool.
    IF drop_down_filled = abap_false.
      drop_down_filled = abap_true.
      DATA(drop_down_values) = VALUE vrm_values( ( key = |Key1| text = |Text1| )
                                                 ( key = |Key2| text = |Text2| ) ).
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = 'P_DROPDN'
          values          = drop_down_values[]
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        CLEAR: p_dropdn.
      ENDIF.
    ENDIF.
  ENDIF.

The dropdown(P_DROPDN) will be completely hidden and will open up as a field on the screen only if you click RB-2(P_SHOWDD)

Regards,

Nikhil Rao

0 Kudos

thanks sir.

Answers (1)

Answers (1)

0 Kudos

hi,

I want two radio button one is employee and other one is department after i click on employee radio button and open employee dropdown box same as above department using internal table.

regards.

priyanka gore.

matt
Active Contributor
0 Kudos

Only post answers as answers. If what you've posted is a new question, create a new question. Otherwise, use Add a Comment.