‎2008 Apr 08 9:58 AM
Hi all,
I have a problem with refreshing ALV.
For ALV functions, I use function modules, not class/methods.
I did create EVENT_EXIT
ls_event_exit-ucomm = 'UPD'.
ls_event_exit-after = 'X'.
append ls_event_exit to t_event_exit.
I also attach this table as parameter in fm REUSE_ALV_GRID_DISPLAY
In user-command:
form user_command using ucomm type sy-ucomm
selfield type slis_selfield.
*-- double-click on item will go to MM02
case ucomm.
when '&IC1'.
*-- set values for ID 'MAT'
call transaction 'MM02' and skip first screen.
perform refresh_record.
endcase.
SET USER-COMMAND 'UPD'.
selfield-refresh = 'X'.
endform.
The problem is refreshing ALV does NOT work. However, when I run the report in debug mode, it works. I can see new values in ALV list after debugging.
Do you have any ideas to overcome this problem?
Thanks in advance.
‎2008 Apr 08 10:29 AM
Hi,
In ALV, to refresh the table you have to call the method "refresh_table_display".
It has the syntax very similar to creating the table.
It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed)
or
if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).
the synatx is :-
call method grid (name of grid )->refresh_table_display
exporting
IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)
I_SOFT_REFRESH = <VARIABLE OF CHAR 01> (THIS IS FOR ICON REFRESHING).
Reward if helpful
Jagadish
‎2008 Apr 08 10:29 AM
Hi,
In ALV, to refresh the table you have to call the method "refresh_table_display".
It has the syntax very similar to creating the table.
It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed)
or
if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).
the synatx is :-
call method grid (name of grid )->refresh_table_display
exporting
IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)
I_SOFT_REFRESH = <VARIABLE OF CHAR 01> (THIS IS FOR ICON REFRESHING).
Reward if helpful
Jagadish
‎2008 Apr 08 11:56 AM
Hi Jagadish,
Thanks for your answer. Actually, I don't want to use methods for ALV.
Moreover, when I set
selfield-refresh = 'X'.
It will call method refresh_table_display so we don't need to call it in our report.
Do you have any suggestion?