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

Regarding Refresh button in alv grid toolbar

Former Member
0 Likes
1,571

Hi guys,

I am using REUSE_ALV_GRID_DISPLAY to display some editable fields.

In the standard ALV tool bar, I am getting refresh button displayed.

I am using USER_Command routine to get the event for save and refresh.

I am able get the save event, however my program not triggering the REFRESH event.

Please suggest,

Regards,

Raj.

Hi guys,

I am using REUSE_ALV_GRID_DISPLAY to display some editable fields.

In the standard ALV tool bar, I am getting refresh button displayed.

I am using USER_Command routine to get the event for save and refresh.

I am able get the save event, however my program not triggering the REFRESH event.

Please suggest,

Regards,

Raj.

2 REPLIES 2
Read only

Former Member
0 Likes
1,090

Hello,

Please use the code in the user command perform.

*&---------------------------------------------------------------------*

*&      Form  USER_COMMAND

*&---------------------------------------------------------------------*

FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD.

  IF R_UCOMM = 'REFRESH'."Create one button on ALV toolbar with function code REFRESH

    RS_SELFIELD-REFRESH = 'X'. "Set this one. It refreshes internal table data with new values

  ENDIF.

ENDFORM.                    "USER_COMMAND

Read only

schneidertho
Product and Topic Expert
Product and Topic Expert
0 Likes
1,090

Hi Raj,

you can create a button as suggested by Srinivas. But it should also work with the standard button.

I had no time to test it in detail.

But you can try: pass the parameter IT_EVENT_EXIT to REUSE_ALV_GRID_DISPLAY. In IT_EVENT_EXIT set UCOMM = '&REFRESH' and AFTER = 'X'. Then the USER_COMMAND routine should be called after the standard ALV coding has processed the refresh event.

Best regards

Thorsten