Skip to Content
avatar image
Former Member

remove yellow highlight in the 1st cell of ALV grid

Dear SAP friends,

I have a report program. The program displays the selected data in ALV grid.

I also added a custom button in the ALV grid toolbar. The purpose of the button is to "Show/hide legend'.

The legend info is displayed in the form of another ALV grid on the top of the screen.

ALV grid always has 1st cell yellow highlighted.

How I could remove the hightlight? I tried to set the focus off the grid. But the yellow highlight is not a focus.

Please help.

Thank you

Tatyana.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Aug 20, 2007 at 06:09 PM

    Hi,

    Try to call the following method with blank internal table

    
    Refresh : i_selected_rows.
    
    CALL METHOD g_grid_3000->get_selected_rows
    IMPORTING
    et_row_no = i__selected_rows.
    
    

    aRs

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      aRs,

      You probably mean SET_selected_rows.

      So I tried the method SET_SELECTED_ROWS and other methods of changing the selection.

      Like this:

      DATA:  i_selected_cells_ln TYPE LVC_s_CENO.
        DATA:  i_selected_cells_tb LIKE TABLE of i_selected_cells_ln.
      
        REFRESH i_selected_cells_tb.
      
        CALL METHOD o_grid_lgnd->get_selected_cells_id
          importing
            et_cells = i_selected_cells_tb.
      
        READ TABLE i_selected_cells_tb INTO i_selected_cells_ln INDEX 1.
            i_selected_cells_ln-row_Id = '0'.
            i_selected_cells_ln-col_id = '0'.
      
       MODIFY    i_selected_cells_tb FROM   i_selected_cells_ln INDEX 1.
      
      
        CALL METHOD o_grid_lgnd->set_selected_cells_id
          exporting
            it_cells = i_selected_cells_tb.

      The default selection after a table is loaded into a grid is:

      i_selected_cells_ln-row_Id = '1'.

      i_selected_cells_ln-col_id = '1'.

      This is what gives you the yellow highlight.

      So I tried to change:

      i_selected_cells_ln-row_Id = '0'.

      i_selected_cells_ln-col_id = '0'

      But the default selection is not getting changed.

      So the question is:

      How the default selection in ALV grid could be removed?

      Thanks,

      Tatyana

  • avatar image
    Former Member
    Aug 21, 2007 at 03:00 PM

    Hello,

    --> ALV grid always has 1st cell yellow highlighted.

    Yes and you can't change it. (had the same problem before and got and official answer from the GUI colleagues)...

    Regards,

    Walter

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 12:34 PM

    Walter,

    Thank you.

    Your answer will save my time trying to achieve not achievable.

    Tatyana

    Add comment
    10|10000 characters needed characters exceeded