10-04-2010 2:55 AM
Dear experts,
I'm using CALL METHOD ob_grid1->set_table_for_first_display, during the first run the display is ok.
When I back to screen 0 and enter different values and re-run, the values of internal table has been changed.
But the second run still display the values I have during the first run. What could be the reason for this and how to solve this? Thanks.
IF ob_custom1 IS INITIAL.
CREATE OBJECT ob_custom1
EXPORTING
container_name = 'ALV_CONTAINER'.
ENDIF.
IF ob_split1 IS INITIAL.
CREATE OBJECT ob_split1
EXPORTING
parent = ob_custom1
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
ENDIF.
IF ob_grid1 IS INITIAL.
CREATE OBJECT ob_grid1
EXPORTING
i_parent = ob_split1->top_left_container.
PERFORM build_fieldcatalog.
gs_layout1-info_fname = 'ROWCOLOR'.
gs_layout1-smalltitle = 'X'.
CALL METHOD ob_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'T_REPORT'
is_layout = gs_layout1
CHANGING
it_outtab = T_REPORT
it_fieldcatalog = alv_fcat_dock1.
ENDIF.
Kath
10-04-2010 7:22 AM
hi,
did you call the method REFRESH_TABLE_DISPLAY.
after set_table_for_first display.
regards,
Sakshi jain
10-11-2010 9:29 AM
On back action, you free the control objects., then only IF ob_custom1 IS INITIAL. checks will work
10-11-2010 9:34 AM
Hi,
Please add the code after else statement.
IF ob_grid1 IS INITIAL.
CREATE OBJECT ob_grid1
EXPORTING
i_parent = ob_split1->top_left_container.
PERFORM build_fieldcatalog.
gs_layout1-info_fname = 'ROWCOLOR'.
gs_layout1-smalltitle = 'X'.
CALL METHOD ob_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'T_REPORT'
is_layout = gs_layout1
CHANGING
it_outtab = T_REPORT
it_fieldcatalog = alv_fcat_dock1.
ELSE. " Add
Call method refersh table for display. " Add
ENDIF.