Application Development 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: 

refresh_table_display not working in oops alv

Former Member
0 Kudos

Hi experts,

I have one report which has got 2 alv grids in the output. The first alv grid(grid1) has hyperlinks on two fields( suppose f1 and f2 ). The second grid (grid2) is displayed when we click on the hyperlink of f1. And when we click on f2 hyperlink, it's displaying one more grid in a separate screen.

Issue I am facing here is that, By clicking on the f1 hyperlink the grid2 is displayed perfectly but when clicking the f2 hyperlink(which displays grid in a separate screen) and after coming back and again clicking on the f1 hyperlink the 2nd grid is not displaying correctly.

I am using the below code to refresh the grid2 but looks like I am missing something else also.

l_refresh-row = 'X'.

CALL METHOD grid2->refresh_table_display

       EXPORTING

         is_stable = l_refresh.

Could you please help me out!!!

1 ACCEPTED SOLUTION

rajeshkothamasu
Active Participant
0 Kudos

Hi,

Try with below coding.

Place this code in PBO.

call method g_grid->set_frontend_layout

      exporting

        is_layout = gs_layout.

call method g_grid->refresh_table_display.

OR

CALL METHOD

<ref.var. to CL_GUI_ALV_GRID>->refresh_table_display

EXPORTING
IS_STABLE = <structure of type LVC_S_STBL >
I_SOFT_REFRESH = <variable of type CHAR01 >.

call method cl_gui_cfw=>flush.

5 REPLIES 5

SimoneMilesi
Active Contributor
0 Kudos

Hello,

how do you fill internal table shown in grid2?

0 Kudos

It's picked from database based on the F1 field value selected.

0 Kudos

Then Rajesh it's correct, you are missing call method cl_gui_cfw=>flush.

rajeshkothamasu
Active Participant
0 Kudos

Hi,

Try with below coding.

Place this code in PBO.

call method g_grid->set_frontend_layout

      exporting

        is_layout = gs_layout.

call method g_grid->refresh_table_display.

OR

CALL METHOD

<ref.var. to CL_GUI_ALV_GRID>->refresh_table_display

EXPORTING
IS_STABLE = <structure of type LVC_S_STBL >
I_SOFT_REFRESH = <variable of type CHAR01 >.

call method cl_gui_cfw=>flush.

Former Member
0 Kudos

Thank you all for your reply. Issue has been resolved.