add custom button to display with REUSE_ALV_GRID_DISPLAY

add custom button to display with REUSE_ALV_GRID_DISPLAY
4 (80%) 2 votes

If you want to add a new functionality to your ALV toolbar with a custom button , you can copy STANDARD_FULLSCREEN from SAPLSLVC_FULLSCREEN to your custom program and modify your standard pf-status. In order to activate your new pf-status , you can use i_callback_pf_status_set parameter of REUSE_ALV_GRID_DISPLAY.

Before setting pf_status, REUSE_ALV_GRID_DISPLAY takes a routine name(perform) from your program and dynamically calls it. You can also omit some of the functions code ,that you don’t want to display by ‘excluding’ addition of set pf-status.

Today i had to implement this information , but i had faced a problem. The problem was in spite of there are many buttons in standard pf-status, when i execute report i just can see some of them. And my custom button was one of these disappearing buttons.

After some research i understood that the reason is giving my new function code name starting with ‘&’ character like other function codes in SAP’s standard pf_status.

However i could not realize how REUSE_ALV_GRID_DISPLAY decide which function codes to be displayed and which ones to be hidden ,why it does not interfere with a function code( no hide) not starting with ‘&’. Please share , if you have any ideas.

You may also like

  • create variant for reuse alv reports and REUSE_ALV_VARIANT_F4 usage (0)
    For alv reports users can create alv variants and use them later. In order to achieve this alv variants can be supplied from selection-screen. Users can create and save their user-specific […]
  • export spool list with many pages in SM37 (0)
    When you call a list screen your report generates a downloadable report after execution. This report seems as a spool list if you run your program in background. There are two ways to […]
  • alv selection codes (0)
    It does not matter lvc or slis alv , you can use line selection codes to get the values of lines of a list. For ALV layout there is field 'SEL_MODE' that you can set the following values […]