Skip to Content
avatar image
Former Member

how to change the text of a button in ALV dynamically?

Hi Gurus,

I have a ALV with a button in the toolbar.Basically i have to change the button text each time the button is pressed.

How can i do this?

PS:points will be awarded

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Sep 26, 2007 at 07:33 AM

    On your alv model, first call if_salv_wd_function_settings~get_function( ID = <your ID> ). This will return you a reference of cl_salv_wd_function. If your function uses a button editor, do the following:


    lr_button type ref to CL_SALV_WD_FE_BUTTON,

    lr_function type ref to cl_salv_wd_function.

    lr_function = l_alv_model->if_salv_wd_function_settings~get_function( ID = <your ID> ).

    lr_button ?= lr_function->get_editor( ).

    lr_button->set_text( ).

    I have not tried this, but it should work.



    Add comment
    10|10000 characters needed characters exceeded

    • Here I'd means function I'd for each ui element in alvtoolbar. Using salv_wd_function wecan place custom buttons or any ui elements in alv toolbar . Export button is standard button , for that am not surehow to change that text. But above procedure is for custom alv tool bar functionalities