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

PF-Status

Former Member
0 Likes
732

Hi all,

How to disable and enable a button in PF-Status at run-time ?

Thanx in advance.

Hi all,

How to disable and enable a button in PF-Status at run-time ?

Thanx in advance.

6 REPLIES 6
Read only

Former Member
0 Likes
674

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

Read only

Former Member
0 Likes
674

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

Read only

0 Likes
674

I dont want to hide that button only disable and enable.

Read only

0 Likes
674

then go for a Transaction Variant using SHD0..

~Suresh

Read only

Former Member
0 Likes
674

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.

Read only

Former Member
0 Likes
674

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.