Skip to Content
author's profile photo Former Member
Former Member

ALV Grid User Action

Hi Everybody,

I am using a Custom Container to load the ALV into it.

I have placed a custom button in the ALV status.

I want to capture the user action, how can we do that.

There are 2 in the Grid.Namely Sales Order and Material Number.

When I place the cursor on the Sales Order and click on the button it must display VA03

and do the same with the Material Number.

Can some tell me how to do that?

Please help.Its urgent.


Shashi Devi.

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 May 28, 2008 at 04:19 PM

    FORM handle_toolbar USING i_object TYPE REF TO cl_alv_event_toolbar_set .

    DATA: ls_toolbar TYPE stb_button.

    CLEAR ls_toolbar.

    MOVE 'EXCH' TO ls_toolbar-function. "#EC NOTEXT

    MOVE 2 TO ls_toolbar-butn_type.

    MOVE icon_calculation TO ls_toolbar-icon.

    MOVE 'Payment in Other Currencies'(202) TO ls_toolbar-quickinfo.

    MOVE ' ' TO ls_toolbar-text.

    MOVE ' ' TO ls_toolbar-disabled. "#EC NOTEXT

    APPEND ls_toolbar TO i_object->mt_toolbar.


    CLASS lcl_event_handler DEFINITION .



    *To add new functional buttons to the ALV toolbar

    handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid

    IMPORTING e_object e_interactive ,


    CLASS lcl_event_handler IMPLEMENTATION .

    *Handle Toolbar

    METHOD handle_toolbar.

    PERFORM handle_toolbar USING e_object e_interactive .



    DATA gr_event_handler TYPE REF TO lcl_event_handler .

    .. ..

    *--Creating an instance for the event handler

    CREATE OBJECT gr_event_handler .

    *--Registering handler methods to handle ALV Grid events

    SET HANDLER gr_event_handler->handle_toolbar FOR gr_alvgrid .

    Reward if find useful

    Add a comment
    10|10000 characters needed characters exceeded

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.