Application Development 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: 

Want to add custom buttom in ALV tool bar

Former Member
0 Kudos

HI

I want to add a custom buttom in a ALV tool bar. This ALV is displayed using REUSE_ALV_GRID_DISPLAY. and how to handle that button.

pls provide some code.

4 REPLIES 4

former_member181962
Active Contributor
0 Kudos
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
    I_CALLBACK_PROGRAM                = W_REPID
    I_CALLBACK_PF_STATUS_SET          = 'PF_STATUS'
    I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'

.
.
..
* Create and modify a new status which is a copy of a standard pf status.
FORM PF_STATUS
USING P_EXTAB TYPE SLIS_T_EXTAB.                            "#EC CALLED
  SET PF-STATUS 'STAT1' EXCLUDING P_EXTAB.
ENDFORM.    

FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
                        P_SELFLD TYPE SLIS_SELFIELD.
*handle your button here.
case p_ucomm.
endcase.
 
ENDFORM.

0 Kudos

Boss

I am unable to understand pls tell some thing more.

Former Member
0 Kudos

Hi there. You need to include the button in the code of your GUI status. Go to SE80 and enter your program name. Now select your GUI status from the lower left window and double-click. Now select "Application Toolbar" from the right window and click on the '+' to expand. Now enter the function code for your button in one of the spaces of that row. I hope this helps.

- April King

abdul_hakim
Active Contributor
0 Kudos

Hi,

Have a look at the sample program BCALV_GRID_05

Cheers,

Hakim