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

REFRESH ALV Grid on Refresh.

Former Member
0 Likes
2,060

hi guys,

can neone tell me that how to modify a internal table which is passed to a ALV GRID output....i have added a refresh button on the grid.now my grid has to be refreshed when i press the refresh button ..n whatsoever changes has been made in the main table from where i am getting the data in my internal table that changes has to be seen in my grid.

have heard of some parameter in alv grid display function module which refreshes the internal table.

Hi,

If you are using OOPs ALV, use:

CALL METHOD wcl_alv_grid->refresh_table_display

EXPORTING

is_stable = wa_stable

EXCEPTIONS

finished = 1

OTHERS = 2.

Regards,

Subramanian

3 REPLIES 3
Read only

Former Member
0 Likes
847

Hi,

If you are using OOPs ALV, use:

CALL METHOD wcl_alv_grid->refresh_table_display

EXPORTING

is_stable = wa_stable

EXCEPTIONS

finished = 1

OTHERS = 2.

Regards,

Subramanian

Read only

JoffyJohn
Active Contributor
0 Likes
847

IF sy-ucomm = 'REFR'. " for refreshing

REFRESH gt_fieldcat[].

CLEAR gs_layout.

CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'

IMPORTING

es_layout = gs_layout

et_fieldcat = gt_fieldcat[]

et_sort = gt_sort[]

et_filter = gt_filter[]

  • ES_GRID_SCROLL =

es_variant = gs_variant

  • ET_MARKED_COLUMNS =

  • ET_FILTERED_ENTRIES =

  • ET_FIELDCAT_BACKEND =

  • ES_PRINT =

  • EXCEPTIONS

  • NO_INFOS = 1

  • PROGRAM_ERROR = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

PERFORM all_tasks.

In this perform form you have to refresh the internal tables and select the data again

and call function CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' for displaying the alv gird

Read only

Former Member