2011 Feb 22 9:54 AM
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,
2011 Feb 22 10:05 AM
hi....
Fill fieldcatlog at first time only....
Dont fill fieldcatlog for every record..........
regards
Prabhakar
2011 Feb 22 10:28 AM
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.
2011 Feb 22 10:29 AM
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
2011 Feb 22 10:38 AM
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.
2011 Feb 22 10:38 AM
2011 Feb 22 10:58 AM
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
2011 Feb 22 11:19 AM
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.
2011 Feb 22 11:36 AM
Hi,
Whether your program is an interavtive report.
Have you debugged and try to find out where from the old data is getting displayed.