DATA lo_view TYPE REF TO if_wd_view.
DATA lo_buttonchoice TYPE REF TO cl_wd_button_choice.
DATA lo_menuactionitem TYPE REF TO cl_wd_menu_action_item.
* Get a reference to the ButtonChoice view object
lo_view ?= wd_this->wd_get_api( ).
lo_buttonchoice ?= lo_view->get_element( 'BUTTONCHOICE_ID' ).
* Add a MenuActionItem to the ButtonChoice for each record in the source data table
LOOP AT lt_data ASSIGNING <data>.
CALL METHOD cl_wd_menu_action_item=>new_menu_action_item
EXPORTING
id = <data>-id
on_action = 'VIEW_ACTION' " action to be executed upon selection of the menu item
text = <data>-text
RECEIVING
control = lo_menuactionitem.
CALL METHOD lo_buttonchoice->add_choice
EXPORTING
the_choice = lo_menuactionitem.
ENDLOOP. " <data>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
37 | |
10 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 | |
2 |