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

ALV Grid Refresh prpblem

Former Member
0 Likes
1,107

Hi all,

In custom infotype we had a requirement to have a alv. So we created a container and we are displaying alv.

The alv is working fine. But, when we go in display mode, it shows the same alv for all the records, say if there are 3 records in infotype and if we select 'Next' button, the alv is not refreshing the contents.

We tried all the possiblities like refresh_table_display, free the container, clearing the table, freeing the grid etc. But nothing is working.

Please let us know.

Thanks,

Hi all,

In custom infotype we had a requirement to have a alv. So we created a container and we are displaying alv.

The alv is working fine. But, when we go in display mode, it shows the same alv for all the records, say if there are 3 records in infotype and if we select 'Next' button, the alv is not refreshing the contents.

We tried all the possiblities like refresh_table_display, free the container, clearing the table, freeing the grid etc. But nothing is working.

Please let us know.

Thanks,

8 REPLIES 8
Read only

Former Member
0 Likes
1,072

hi....

Fill fieldcatlog at first time only....

Dont fill fieldcatlog for every record..........

regards

Prabhakar

Read only

0 Likes
1,072

Hi Prabhakar,

Thanks for the response. The field catalog is called only once in the pbo. Based on the sy-ucomm the ALV content internal table is filled and method set_table_for_first_display is called to get the new set of values.

But even though it is not refreshing with the new values.

Read only

Former Member
0 Likes
1,072

Hi,

Check with the fieldcatalog and also keep in mind that initial for the container and grid you have checked, it shoud not triiger everytime in a single execution.

I mean to say the container and grid should be popualted once only.

Thanks

Arbind

Read only

0 Likes
1,072

Thanks for the reply. So it means that the below coding should be executed only once.

So, it should be somewhere in the declaration or something?

Now this is in PBO and whenever the user clicks the Next button this will get executed. But at the end of PBO this container and ref_grid has been freed.

CREATE OBJECT container

EXPORTING

container_name = 'CONTAINER'. "name of container in module pool

CREATE OBJECT ref_grid

EXPORTING

i_parent = container.

Read only

0 Likes
1,072

Try call method cl_gui_cfw=>flush.

Read only

0 Likes
1,072

Hi,

Yes, you are correct.

write a logic check ref_grid is initial than load the conatiner again else bypass it and also checo when you are using set_table_display correct data has been there in the internal table.

May be it helps you.

Thanks

Arbind

Read only

0 Likes
1,072

Hi Arbind,

I am checking the same and also the contents in the internal table is correct. But still it is giving the old data.

Read only

0 Likes
1,072

Hi,

Whether your program is an interavtive report.

Have you debugged and try to find out where from the old data is getting displayed.