Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with REFRESH ALV GRID

Former Member
0 Likes
1,008

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
657

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

2 REPLIES 2
Read only

Former Member
0 Likes
658

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

Read only

0 Likes
657

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?