Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on 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:

    data:

    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.

    Regards

    Nithya

    Add a 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.