Skip to Content
avatar image
Former Member

Refresh method in cl_salv_hierseq_table not working

Hi all,

I'm facing a problem with the refresh method of the class mentioned.

What I am trying to do is making a auto-refresh in the grid (using class cl_gui_timer). For that, I'm doing the following:

(this is all done in a local class)

At the START-OF-SELECTION I'm getting the data and creating the object for the TIMER.

Then, after END-OF-SELECTION, I have a form to display the grid. in this form I'm creating the bindings, the factory method, defining the event handlers and start the TIMER and display the grid itself.

In the event HANDLE_FINISHED is where i do the refresh. I defined 60 seconds for each refresh. In this event what i'm doing is getting the data again into the internal tables and then using these three lines of code:

"Refresh the Grid
gr_hierseq->refresh( refresh_mode = if_salv_c_refresh=>full ).
"Diplay Grid
gr_hierseq->display( ).
"Start Timer
go_timer->run( ).

The problem is that the program really gets to this code, the internal tables are modified and the call to the refresh method returns sy-subrc = 0, BUT the data on the grid stays the same, doesn't change at all.

One odd thing is that I have a button that i created that does the same as the "auto-refresh", and in this case the grid data appears changed.

Can anyone help me on this one ?

Than you,

Ricardo Monteiro

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 06 at 01:14 PM

    Hello Ricardo,

    I have done a simple exercise with your instructions and I have manage to solve it.

    It seems that the refresh is not enought and we need to force a dynpro event on top of it. (try to double click the table after the refresh is executed and you should see the modifications)

    Try the following after you call the refresh method of the SALV object:

        call function 'SAPGUI_SET_FUNCTIONCODE'
          exporting
            functioncode           = '=ENT'
          exceptions
            function_not_supported = 1
            others                 = 2.

    Hope it helps!

    KR

    Sérgio

    Add comment
    10|10000 characters needed characters exceeded