cancel
Showing results for 
Search instead for 
Did you mean: 

add a button choice on alv toolbar in wd4a

0 Kudos

Hy everyone i've to add a button choice on alv toolbar. I create a node 'MY_TOOLBAR_FUNCTIONS' where add node and attributes to bind in external mapping in function_elements of alv interface controller.For button_choice I made a node 'CHOICE' and attribute 'WA_VALUE' type string. But the application dumps when create object lr_choice ; the error is WebDynpro Exception: IDs Can Only Contain Characters of Syntactical Character Set .

May you help me? Thanks in advance.

data: ls_choice TYPE ig_componentcontroller=>element_choice,

nd_choice TYPE REF TO if_wd_context_node,

nd_choice = nd_my_functions->get_child_node( name = wd_this->wdctx_choice ).

el_choice = nd_choice->get_element( ).

ls_choice-wa_value = '01'.

APPEND ls_choice TO lt_choice.

nd_choice->bind_table( lt_choice ).

DATA:lr_button_choice TYPE REF TO cl_salv_wd_fe_button_choice.

DATA:lr_choice TYPE REF TO cl_salv_wd_menu_action_item.

lr_function = l_value->if_salv_wd_function_settings~create_function_right( id = 'MYBUTTONCHOICE' ).

CREATE OBJECT lr_button_choice.

EXPORTING

sel_action_item_elementname = 'CHOICE.WA_VALUE'.

lr_button_choice->set_text( value = 'Filter' ).

lr_button_choice->set_tooltip( value = 'Filter').

lr_button_choice->set_sel_action_itm_elementname( 'CHOICE.WA_VALUE' ).

CREATE OBJECT lr_choice

EXPORTING

id = ls_CHOICE-WA_VALUE.

lr_choice->set_text( 'Esito Positivo' ).

lr_choice->set_image_source( value = 'ICON_GREEN_LIGHT').

lr_button_choice->add_choice( lr_choice ).

lr_function->set_editor( lr_button_choice ).

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

in CREATE OBJECT lr_choice the object id have to refer to name of node.

CREATE OBJECT lr_choice

EXPORTING

id = 'CHOICE'.