12-31-2016 9:00 AM
Hello
I have to create a context menu on a cell in ALV. I use CL_SALV_TABLE.
On right mouse click, there is a standard context menu, but I need my own functions in this context menu.
Is this possible? I've searched a long time in the community, but I can't find the solution.
Many thanks in advance
Daniel
12-31-2016 8:32 PM
This is not possible natively in SALV, but you may retrieve the CL_GUI_ALV_GRID instance, and operate on it. For instance, see SCN blog posts Power of ABAP Objects: Overcome the Restrictions of SALV Model, by Naimesh Patel, on 2008/11/24, and SALV and PEPPER : Editing individual columns in the SALV, by Paul Hardy, on 2015/08/07.
12-31-2016 8:32 PM
This is not possible natively in SALV, but you may retrieve the CL_GUI_ALV_GRID instance, and operate on it. For instance, see SCN blog posts Power of ABAP Objects: Overcome the Restrictions of SALV Model, by Naimesh Patel, on 2008/11/24, and SALV and PEPPER : Editing individual columns in the SALV, by Paul Hardy, on 2015/08/07.
01-03-2017 4:31 PM
Hello Sandra
Thanks for the interesting links, but I can't see, how I can solve my problem? Or is my thinking to short?
Thanks Daniel
01-04-2017 12:08 PM
SALV is based on CL_GUI_ALV_GRID. The context menu is available in CL_GUI_ALV_GRID, but it's not exposed by SALV. There are the same limitations for making an ALV editable, drop down cells, scroll to a given row, ...
The two blog posts are about making an ALV editable, but you can just adapt their code to make available the context menu + have a look at the demo program BCALV_GRID_06 for the context menu.
01-03-2017 4:59 PM
Hi,
Check this link
https://archive.sap.com/discussions/thread/3513260
By context menu you mean F4?
You have some methods in column class, you can check if u have what you want..
For example: column->has_f4( abap_true ).
Best Regards,
Filipe Sardinha
01-04-2017 8:44 AM
Hello Filipe
Thanks for your link
By context menu I mean "right mouse click"
Best regards
Daniel