problem about OO ALV(CL_GUI_ALV_GRID) refresh
Hi, everyone, I run into a problem about dynamic ALV as follows:
two alv grids (instances of CL_GUI_ALV_GRID, say 'grid1' 'grid2') displayed each into two spliter containers.
the columns of grid2 are dynamic (the output data internal table is field symbol - call method grid2->set_table_for_first_display ... CHANGE IT_OUTTAB = <GT_TABLE>...).
one custom application button (say 'MYBTN') is added to the second grid.
one column (say 'COL2' ) of grid2 is editable. when 'MYBTN' is pressed, another column (say 'COL1') of grid2 is copyed to 'COL2' and display alv again.
in the USER_COMMAND event, the values of 'COL2' of internal table '<GT_TABLE>' have been changed (values are same as 'COL1') already, 'grid2->REFRESH_TABLE_DISPLAY' and ' CALL METHOD CL_GUI_CFW=>FLUSH' are called at the end of USER_COMMAND, too. but the display of 'COL2' is not updated.
Pls help, your effort will be appreciated and thanks in advance !
Rajvansh Ravi replied
At what position have you placed grid2->REFRESH_TABLE_DISPLAY ? In PBO or after the Event where you modify the table ?
I usually put my code in PBO and have not faced any issues with refresh..
I dont have access to system so cannot confirm if that is the issue. Check the code snippet below
module pbo_0101 output. if custom_container is initial. *--> Code for custom container... call method grid->set_table_for_first_display.... ELSE. call method grid->refresh_table_display. endmodule.