‎2007 Apr 11 5:28 PM
I'm using cl_alv_gui to produce ALV output. I have setup a hotspot, and two buttons to allow the user to drill into two other alv reports with data specific to the hotspot.
When you clik on the hotspot, then on the details button, the alv produces correct results. When you click back, and another hotspot, then the details button, the alv produces correct results.
With the other button, the first run produces correct results, but clicking back and choosing another hotspot and clicking the button produces the first results (for the wrong hotspot group).
I have identical code in the alv's:
call method go_custom_container->free
exceptions
cntl_error = 1
cntl_system_error = 2.
call method go_grid->free
exceptions
cntl_error = 1
cntl_system_error = 2.
create object go_custom_container exporting container_name = 'ALV_CONTAINER_HIST'.
create object go_grid exporting i_parent = go_custom_container.
Plus,when I look at the internal table to be displayed, it contains the correct data, but this is not the data displayed...
‎2007 Apr 11 6:23 PM
Where do you attach the data to be displayed? Are you using set_table_for_first_display() each times? Give more details please.
‎2007 Apr 11 6:45 PM
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
i_save = 'A'
i_default = 'X'
is_layout = ls_layout
CHANGING
it_outtab = t_hist_output
it_fieldcatalog = lt_fieldcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
Where t_hist_output contains the values I want displayed, but the grid always displays the first displayed entries.
‎2007 Apr 11 6:50 PM
Try to use refresh_table_display() after values have been changed in the internal table.
‎2007 Apr 12 3:32 PM
I tried the refresh_table_display and it didn't work.
Any other ideas?
‎2007 Apr 12 4:05 PM
Hi Michelle,
try this:
I always put an IF sentence, before to create object. I think, if you don´t do it, maybe cause of problem as you said...
IF go_custom_container IS INITIAL.
create object go_custom_container
exporting container_name = 'ALV_CONTAINER_HIST'.
... code ...
ENDIF.
Hope this help you.
‎2007 Apr 12 4:22 PM
I don't think this is the problem, because I am freeing both the container and the grid and recreating them before each display...
‎2007 May 09 5:02 PM
None of these solutions worked, but as soon as I changed the container name, all is well.