‎2009 May 14 11:05 AM
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
‎2009 May 14 11:17 AM
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
‎2009 May 14 11:15 AM
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
‎2009 May 14 11:17 AM
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
‎2009 May 14 11:24 AM
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]
‎2009 May 14 11:30 AM
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
‎2009 May 14 11:33 AM
Try This one
set pf-status 'ZCASEPAK1' excluding 'STCK'."STICK" whis you don't want in GUI Status