2008 Dec 29 5:45 PM
Hi All,
I am using REUSE_ALV_GRID_DISPLAY to show data in ALV.
Here I am using my own PF-Status containing one extra PUSHBUTTON in Application Toolbar, other than the standard ones.
I want to gray out this button once this PUSHBUTTON is pressed.
Please let me know how I can get this functionality....
Rgds,
Avijit
Hi All,
I am using REUSE_ALV_GRID_DISPLAY to show data in ALV.
Here I am using my own PF-Status containing one extra PUSHBUTTON in Application Toolbar, other than the standard ones.
I want to gray out this button once this PUSHBUTTON is pressed.
Please let me know how I can get this functionality....
Rgds,
Avijit
2008 Dec 29 7:50 PM
Hi,
Create another GUI status with the push button disabled. Set this PF-STATUS at user command.
Regards.
2008 Dec 29 7:57 PM
Hello Avijit
You need a "switch" variable which stores whether the pushbutton has been used already or not.
TYPE-POOLS: abap.
DATA: gd_button_pushed TYPE boole_d.
...
START-OF-SELECTION.
...
gd_button_pushed = abap_false.
...
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'.
In order to define your own pushbutton and handle its ok-code you need to implement the FORM routines for I_CALLBACK_PF_STATUS_SET and I_CALLBACK_USER_COMMAND (see fm documentation), e.g.:
FORM pf_status_set ....
IF ( gd_button_pushed = abap_true ).
SET PF-STATUS '<my gui-status>' EXCLUDING '<my pushbutton>'.
ELSE.
SET PF-STATUS '<my gui-status>'.
ENDIF.
ENDFORM.
FORM user_command ...
CASE r_ucomm.
WHEN '<my pushbutton>'.
gd_button_pushed = abap_true.
WHEN others.
ENDCASE.
...
ENDFORM.
Regards
Uwe
2008 Dec 29 8:00 PM
Hi,
Please pass the export parameter IT_EXCLUDING in the FM to achieve your expected results.
Best Regards,
Krishna
2008 Dec 29 8:16 PM
Normally, when we create the GUI status and use it with the EXCLUDING addition, it will HIDE the button from the GUI, not DEACTIVATE it.
To make it GRAY, you have to change Application Toolbar Settings in the GUI status.
To do so:
Open your GUI status in the Change Mode
Against the "Application Toolbar" you will see the Green light. Click on the Green Light
From the Popup, Select the Option "Display ALL" Option
Enter.
Save and Activate.
Now, when you use the
SET PF-STATUS 'ZTEST' EXCLUDING ex_tab.
System will show the Gray button instead of the Removing that button.
You have to use the SET PF-STATUS ........... with help of some flag as suggested by Uwe.
Regards,
Naimesh Patel
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |