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

issue with refresh button-alv

Former Member
0 Likes
849

hello there,

i have a refresh button on my alv grid.when it clicked the report should be updated.Now the problem is , its not working for the first time but its working for the second time.I mean data is updating when we press the refresh button for the second time.

In the debugging its going through the same process both the times I cant figure out where its going wrong.

My code is like this

for that bit

FORM pf_status_set USING ut_extab TYPE slis_t_extab. "#EC CALLED

DATA:us_selfield TYPE slis_selfield.

DELETE ut_extab WHERE fcode = gc_refresh.

SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'

EXCLUDING ut_extab.

**click on refresh

IF sy-ucomm = gc_refresh.

REFRESH: gt_output,

gt_bin_output,

gt_fcat,

gt_event_exit,

gt_totals.

CLEAR: gs_output,

gs_bin_output,

gs_fcat,

gs_event_exit,

gs_totals.

PERFORM get_report. " Refresh data

ENDIF.

plz advise...

Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
719

Hi

Why are u managing the refresh button in the form to set the status?

Max

Read only

Former Member
0 Likes
719

I have no idea why u r using the refresh button seperately, but sal alv provide the provision of automatic refresh when using an user command, just need to set the paramater refresh = 'X'.

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

refresh : (exporting) list is to be refreshed

Read only

Former Member
0 Likes
719

Hi,

Use this method : REFRESH_TABLE_DISPLAY from Class : CL_GUI_ALV_GRID.

If need more details let me know.

Regards,

Venu Madhav

Read only

Former Member
0 Likes
719

Thanks Guyz.