‎2006 Jun 13 7:52 AM
HI,
I am displaying my ALV grid in subscreen,i am using CALL METHOD g_alv_grid->set_table_for_first_display,it is working fine for first time but when user is changing input in first subscreen ,and click push button to call ALV grid in 2nd subscreen it is displaying previous records.how to clear the container ,I tried CALL METHOD g_alv_grid->refresh_table_display.but no result,
‎2006 Jun 13 8:20 AM
In the End-of-selection event, use:
CALL METHOD g_alv_grid->free.
CLEAR g_alv_grid.
This should clear the contents of the ALV.
Reward Points, if ur query is resolved.
Rgds
Subbu
‎2006 Jun 13 9:10 AM
i think you have to clear the instance of class CL_GUI_CUSTOM_CONTAINER.
call method FREE of CL_GUI_CUSTOM_CONTAINER.
Message was edited by: Sharath kumar R
‎2006 Jun 13 9:20 AM
Hi,
that means the problem is not with the REFRESH. since you are editing the grid the values are not updated to frontend. did you call this method in the PAI of the screen if not call this and try.
MODULE PAI INPUT.
CALL METHOD G_GRID->CHECK_CHANGED_DATA
IMPORTING
E_VALID = L_VALID.
CALL METHOD CL_GUI_CFW=>FLUSH.
CALL METHOD CL_GUI_CFW=>DISPATCH.
okcode hadnlings here...
.....
....
...
CALL METHOD G_GRID->REFRESH_TABLE_DISPLAY
EXCEPTIONS
FINISHED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. "pai INPUT Regards
vijay
‎2006 Jun 13 9:28 AM
Hi vinod,
after this method
CALL METHOD g_alv_grid->set_table_for_first_display
just write this
CALL METHOD g_alv_grid->refresh_table_display.
For more clarifications chk program BCALV_GRID_07 , line no 312