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

CL_GUI_ALV_GRID DATA_CHANGED event E_UCOMM

Hi,

At the ALV event handler DATA_CHANGED, I want to capture the user command on the screen other than the alv toolbar. But E_UCOMM holds nothing when I press a button on the screen. How can I capture screen function code?

Best regards,

ts

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2013 at 07:30 AM

    Hi,

    Have you declared function code in the PF-status of the screen.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2013 at 07:54 AM

    Hi,

    Below are the steps to achieve this functionality. you have to handle the event to catch the ucomm

    1. Register the event:

    *--for tab

    CALL METHOD go_alv->register_edit_event

    EXPORTING

    i_event_id = cl_gui_alv_grid=>mc_evt_modified.

    *-- for enter

    CALL METHOD go_alv->register_edit_event

    EXPORTING

    i_event_id = cl_gui_alv_grid=>mc_evt_enter.

    2. Get the changed row,with this below code your changed data row will be selected :


    CALL METHOD go_alv->check_changed_data.

    3. Handle the event:


    SET HANDLER go_respond_events->handle_data_changed_finish FOR go_alv.

    4. You have to create the class for this before. In this class you have to update that value:

    CLASS respond_events DEFINITION FINAL .

    PUBLIC SECTION .

    METHODS: handle_data_changed_finish FOR EVENT data_changed_finished

    OF cl_gui_alv_grid.

    ENDCLASS . "respond_events definition

    CLASS respond_events IMPLEMENTATION .

    METHOD handle_data_changed_finish.

    LOOP AT <your intarnal tablewhich used for display> INTO <ls_>.

    **jwrite your code here

    ENDLOOP.

    ENDMETHOD. "handle_data_changed

    ENDCLASS . "respond_events implementation

    Regards,

    Supratik

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2013 at 08:21 AM

    Thread closed.

    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.