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: 

Keyboard Shortcuts

agyas
Explorer
0 Kudos

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!

9 REPLIES 9

FredericGirod
Active Contributor

PF-STATUS is here for this purpose

Why do not you want to use it ?

agyas
Explorer
0 Kudos

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.

FredericGirod
Active Contributor
0 Kudos

the ALV is in the same screen ?

DoanManhQuynh
Active Contributor
0 Kudos

So should you call method dynamically under that PF-STATUS function code based on ALV?.

agyas
Explorer
0 Kudos

I have on my screen 4 ALVs.

I have to handle the F7 function other way in every 4 ALVs.

FredericGirod
Active Contributor
0 Kudos

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 ?

agyas
Explorer
0 Kudos

Yes. But how can I raise the method onuser_command of the ALV after pressing the F7?

FredericGirod
Active Contributor

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/

agyas
Explorer
0 Kudos

Thank you all! 🙂