Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

refresh alvgrid when using double click event

Former Member
0 Likes
515

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.

3 REPLIES 3
Read only

RoySayak
Active Participant
0 Likes
491

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...

Read only

Former Member
0 Likes
491

Hi,

Use this statement when ever u want to refresh the grid.

CALL METHOD g_alv->refresh_table_display.

Hope it will help you.

Read only

Former Member
0 Likes
491

hiii

refer to following link for code..

http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html

regards

twinkal