Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

GUI Status Function Key doesn't t react

Hello,

i defined in the initialization event a own gui status.

PARAMETERS: p_name TYPE string.

INITIALIZATION.

SET PF-STATUS 'ZMC'.


I defined a function key(F5). If the user clicks on it the it should write 'hello'.  Although one can click on this buttion it doesn't anything. I tried to acces the function with AT PF05 and with

AT USER-COMMAND.

    CASE sy-ucomm.

      WHEN 'TEST' .WRITE 'OK'.

      WHEN OTHERS.

    ENDCASE.


Nothing appears. What did I wrong?

Former Member
Former Member replied

It is possible but not sure what you want to achieve as the Event handling should be done in AT-SELECTION SCREEN event and you have limited option there.

Please see below the code.

SELECTION-SCREEN FUNCTION KEY 5.

PARAMETERS: p_name TYPE string.

data : lt_exclude type TABLE OF mara.

INITIALIZATION.

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

   EXPORTING

     p_status        = 'ZMC'

*   P_PROGRAM       = ' '

   tables

     p_exclude       = lt_exclude

           .

AT SELECTION-SCREEN.

   BREAK-POINT.

   if sy-ucomm NE 'TEST'.

     LEAVE PROGRAM.

   else.

     Message s398(00) with 'F5 pressed'.

   endif.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question