04-29-2009 5:14 AM
Hi,
I have a button in the application toolbar of the GUI status.I want to disable it and it should be enabled when a certain field in the database table is updated.Please suggest how can I do it.
04-29-2009 6:02 AM
If you want to disable more than one buttons.
Data: T_Ucomm type standard table of sy-ucomm with header line.
T_ucomm = 'X1'.
Append T_ucomm.
T_ucomm = 'X2'.
Append T_ucomm.
If Condition1.
SET PF-STATUS 'TEST' Excluding T_UCOMM.
ELSE.
SET PF-STATUS 'TEST'.
ENDIF.
ELSE for one button:
If Condition1.
SET PF-STATUS 'TEST' Excluding '<Button>'.
ELSE.
SET PF-STATUS 'TEST'.
ENDIF.
Regards,
Gurpreet
04-29-2009 5:55 AM
Hi,
U can use the statement
set pf-status 'ABC' excluding 'XYZ'.
you need to have a condition for this.
i mean if the values are appropriate then disable it other wise enable it.
if condition eq 'X'.
set pf-status 'ABC' excluding 'XYZ'.
else.
set pf-status 'ABC'.
endif.
Regards,
Venkatesh
04-29-2009 6:02 AM
If you want to disable more than one buttons.
Data: T_Ucomm type standard table of sy-ucomm with header line.
T_ucomm = 'X1'.
Append T_ucomm.
T_ucomm = 'X2'.
Append T_ucomm.
If Condition1.
SET PF-STATUS 'TEST' Excluding T_UCOMM.
ELSE.
SET PF-STATUS 'TEST'.
ENDIF.
ELSE for one button:
If Condition1.
SET PF-STATUS 'TEST' Excluding '<Button>'.
ELSE.
SET PF-STATUS 'TEST'.
ENDIF.
Regards,
Gurpreet