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: 

CL_GUI_ALV_GRID refresh problem

Former Member
0 Kudos

Hi all,

I've been checking all the post but now answer found for my problem.

I have an ALV OO and when I display the data all is correct. But, when I come back to the selection screen and I change the selection and execute, the old data still appears.

I free all the objects and refresh internal table with new data, but after execute CALL METHOD g_grid->set_table_for_first_display, the old data still is there.

Any clue?

Regards.

7 REPLIES 7

I355602
Advisor
Advisor
0 Kudos

Hi,

When initially you display the data using the OO ALV using method

CALL METHOD z_grid->set_table_for_first_display.

And while going back to the selection screen use code:-


CASE sy-ucomm.
  WHEN 'BACK'.
    LEAVE TO SCREEN 0.
ENDCASE.

When user clicks back button to return to selection screen, change the data for selection criteria and then execute, you would be displayed new data.

Its working fine in my case.

Hope this helps you.

Regards,

Tarun

rainer_hbenthal
Active Contributor
0 Kudos

Do you free the object reference variable? According to that, check that you set the correct life_time parameter when creating the object.

Former Member
0 Kudos

Hi,

Try freeing all your objects and clear your

internal tables work area in the PBO of your

Selection Screen that is in your

AT SELECTION SCREEN BEFORE OUTPUT Event.

Hope it helps

Regards

Mansi

Former Member
0 Kudos

call refresh table display

former_member383741
Participant
0 Kudos

Hi,

  • refresh the ALV Grid output from internal table "<--

l_selfield-refresh = 'X'. "<-- to refresh alv from internal table

hope it will help u......................

Regards,

k.karthikeyan

uwe_schieferstein
Active Contributor
0 Kudos

Hello Carlos

Something is "rotten" in your report. There is no need to free any objects when you go back to the selection-screen.

You may have a look at my sample report ZUS_SDN_TWO_ALV_GRIDS_2SCR in thread

Just add an additional selection parameter and change the following coding:


PARAMETERS:
  p_bukrs         TYPE bukrs       DEFAULT '1000'.

...
START-OF-SELECTION.
 
  SELECT        * FROM  knb1 INTO TABLE gt_outtab1
         " WHERE  bukrs  = '1000'.
         WHERE  bukrs = p_bukrs.
...

Then you simulate your situation.

Regards

Uwe

0 Kudos

Hi all,

thank you for all you answers.

In the report I have a AT SELECTION-SCREEN. instead of a START-OF-SELECTION.

Thats why the refresh is now working. I delete the AT SELECTION-SCREEN and now it's working fine.

But, I found a second error. Once I have the ALV(screen 100), I select one row and display it in a second ALV (screen 200). After that, I came back and select another row and display it. The first one is still appearing althought I refresh all the objects.

Last thing I have to try in Uwe thread.