Application Development and Automation 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: 
Read only

Enable F8 function ( execute )

Former Member
0 Likes
1,532

Hi Experts,

I am able to disable the F8 function key using the FF code:

  gv_ucomm = 'ONLI'.

  APPEND gv_ucomm TO gt_ucomm.

  CLEAR gv_ucomm.

  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

    EXPORTING

      p_status        = sy-pfkey

*     P_PROGRAM       = ' '

    TABLES

      p_exclude       = gt_ucomm.

Question:

How do I ENABLE it again in my program?

Thanks!

Carl

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,121

Hi,

  You can use the event AT SELECTION-EVENT with the same code to put it back.

PARAMETERS: p_matnr TYPE matnr.

DATA: l_text TYPE char1.

DATA: gt_ucomm TYPE STANDARD TABLE OF syucomm.

DATA: gv_ucomm TYPE syucomm.

AT SELECTION-SCREEN OUTPUT.

   IF l_text = 'X'.

     CLEAR: gt_ucomm.

     CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

       EXPORTING

         p_status  = sy-pfkey

       TABLES

         p_exclude = gt_ucomm.

     l_text = space.

   ELSE.

     gv_ucomm = 'ONLI'.

     APPEND gv_ucomm TO gt_ucomm.

     CLEAR gv_ucomm.

     CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

       EXPORTING

         p_status  = sy-pfkey

       TABLES

         p_exclude = gt_ucomm.

     l_text = 'X'.

   ENDIF.

Thanks,

Naren

2 REPLIES 2
Read only

Former Member
0 Likes
1,122

Hi,

  You can use the event AT SELECTION-EVENT with the same code to put it back.

PARAMETERS: p_matnr TYPE matnr.

DATA: l_text TYPE char1.

DATA: gt_ucomm TYPE STANDARD TABLE OF syucomm.

DATA: gv_ucomm TYPE syucomm.

AT SELECTION-SCREEN OUTPUT.

   IF l_text = 'X'.

     CLEAR: gt_ucomm.

     CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

       EXPORTING

         p_status  = sy-pfkey

       TABLES

         p_exclude = gt_ucomm.

     l_text = space.

   ELSE.

     gv_ucomm = 'ONLI'.

     APPEND gv_ucomm TO gt_ucomm.

     CLEAR gv_ucomm.

     CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

       EXPORTING

         p_status  = sy-pfkey

       TABLES

         p_exclude = gt_ucomm.

     l_text = 'X'.

   ENDIF.

Thanks,

Naren

Read only

0 Likes
1,121

Hi Naren,

Thanks a LOT!!

Carl