Hi Piyush,
There are two ways. One quick and dirty approach would be creating a decision pop up with table view. Code is below.
* In implementation calss create the global reference for decision popup.
gv_dec_popup type ref to if_bsp_wd_popup
* In event handler of the field, create the popup instance.
data: lt_col_def type tableviewcontroltab,
ls_col_def type line of tableviewcontroltab.
Loop at your internal table and set the values.
Loop at lt_table assigning <fs_values>.
ls_col_def-columnname = 'field name'.
ls_col_def-title = 'field title'.
append ls_col_def to lt_col_def.
clear ls_col_def.
Endloop.
Dec_popup = comp_controller->window_manager->create_decision_popup(
iv_title = 'Questions'
iv_description = 'Questions'
iv_display_table = gt_ttable
iv_visible_columns = lt_col_def
).
dec_popup->set_on_close_event( iv_event_name = ‘event_name’ iv_view = me ).
Dec_popup->open( ).
* Read the selected values in onclose event.
lv_outputnode ?= dec_popup->get_context_node( 'outputnode' ).
Now, an elegant way of doing this is to create a table view separately and set a navigation to this table view from your component. You can set the width and height of table view so that it will appear as a popup. Please let me know if you need the steps.
Thanks,
Faisal