cancel
Showing results for 
Search instead for 
Did you mean: 

SAP ALV Report issue: Standard Toolbar button is not working after adding Custom Buttons

arpita_churi3
Active Participant
0 Kudos

Hi All,

  We have developed custom report . we have created local class and methods to add custom toolbar buttons by using object of class cl_alv_grid_toolbar_manager and also hiding few standard toolbar buttons. and we are handling functionality of custom button by handle_user_command method of local class which is working fine.but standard button is  not working . 

Do we need to add standard button functionality also inside handle_user_command  method?

Thanks,

Arpita

 

Sandra_Rossi
Active Contributor
0 Kudos
"ALV OOPS" is not the recommended CL_SALV_TABLE class, your question is about CL_GUI_ALV_GRID.
Sandra_Rossi
Active Contributor
0 Kudos
You are not describing which kind of "toolbar" you are using, and you are not providing any code. Please clarify.

Accepted Solutions (1)

Accepted Solutions (1)

Junhwan_Jeong
Newcomer

Hi, I was struggling with the same problem and finally solved it. In my case, it happened because while the drop down list was displayed, the ALV was also refreshed.

Check if the same thing still happens with small amount of data and if not, try this step below.

  1. Check i_appl_events is needed when creating instance of cl_gui_alv_grid. if you set this parameter abap_true, it forces to call PBO, PAI after your action like click toolbar, right click etc.
  2. Call the refresh_table_display method only for the parts you need.

For example, my PBO was like below, so it called method refresh_table_display after every action.

 

IF grid IS INITIAL.
  " some code...
  grid = NEW cl_gui_alv_grid ( i_parent = something i_appl_events = abap_true ).
  grid->set_table_for_first_display ( something ).
  " some code...
ELSE.
  grid->refresh_table_display( something ).
ENDIF.

 

After moving the method refresh_table_display to PAI with proper conditions or removing the parameter i_appl_events (if not needed), I can see the drop down list with toolbar button. Hope this can help.

Anyway, I think it's some kind of bug with SAP GUI, because in Fiori or WEB GUI, it works fine.

Answers (0)