Skip to Content

Set ALV cell, use of event DATA_CHANGED

Hi experts,

I want to set some ALV input fields using abap.

That's easy, I can modify the table as I need and call the refresh of the ALV table ( refresh_table_display).


But how can I "fill" the fields that the event DATA_CHANGED is called?

When I fill manually in ALV, this event is raised...I need the event also when filling with ABAP...

Thanks in advance

Michael

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 Jul 28, 2014 at 08:49 AM

    Hello Michael,

    This link shows you the right way to do:

    Get Changed Value In ALV Grid Dynamically - ABAP Development - SCN Wiki

    Inside HANDLE_DATA_CHANGED method, you can change the value of a cell in this way:

    CALL METHOD PR_DATA_CHANGED->MODIFY_CELL

    EXPORTING

    I_ROW_ID = IT_TABLE-ROW_ID

    I_FIELDNAME = 'FIELD'

    I_VALUE = IT_FLIGHT-FIELD.

    I hope you help.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 28, 2014 at 09:02 AM

    Hi Michael,

    Please find the link below to update the ALV Grid using REFRESH_TABLE_DISPLAY

    demo program to refresh alv grid(oops) - Code Gallery - SCN Wiki

    Regards

    Rajkumar Narasimman

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 29, 2014 at 08:31 AM

    I'm almost there now!

    First, I use method change_data_from_inside from cl_gui_alv_grid, exporting all the changed fields with tabix, value and fieldname.

    But now I have a problem - if I change a field of type MENG13 (QUAN, length 13), I got a dump

    ASSIGN_CASTING_ILLEGAL_CAST - CX_SY_ASSIGN_CAST_ILLEGAL_CAST

    in method GET_CHANGED_DATA:

    assign component is_style_cells-fieldname of structure

    <ls_comp1> to <ls_comp> casting type c.

    What I can do now?

    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.