Skip to Content

Shortcut Key to PushButton

Hello Friends,

Can anyone tell me if it is possible to map a shortcut key to a pushbutton on a selection screen? For example, when user presses key F10, then the program will execute the code flow associated to a button on the screen.

If yes, how?

Thanks in advance.

Kind regards.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 04:01 PM

    Hi

    On selection-screen u can assign only 5 your own buttons, the keys of keyboards assigned to them are:

    - CTRL+F1

    - CTRL+F2

    - CTRL+F3

    - CTRL+F4

    - CTRL+F5

    U have to check the ok-code value in the event AT SELECTION-SCREEN, these butto can hav a code FC<XX>:

    TABLES SSCRFIELDS.
    
    PARAMETERS: P_BUKRS LIKE T001-BUKRS.
    
    SELECTION-SCREEN FUNCTION KEY 1.
    SELECTION-SCREEN FUNCTION KEY 2.
    SELECTION-SCREEN FUNCTION KEY 3.
    SELECTION-SCREEN FUNCTION KEY 4.
    SELECTION-SCREEN FUNCTION KEY 5.
    
    INITIALIZATION.
      MOVE: '@01@ 1' TO SSCRFIELDS-FUNCTXT_01,
            '@02@ 2' TO SSCRFIELDS-FUNCTXT_02,
            '@03@ 3' TO SSCRFIELDS-FUNCTXT_03,
            '@04@ 4' TO SSCRFIELDS-FUNCTXT_04,
            '@05@ 5' TO SSCRFIELDS-FUNCTXT_05.
    
    AT SELECTION-SCREEN.
    
    
      CASE SSCRFIELDS-UCOMM.
        WHEN 'FC01'. MESSAGE I208(00) WITH 'You have pressed KEY CTRL+F1'.
        WHEN 'FC02'. MESSAGE I208(00) WITH 'You have pressed KEY CTRL+F2'.
        WHEN 'FC03'. MESSAGE I208(00) WITH 'You have pressed KEY CTRL+F3'.
        WHEN 'FC04'. MESSAGE I208(00) WITH 'You have pressed KEY CTRL+F4'.
        WHEN 'FC05'. MESSAGE I208(00) WITH 'You have pressed KEY CTRL+F5'.
      ENDCASE.

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 04:05 PM

    Is it module pool program ? then you can do -> click on GUI at PBO -> now you will be at menu painter(SE41 Screen)-> below see the Function code -> here add your push button user command.

    Thanks

    Seshu

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 18, 2008 at 04:47 PM

    Thanks for the help 😊

    Add a comment
    10|10000 characters needed characters exceeded