‎2006 Nov 08 6:41 AM
hai
i have put 3 button in the appliaction toolbar in selection screen.
at runtime , i want to disable any one of the button by pressing one button in application toolbar.
‎2006 Nov 08 6:44 AM
I guess we can give a try by using AT SELECTION-SCREEN, SY-UCOMM, MODIFY SCREEN to acheive this.
Kind Regards
Eswar
‎2006 Nov 08 6:45 AM
... EXCLUDING f
... EXCLUDING itab
Effect
Deactivates one or more of the status functions, so that they cannot be selected. Specify the appropriate function codes using one of the following:
a field f or a literal which contains a function code
an internal table itab which contains several function codes
This method allows you to modify the selectable functions of a status easily at runtime.
Example
TYPES: BEGIN OF TAB_TYPE,
FCODE LIKE RSMPE-FUNC,
END OF TAB_TYPE.
DATA: TAB TYPE STANDARD TABLE OF TAB_TYPE WITH
NON-UNIQUE DEFAULT KEY INITIAL SIZE 10,
WA_TAB TYPE TAB_TYPE.
CLEAR TAB.
MOVE 'DELE' TO WA_TAB-FCODE.
APPEND WA_TAB TO TAB.
MOVE 'AUSW' TO WA_TAB-FCODE.
APPEND WA_TAB TO TAB.
SET PF-STATUS 'STA3' EXCLUDING TAB.
Sets the status STA3 which renders the functions with the function codes DELE and AUSW inactive.
-
suppose if u want to disable only one then write like...
SET PF-STATUS 'STA3' EXCLUDING 'AUSW'.
Regards,
Ramesh.
‎2006 Nov 08 6:54 AM
hai
if u use excluding option in set pf-status it will remove the button from it.
i dont want to remove , i just want disable the button while at runtime.
‎2006 Nov 08 6:46 AM
suppose if r doing report selection screen
AT SELECTION-SCREEN, SY-UCOMM
loop screen.
disable required field..
MODIFY SCREEN to acheive this.
endloop.
Regards,
Ramesh.
‎2006 Nov 08 6:55 AM
Hi,
you can catch the function code in SY-UCOMM and then make the button invisible.
Have a look at this piece of code:
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'A'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'P'.
SCREEN-ACTIVE = '1'.
SCREEN-INPUT = '1'.
SCREEN-OUTPUT = '1'.
SCREEN-INVISIBLE = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Endcase.
Thus you can make the desired button invisible.
Hope this helps you,
Regards,
Pragya