Skip to Content
0
Jan 28, 2013 at 07:10 PM

GRID set focus (OO)

330 Views

Hi friends.

I'm working on ECC 6.0 EHP6. I created a report with a screen 0100, and put a custom container. So I created a ALV GRID (OO) on it type ref to cl_gui_alv_grid.

I was reading some old posts, but I think my case is a bit different.

When I run my transaction, always, the system focuses the option button bellow my grid. When I try to change the focused field with tab key (keyborad), the focus changes from some field to others, but never goes to my GRID.

I'm using an event on load grid, like bellow, after o_grid ->set_table_for_first_display:

ls_row = row_id.
ls_col = 'VBELN'.

CALL METHOD o_grid->set_current_cell_via_id
EXPORTING
is_row_id = ls_row
is_column_id = ls_col.

It works, but in a unexpected way, to me. It sets focus to the correct cell (inside the grid, it changes to yellow collor), but altogether, the system put focus in the next field on the screen, bellow the custom container.

I think there are two levels of focuses:

- One is the GRID itself,

- Other is on a screen field, when it has precedence comparing to the GRID. So the cursor goes to this next field.

Can anybody helpe me, folks ?

thanks.

Glauco