10-09-2007 12:16 PM
Hello Everybody,
I have done my program in ALV Grid. I have a title in my layout and I have displayed sy-dbcnt in the title. The problem is I have a Refresh button on my grid and when I press the Refresh button the result will gets changed. Now I also need to get my grid title refreshed.
for example: initially I get 58 readings in the output the title shows me <b>'Records Found : 58'</b>.
later when I refresh the grid with refresh button my readings gets changed (like get reduced to 56). now my grid title is not getting refreshed so that I should get it as <b>'Records Found: 56'</b>.
can any body help me out in this case?
any doubts please ping me up....
Thanx in advance,
Abhi...!
10-09-2007 12:20 PM
Is your logic for Record calculation is in PBO or not?
Check in Debugging mode that wether the FM or Class whatever you are using for displaying total is called when you do refresh or not.
10-09-2007 12:58 PM
I have just given my code as follows:
DESCRIBE TABLE it_tab LINES li_lines.
WRITE li_lines TO ls_title LEFT-JUSTIFIED.
CONCATENATE 'RECORDS FOUND :' ls_title INTO ls_title SEPARATED BY space.
even when i perform refresh button I gave the same code there.
Regards,
abhi...!
10-09-2007 2:06 PM
Hi Abhilash,
Checkout this Blog
<b>TOP_OF_PAGE in ALV Using CL_GUI_ALV_GRID
/people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
Regards,
Aby
10-09-2007 1:16 PM
Hello Abhilash
Assuming that you are using class CL_GUI_ALV_GRID then you have to call method <b>go_grid->set_gridtitle</b>( 'new title' ) with the new title text.
Regards
Uwe
10-10-2007 5:57 AM
Set Table for first display
WRITE sy-datum TO lv_date DD/MM/YYYY.
WRITE sy-uzeit TO lv_time USING EDIT MASK '__:__:__'.
CONCATENATE 'Report' 'Date' lv_date text-005 'Time' INTO lv_text RESPECTING BLANKS.
<b> gs_layo-grid_title = lv_text.
gs_layo-smalltitle = gc_flag .</b>
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
is_variant = gs_variant
i_save = gc_save
i_default = abap_true
is_layout = gs_layo
CHANGING
it_outtab = gt_final[]
it_fieldcatalog = gt_fcat.
this way we can place grid title
To refresh it you need to call this again
Rewards if useful..............
Minal
10-10-2007 8:06 AM
Hi Abhilash,
Instead of writing the logic in refresh button just try triggering the top of page event of the class.
Raise event top_of_page.
Reward points if useful,
Aleem.