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

ALV Grid: method double_click provides wrong information with 'totals line'

Hi together,

I´m using 'method double_click' with an ALV grid...like:

CLASS lcl_events IMPLEMENTATION.

METHOD double_click.

READ TABLE it_outtab INDEX e_row-index INTO s_datatab.

...

Everything works perfect as long as I don´t use totals with it.

Using totals /subtotals lines 'READ TABLE...' provides a wrong row-index.

Any idea how to resolve this problem?

Thanks for any help

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jul 07, 2010 at 03:18 PM

    Also check the field e_row-rowtype.

    if e_row-rowtype+0(1) ne 'S' and e_row-rowtype+0(1) ne 'T'.  "Then let execute your code.
    READ TABLE it_outtab INDEX e_row-index INTO s_datatab.
    ...
    endif.
    

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 07, 2010 at 04:37 PM

    Hi, this is a big problem when you use OO to build an ALV, to resolve your problem, you have to implement an event TOOLBAR_BUTTON_CLICK to get button function, when your code pass by this method you have to use the method

    CALL METHOD gcl_grid->set_function_code
        CHANGING
            c_ucomm = l_ucomm.

    l_ucomm is the function code of button, the method set_function_code sort your internal table dynamically and you get the correct index when you use double_click.

    Regards.

    David Carballido

    PD: Sry for my bad english ^^

    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.