2007 Sep 04 4:29 PM
Hi,
I am calling a zprogram with a screen from one of the user exits in vt02n. The screen contains 2 custom containers which will show one alv tree and another alv grid (cl_gui_alv_grid ). Once the screen is shown to the user, the user can close the screen and then the control comes back to the same vt02n. If the user trigger the screen again from vt02n, then the data shown in the alv controls are the same as what it showed the last time (it doesnt get refreshed). i tried freeing all the objects and refershing all the internal tables. even if the data in the internal tables are different, when the screen display comes the old values are shown. Has anyone faced this issue or please help if anyone knows the solution for this.
i tried using CL_GUI_CFW=>FLUSH , but it doesn help.
Regards,
Dinu.
Hi,
I am calling a zprogram with a screen from one of the user exits in vt02n. The screen contains 2 custom containers which will show one alv tree and another alv grid (cl_gui_alv_grid ). Once the screen is shown to the user, the user can close the screen and then the control comes back to the same vt02n. If the user trigger the screen again from vt02n, then the data shown in the alv controls are the same as what it showed the last time (it doesnt get refreshed). i tried freeing all the objects and refershing all the internal tables. even if the data in the internal tables are different, when the screen display comes the old values are shown. Has anyone faced this issue or please help if anyone knows the solution for this.
i tried using CL_GUI_CFW=>FLUSH , but it doesn help.
Regards,
Dinu.
2007 Sep 05 5:11 AM
Hi,
To refresh the front end ALV control with the latest data REFRESH_TABLE_DISPLAY is used. When the same ALV is called again with the changed data, then this method takes care of the display of the latest data present in the internal table. This is the internal table you would have used in the method SET_TABLE_FOR_FIRST_DISPLAY.
regards,
Sharat
2009 Jun 22 12:39 PM
would you please show us some sample code? I meet the same problem.
2009 Jun 22 2:08 PM
Hi,
Ensure free method is called only for alv:
DATA: r_cust_container TYPE REF TO cl_gui_custom_container,
r_alv TYPE REF TO cl_gui_alv_grid.
CALL SCREEN 0200. "assuming 0200 is the screen with ALV
MODULE pbo_0200 OUTPUT.
SET PF-STATUS ...
"custom container created only once
IF r_cust_container IS INITIAL.
CREATE OBJECT r_cust_container
EXPORTING
container_name = 'CUSTOM_AREA'. "custom control name on layout
ENDIF.
"but alv recreated each time
"free r_alv is not initial and clear reference variable
IF r_alv IS BOUND.
r_alv->free( ).
clear r_alv.
ENDIF.
"recreate ALV
CREATE OBJECT r_alv
EXPORTING
i_parent = r_cust_container.
CALL METHOD g_alv_grid_ref->set_table_for_first_display
...
Regards
Marcin
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |