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

CL_GUI_ALV_GRID refresh problem

Former Member
0 Likes
2,098

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
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,127

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

Read only

rainer_hbenthal
Active Contributor
0 Likes
1,127

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

Read only

Former Member
0 Likes
1,127

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

Read only

Former Member
0 Likes
1,127

call refresh table display

Read only

Former Member
0 Likes
1,127

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

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,127

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

Read only

0 Likes
1,127

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.