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

refresh data in alv automaticly

former_member353207
Participant
0 Likes
1,382

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

1 ACCEPTED SOLUTION
Read only

eyal_alsheikh
Active Participant
0 Likes
1,254

Hi,

I think you can use class CL_GUI_TIMER to implement

timer in your program.

Eyal.

13 REPLIES 13
Read only

eyal_alsheikh
Active Participant
0 Likes
1,255

Hi,

I think you can use class CL_GUI_TIMER to implement

timer in your program.

Eyal.

Read only

FredericGirod
Active Contributor
0 Likes
1,254

Hi Joerg,

look at : /people/rich.heilman2/blog/2005/10/18/a-look-at-clguitimer-in-46c

Regards

Frédéric

Read only

0 Likes
1,254

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

Read only

0 Likes
1,254

Hi

Can you paste your code.

so that I can see and let you know.

Regards

vijay

Read only

0 Likes
1,254

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.

Read only

0 Likes
1,254

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

Read only

Former Member
0 Likes
1,254

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

Read only

0 Likes
1,254

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

Read only

0 Likes
1,254

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

Read only

0 Likes
1,254

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

Read only

0 Likes
1,254

Joerg,

Let me know if u require more help.

Thanks

Kam

Read only

Former Member
0 Likes
1,254

hi you can do that by...RFC_PING_AND_WAIT

Message was edited by: Anid

Read only

abdul_hakim
Active Contributor
0 Likes
1,254

Hi

use REFRESH_TABLE_DISPLAY.

Check the below program also..

BCALV_GRID_02

Abdul