Skip to Content
avatar image
Former Member

Refresh ALV Grid after execution of secondary screen

Hi,

I have report which is giving me ALV grid output and on application toolbar of this ALV output I have push button which is leading me to another screen for any messages.

Now, when I am coming back from second screen to ALV, I want ALV data to be refreshed or fetched again. Please let me know how I can do this?

I am not using any custom screen for this but below is code snippet. Below code is leading to secondary screen and i want to refresh the ALV when I get back to the first screen of ALV. I put the code in PERFORM GET_DATA after LEAVE SCREEN to refresh ALV but it is not working. Any leads will be appreciated.

LEAVE TO LIST-PROCESSING.

SET PF-STATUS 'STLI' OF PROGRAM 'SAPMSSY0' IMMEDIATELY.

Write statement for the message on next screen.

LEAVE SCREEN.

PERFORM GET_DATA.

Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 16, 2017 at 07:41 AM

    Which ALV technology are you using?

    As you are using PERFORM, I guess that you are using the old interface, either REUSE_ALV_LIST_DISPLAY or REUSE_ALV_GRID_DISPLAY function module.

    If that's right, then you handled your custom button via a subroutine with this interface:

    FORM user_command
      USING
      R_UCOMM  LIKE SY-UCOMM
      RS_SELFIELD TYPE SLIS_SELFIELD.
    ...
    ENDFORM.

    After you have displayed/terminated the detail screen, you need to set RS_SELFIELD-REFRESH = 'X' if you want the ALV to be automatically refreshed.

    Add comment
    10|10000 characters needed characters exceeded