Application Development 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: 

disable a button in the dialog program

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member

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

2 REPLIES 2

Former Member
0 Kudos

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

Former Member

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