10-18-2019 10:10 AM
Hi,
is there any methods to create/handle own keyboard shortcuts (for example 'F7') in my ABAP code for an ALV Grid? I would like NOT use the PF-STATUS.
Thanks in advance!
10-18-2019 10:12 AM
PF-STATUS is here for this purpose
Why do not you want to use it ?
10-18-2019 10:53 AM
Because I want to use the shortcuts dynamic.
For example for ALV1 should the F7 mean method1, and for ALV2 should the F7 mean method2. And sometimes it should not be active.
That's why this should be ALV/object dependent and not program dependent.
10-18-2019 11:59 AM
10-18-2019 12:01 PM
So should you call method dynamically under that PF-STATUS function code based on ALV?.
10-18-2019 12:04 PM
I have on my screen 4 ALVs.
I have to handle the F7 function other way in every 4 ALVs.
10-18-2019 12:14 PM
So you only need to perform an event to the selected ALV when somebody press F7
if you link your F7 in the pf-status to a command, and if the code you manage the command you will be able to do it
no ?
10-18-2019 12:41 PM
Yes. But how can I raise the method onuser_command of the ALV after pressing the F7?
10-18-2019 12:45 PM
it depends a lot of your code and your level of Object knowledge
But it should be an Observer Design Pattern
You have serveral documentation about this design pattern, for example:
http://zevolving.com/2011/11/case-study-observer-design-pattern-usage/
10-18-2019 1:05 PM