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

OO ALV: GET_SELECTED_ROWS is inconsistent.

Hi experts,

I'm using the method get_selected_rows for my OO ALV.

It's under the user command module.

I don't know why but sometimes it populates the return table but sometimes it doesn't.

Any ideas what could be causing this?

Really appreciate your inputs.

Thanks

Chris

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Dec 10, 2010 at 09:24 AM

    Hi,

    Can you pleaase paste your code.

    With Regards,

    Sumodh.P

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi all,

      I call back this old thread, because I tried every suggestion in this, but nothing helps.

      I created 2 Dynpros. The first gives an overview, the second shows the details. If I select one or more rows after first display of the overview everything is fine. But if I go back from the detail screen to the overview screen and select any other row, method doesn`t recognize it.

      r_cont type ref to cl_gui_custom_container,

      r_alv type ref to cl_salv_table,

      .....

      r_select TYPE REF TO cl_salv_selections,

      ....

      it_getsel TYPE salv_t_row

      WHEN 'GET_DETAIL'.

      LEAVE TO LIST-PROCESSING.

      r_alv->get_metadata( ).

      it_getsel = r_select->get_selected_rows( ).

      CLEAR: r_alv, r_cont.

      CALL SCREEN 0101.

      Anyone - who knows a solution?

      Cheers

      DieterA

  • Posted on Dec 10, 2010 at 08:48 AM

    Try to use method refresh_table_display after your get_selected_rows..

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 10, 2010 at 08:44 AM

    This happens because you are not clearing the custom container.

    Do you have this check??

      if g_custom_container is initial.  
       ----------
      endif.
    

    Check the same, if the check is not there, then set it up, then the method will always return values.

    BR

    Mishra..

    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.