‎2008 Aug 07 6:14 AM
Hi all, I am displaying two grids on a single screen and the Grid2 will come to picture when i double click on the values in the Grid1 and will diplay corresponding values in Grid2 for GRID1. This is working fine for the first time and the values in Grid2 are not gettting refreshed for the second time i double click on the values in the Grid1.I am using method Grid2->refresh_table_display but this is giving me a dump. Please suggest me.
Thnaks in advance.
‎2008 Aug 07 6:19 AM
Hi Phani,
Hope you get the dump because you are not catching the EXCEPTIONS after refresh_table_display.
CALL METHOD o_alvgrid->set_table_for_first_display
EXPORTING
is_layout = wa_layout
CHANGING
it_outtab = it_final[]
it_fieldcatalog = it_fieldcat.
CALL METHOD o_alvgrid->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.Try to catch the EXCEPTION showing in the dump message.
TRY.
CATCH <exception>.
ENDTRY.Hope your problem will solved...
Best Regards,
Sayak...
‎2008 Aug 07 6:22 AM
Hi,
Use this statement when ever u want to refresh the grid.
CALL METHOD g_alv->refresh_table_display.
Hope it will help you.
‎2008 Aug 07 6:30 AM
hiii
refer to following link for code..
http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html
regards
twinkal