2006 Dec 04 11:44 AM
Hi,
I have designed a screen to contain two buttons in the application toolbar. However, the immediate requirement is to just disable these buttons. I tried the following approach but I find that the buttons are completely removed from the screen.
<b>data: itab type table of sy-ucomm.
append 'MODLOG' to itab.
append 'ADDCR' to itab.
set pf-status 'ZS0100' excluding itab.</b>
Is there any alternative method so as to just disable the buttons?
Any help would be appreciated.
Thanks
Hi Sandeep,
I am not sure where to find the button name. What exactly is ui_functions?
Thanks
Sneha
2006 Dec 04 11:46 AM
Hi,
You have to append it in the particular field.
wa_excluding-fcode = p_fcode.
APPEND wa_excluding TO it_excluding.
SET PF-STATUS 'ZHCD' EXCLUDING it_excluding.
regards
Muthappan
2006 Dec 04 11:49 AM
Hi Sneha,
before calling the method set_table_for_first_display .
try this:
Build Exclude functions.
PERFORM build_exclude_func CHANGING gt_exclude_0100.
----
*Local data declaration
DATA: ls_exclude TYPE ui_func.
----
ls_exclude = cl_gui_alv_grid=>Give th ebutton name.That u can find in ui_functions.
APPEND ls_exclude TO pt_exclude.
Hope this helps.
2006 Dec 04 12:02 PM
Hi Sandeep,
I am not sure where to find the button name. What exactly is ui_functions?
Thanks
Sneha
2006 Dec 04 12:07 PM
Hi,
UI_FUNCTIONS is a table type , goto SE11 and u ll get it.
But what u have to do is :
Goto CL_GUI_ALV_GRID and in attributes u will find the button names and detailed desc , which u want to remove .
So select the required buttons and append the internal table.
If any further queries , let me know.
2006 Dec 04 12:34 PM
2006 Dec 05 4:03 AM
Hi Sandeep,
I tried the approach you have suggested but when I look at the attributes, there are only standard buttons that are mentioned. The two buttons I want to disable are what I have created myself ( custom oush buttons). The requirement is to have the buttons for disabled and later on once their finctionality is clear they will have to be enabled.
Is there any other way ?
Thanks
Sneha
2006 Dec 05 4:08 AM
Hi,
If it is custom button,then go to application in GUI status.There if you double click the button which you designed,you will get the information about the button.
2006 Dec 05 4:33 AM
Hi,
So u want to change tthe GUI status based on some conditions .
Try this:
wa_excluding-fcode = p_fcode." Give the focde for buttons u want to exclude
APPEND wa_excluding TO it_excluding.
SET PF-STATUS 'ZHCD' EXCLUDING it_excluding.
If condition is met then call :
SET PF-STATUS 'ZHCD' .
also,
u can create two PF staus , once with all the buttons and other with the required buttons and call the required PF STATUS based on ur condition.
2006 Dec 04 11:51 AM
wa_excluding-fcode = p_fcode.
APPEND wa_excluding TO it_excluding.
SET PF-STATUS 'ZHCD' EXCLUDING it_excluding.
2006 Dec 15 10:23 AM
hi,
If you want just to enable or disable buttons instead of completely hiding the buttons, follow these steps:
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 Display All 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).
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |