2008 Jul 24 10:22 AM
Hello experts,
i´ve a problem with an ALV.
The situation is:
I read some data from DB, pack them into an internal table call another dynpro and load them into the grid.
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
is_variant = gs_layout
i_save = x_save
i_default = 'X'
it_toolbar_excluding = pt_exclude
CHANGING
it_outtab = it_vbeln[]
it_fieldcatalog = z_fieldcat.
The first call everything is okay. This time it_vbeln has one entry with 800000046.
But if i navigate back to the first screen and read other data put them into the table and call next window again.
Here i set a break point before calling:
CALL METHOD go_grid->set_table_for_first_display
This time it_vbeln has one entry with 800000042. Okay so far this is the new data.
After this call there is no additional code. The next thing is that the ALV appears on the screen.
BUT: With the entry 800000046!!!
If i make a refresh via the toolbar Button "Refresh"
The entry changes to 800000042.
Can someone tell me my fault?
Thank you
Points guaranted
2008 Jul 24 11:46 AM
Hi, you should add following code into your program.
if gr_container is initial.
u2026u2026
call method go_grid->set_table_for_first_display
u2026u2026
else.
call method go_grid->refresh_table_display
exceptions
finished = 1
others = 2.
endif.
2008 Jul 24 11:59 AM
Hi,
You have to write
grid1->refresh_table_diplay.
Aftr writing This I think it will work and also refer the program bcalv_grid_02.
Thanks
Ansuman
2008 Jul 24 12:19 PM
Hello,
if i use CALL METHOD go_grid->refresh_table_display in PAI before "leave Program" i get the following dump.
OBJECTS_OBJREF_NOT_ASSIGNED CX_SY_REF_IS_INITIAL
2008 Jul 24 2:09 PM
Hello,
i solved the problem by calling the methods:
alv=>free
container=>free