03-27-2009 11:30 AM
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.
03-27-2009 11:40 AM
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
03-27-2009 11:41 AM
Do you free the object reference variable? According to that, check that you set the correct life_time parameter when creating the object.
03-27-2009 11:42 AM
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
03-27-2009 11:51 AM
03-27-2009 12:22 PM
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
03-27-2009 12:34 PM
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
03-27-2009 1:35 PM
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.