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

Not able to get which row is edited in alv grid

Hi,

I have created a Editable alv grid .

My grid does not contain line selection cloumn so How can I get to know which row is to be changed.

I am using get_selected_rows method but not able to get which row is changed. please help on this.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Oct 07, 2010 at 08:03 AM

    If you use class CL_GUI_ALV_GRID you can get information about the changed cells in the event "DATA_CHANGED".

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 07:42 AM

    Hi,

    check this ..

    it_ekko1[] = it_ekko[].

    call function 'REUSE_ALV_GRID_DISPLAY'

    exporting

    i_callback_program = gd_repid

    i_callback_user_command = 'USER_COMMAND'

    is_layout = gd_layout

    it_fieldcat = fieldcatalog[]

    it_events = i_events

    i_save = 'X'

    tables

    t_outtab = it_ekko

    exceptions

    program_error = 1

    others = 2.

    In user command you need to write logic to know which all records have changed.

    FORM user_command USING r_ucomm LIKE sy-ucomm

    rs_selfield TYPE slis_selfield.

    CASE r_ucomm.

    WHEN '&IC1'.

    loop at it_ekko into wa_ekko.

    read table it_ekko1 into wa_ekko1 index sy-tabix.

    if wa_ekko <> wa_ekko1.

    • write your logic further

    endif.

    endloop.

    endcase.

    Regards,

    Srini.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 09:43 AM

    Hi Suchender,

    there is a command which will do GET_CURSOR, which will give you the cursor position.

    and one function module somethinhg like GETCURSOR*.

    check if its work ?

    Thanks,

    Vinayaka

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 11:26 AM

    Thanks for answers.

    Solved by get_selected_rows itself.

    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.