Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Completely unfocus ALV grid

Former Member
0 Kudos
171

Hi,

I have a screen with more than one ALV grid. Only one ALV grid is focused and as the user navigates through the screen, the next ALV  gridgets focused...
That all works fine. But the user is confused about the orange marked cell in both ALV grids - meaning even in the one not focused. See my screenshot below.

So I wonder: how I can completly unfocus an ALV grid? I don't want the cell in the second grid in the picture above to be orange. I don't want any kind of mark/selection.

The only thing I know is that if you press on the green "mark all" icon att the upper left corner of the ALV grid (above the mark row buttons), then everything will be marked/selected. If you press again to unmark everything, then there is no orange cell at all left. But what I need to do is to program that. Is it possible?

FYI: I tried methods such as "set_selected_cells" and passing an empty table. It didn't work.

Thanks & best regards,

Melanie

7 REPLIES 7

raymond_giuseppi
Active Contributor
0 Kudos
107

Did you try to set the focus to another element of the screen via a SET CURSOR statement or a CL_GUI_CONTROL=>SET_FOCUS method ?

Regards,
Raymond

0 Kudos
107

Hi and thanks for your interest,

I actually did try that. I use SET_FOCUS on the first ALV. But still the second ALV has that orange cell.
I also use SET CURSOR. It doesn't seem to affect the behaviour of the ALV grids.

Any other idea(s)?

Regards,
Melanie

0 Kudos
107

- You wrote you tried "SET_SELECTED_CELLS", did you also try "SET_SELECTED_COLUMNS" and "SET_SELECTED_ROWS" ?
- Has "REFRESH_TABLE_DISPLAY" with "soft" parameters any effect ?
- Did you execute a cl_gui_cfw=>flush at the end of your methods ?

Regards,
Raymond

0 Kudos
107

Hi again,

Yes I did pretty much try all SET_SELECTED* methods.
I am using REFRESH_TABLE_DISPLAY and it has no effect at all.
Yes, I am flushing as I should.

I guess it's not possible then... needs improvement in my opinion.

Thanks & regards,
Melanie

Former Member
0 Kudos
107

I assume this is not possible and thus set the question as answered.

Best regards,
Melanie

0 Kudos
107

Hi,

Did you try flush after set_focus?

    call method cl_gui_control=>set_focus

      exporting

        control = grid_1.

    call method cl_gui_cfw=>flush.

Best Reagrds,

Maria João Rocha

0 Kudos
107

Hi there,

Yes I focus and flush as I have written above. I'm not new to this.

This thread is no open question anymore. It's simply not possible as for now and that's alright. Please don't just guess things I might could try out - that wasn't the point. It was merely meant if someone has acutally done this.

/Melanie