2005 Nov 23 8:49 AM
Hi,
I've an alv with a Z-Table. Data changes currently. I want the alv refreshing automaticly by every data-change (made by another program). I don't want to push a key.
a timer would be a solution, bu only the second-best.
Any ideas ?
Regards Joerg
2005 Nov 23 9:08 AM
Hi,
I think you can use class CL_GUI_TIMER to implement
timer in your program.
Eyal.
2005 Nov 23 9:08 AM
Hi,
I think you can use class CL_GUI_TIMER to implement
timer in your program.
Eyal.
2005 Nov 23 9:12 AM
Hi Joerg,
look at : /people/rich.heilman2/blog/2005/10/18/a-look-at-clguitimer-in-46c
Regards
Frédéric
2005 Nov 23 10:05 AM
Thanks all,
this works well with timer solution. good but not perfect.
Any ideas how to register an event on my z-table for every data-change an send it to my program ?
Joerg
2005 Nov 23 10:25 AM
Hi
Can you paste your code.
so that I can see and let you know.
Regards
vijay
2005 Nov 23 10:27 AM
In technical setting (SE11), you have an option: Log data change.
Maybe read the documentation.
But I'm not sure you could have an event, you could only create a log, and check in the log if something append to the table.
2005 Nov 23 10:27 AM
Joerg,
Try using the Method '<b>REFRESH_TABLE_DISPLAY</b>' present in the class 'CL_GUI_ALV_GRID'.
I hope this method would help.
Thanks
Kam
2005 Nov 23 9:18 AM
Hi
when ever there is a data change for refresh
you need to register an event
CALL METHOD G_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
then in that event You call method refresh
this will automatically refreshes.
regards
vijay
2005 Nov 23 10:48 AM
Vijay,
this is only 'normal' alv-code in PBO of dynpro '100':
DATA: ok_code LIKE sy-ucomm,
gt_meld TYPE TABLE OF zmeldung,
g_container TYPE scrfname VALUE 'ALV1',
grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container.
...
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
CREATE OBJECT grid1
EXPORTING i_parent = g_custom_container.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'ZMELDUNG'
CHANGING
it_outtab = gt_meld.
ENDIF.
....
Joerg
2005 Nov 23 10:54 AM
Joerg,
Modify the code as follows:
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
CREATE OBJECT grid1
EXPORTING i_parent = g_custom_container.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'ZMELDUNG'
CHANGING
it_outtab = gt_meld.
<b>ELSE.
CALL METHOD GRID1->REFRESH_TABLE_DISPLAY.</b>
ENDIF.
Thanks,
Kam
2005 Nov 23 3:00 PM
Kam,
thanks, good idea. But it only works on new cycle PBO.
Maybe I try this in combination with Cl_Gui_Timer Class.
(Link posted from Frédéric)
Joerg
2005 Nov 23 3:02 PM
2005 Nov 23 9:19 AM
hi you can do that by...RFC_PING_AND_WAIT
Message was edited by: Anid
2005 Nov 23 10:57 AM
Hi
use REFRESH_TABLE_DISPLAY.
Check the below program also..
BCALV_GRID_02
Abdul