Skip to Content
avatar image
Former Member

refresh grid title

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...!

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Oct 09, 2007 at 11:20 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Oct 09, 2007 at 12: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 10, 2007 at 04: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 10, 2007 at 07: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.

    Add comment
    10|10000 characters needed characters exceeded