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

Disabling the function keys in GUI status

Former Member
0 Likes
3,306

Hi Experts,

I want to disable/hide the function keys in the gui status based on some condition in a module pool.Please tell me how to achieve that.

Regds

Abbhishek

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,503

If you want to hide more than one button:

Data: T_ucomm type table of sy-ucomm with header line.

IN PAI.

IF CONDITION.
T_ucomm = 'Button1'.
append t_ucomm.

T_ucomm = 'Button'2.
append t_ucomm.

ENDIF.

IN PBO.

SET PF-STATUS 'PFSTATUS' Excluding t_ucomm.

If only One button use:

IN PBO.

Condition.
SET PF-STATUS 'PFSTATUS' Excluding <ButtonName>.

Regards,

Gurpreet

5 REPLIES 5
Read only

Former Member
0 Likes
1,503

Take a look at the SET PF-STATUS online help.

SET PF-STATUS 'xxx' EXCLUDING lt_fcode.

Where lt_fcode is a list of fuctions to exclude

Read only

Former Member
0 Likes
1,504

If you want to hide more than one button:

Data: T_ucomm type table of sy-ucomm with header line.

IN PAI.

IF CONDITION.
T_ucomm = 'Button1'.
append t_ucomm.

T_ucomm = 'Button'2.
append t_ucomm.

ENDIF.

IN PBO.

SET PF-STATUS 'PFSTATUS' Excluding t_ucomm.

If only One button use:

IN PBO.

Condition.
SET PF-STATUS 'PFSTATUS' Excluding <ButtonName>.

Regards,

Gurpreet

Read only

Former Member
0 Likes
1,503

Hi Abhishek,

Please check the follwoing links to enable/disable function keys in module pool.

[http://www.saptechies.com/pf-status/|http://www.saptechies.com/pf-status/]

[http://www.sap-img.com/abap/common-used-of-dialog-screen-for-display-change-delete.htm|http://www.sap-img.com/abap/common-used-of-dialog-screen-for-display-change-delete.htm]

[http://sapabap.iespana.es/sap/tips/dinamically_set_pfstatus.htm|http://sapabap.iespana.es/sap/tips/dinamically_set_pfstatus.htm]

Read only

Former Member
0 Likes
1,503

THIS IS THE CODING WHICH WILL HELP YOU.

?**************************************************************

TYPES : BEGIN OF TY_FCODE,

FCODE TYPE FCODE,

END OF TY_FCODE.

DATA: IT_FCODE TYPE STANDARD TABLE OF TY_FCODE,

WA_FCODE TYPE TY_FCODE.

IN PBO.

IF CONDITION.

CLEAR: WA_FCODE,IT_FCODE[].REFRESH IT_FCODE.

WA_FCODE = 'YOU FCODE OF BUTTON'.

APPEND WA_FCODE TO IT_FCODE.

ENDIF.

SET PF-STATUS 'XXX' EXCLUDING IT_FCODE.

****************************************************************************

IF IT WORKS GIVE ME SOME POINT

Read only

Former Member
0 Likes
1,503

Try This one

set pf-status 'ZCASEPAK1' excluding 'STCK'.

"STICK" whis you don't want in GUI Status