10-12-2006 1:26 PM
Hi all,
How to disable and enable a button in PF-Status at run-time ?
Thanx in advance.
10-12-2006 1:27 PM
You can use the syntax:
DATA: itab TYPE TABLE OF sy-ucomm.
APPEND 'DELE' TO itab. "Function Code you do not want
APPEND 'PICK' TO itab. "Function Code you do not want
SET PF-STATUS 'STA3' EXCLUDING itab.
Regards,
ravi
Message was edited by: Ravi Kanth Talagana
10-12-2006 1:28 PM
Hi
When you set the status use EXCLDING option:
DATA: T_FCODE LIKE SY-UCOMM OCCURS 0.
REFRESH T_FCODE.
IF ......
APPEND: <FCODE1> TO T_FCODE,
<FCODE2> TO T_FCODE,
....................
<FCODEN> TO T_FCODE.
ENDIF.
SET PF-STATUS <STATUS> EXCLUDING T_FCODE.
So when you define the status all functionalities have to be actives and you disable them at run time.
Max
10-12-2006 1:32 PM
10-12-2006 1:37 PM
10-12-2006 1:40 PM
TYPES: BEGIN OF ty_excl_menu,
fcode(20) TYPE c,
END OF ty_excl_menu.
data: i_excl_menu TYPE STANDARD TABLE OF ty_excl_menu,
wa_excl_menu TYPE ty_excl_menu,
MODULE status_0100 OUTPUT.
SET TITLEBAR 'TITLE'.
REFRESH i_excl_menu.
IF i_final[] IS INITIAL.
CLEAR wa_excl_menu.
wa_excl_menu-fcode = 'EXEC'.
APPEND wa_excl_menu TO i_excl_menu.
ENDIF.
SET PF-STATUS 'STATUS_100' EXCLUDING i_excl_menu.
Regards,
Prakash.
10-12-2006 3:02 PM
hi,
<b> If you want just to enable or disable buttons instead of completely hiding the buttons, follow these steps:</b>
1) Set pf-status 'ABC' excluding itab.
Populate itab with all the function codes which should be disabled.
2) double click on ABC to go to pf-status screen, in the menu, goto->attributes->push button assignment. Select <b>Display All</b> and click ok. ( By default we will be having Hide All.)
3) Save and activate.
Now, all the buttons that are excluded will be grayed out(disabled).
Regards,
Sailaja.