How to Deactivate the Button in Application Toolbar
Dear ABAPers,
I would like to deactivate the Release button in CO01 Transaction.How to do this.Please Help me to solve this problem.
Thanks & Regards,
Ashok.
Hi,
You can do it 2 ways,
One is
Code a Function code for the button in the Application toolbar that you want to disable.
For example, I am trying to disable the SAVE button on the Application toolbar. The Function Code that I have coded is 'SAVE'.
module STATUS_0100 output.
APPEND 'SAVE' TO T_PFSTATUS.
SET PF-STATUS 'STATUS' EXCLUDING T_PFSTATUS.
endmodule. " STATUS_0100 OUTPUT
The second way is to create a transaction variant using SHD0
Give the Transaction code(ZTRAN) for which you want to create a variant -> name of some variant (ZVAR) -> create -> takes you to your transaction -> enter -> Menu Functions -> Double click on the button that you want to deactivate -> it turns yellow -> Click on Exit and Save -> Save and go back -> You can see a screen variant created (ZVAR_0100)
Now Goto -> Create variant transaction -> Give your transaction variant name (ZVAR) -> Select Transaction with variant -> Takes you to SE93 transaction -> The transaction variant name appears -> save
Now your new transaction is ZVAR -> Execute it and you will find the button deactivated
Check this for verifications
[http://help.sap.com/saphelp_nw70/helpdata/EN/43/132f9803d76f40e10000000a422035/content.htm]
Similar Messages
-
How to disable the button in application toolbar in report pgm
Can anyone help with How to disable the button in application toolbar in report pgm
Hi,
You can use it_excluding to disable button on the tool bar.You have to find the function code for the required button and append that function code to the it_excluding .The optional IMPORTING parameter IT_EXCLUDING is an internal table. It is only needed if the caller uses the list tool standard interface but wants to deactivate interface functions which he or she does not need.You can have your defined pf-status using I_CALLBACK_PF_STATUS_SET.
SAMPLE PROGRAM
tables spfli.
type-pools: slis.
DATA W_FCODE TYPE SLIS_EXTAB-FCODE.
data: t_spfli TYPE SPFLI OCCURS 0 WITH HEADER LINE.
select * from spfli into table t_spfli.
data : t_excluding TYPE SLIS_T_EXTAB .
W_fcode = '&OUP'.
append w_fcode to t_excluding.
W_fcode = '&ODN'.
append w_fcode to t_excluding.
call function 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = 'SPFLI'
IS_LAYOUT =
IT_FIELDCAT =
IT_EXCLUDING = T_EXCLUDING
tables
t_outtab = T_SPFLI
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
http://help.sap.com/saphelp_nw2004s/helpdata/en/99/49b844d61911d2b469006094192fe3/frameset.htm
Regards,
Priyanka. -
How to deactive a button in application toolbar
how to deactive a button in application toolbar?
Simple example
This example shows how to create a toolbar with a single Exit button, used to exit the program.
Steps:
Create a screen and add a custom container named TOOLBAR_CONTAINER
Code:
REPORT sapmz_hf_toolbar .
TYPE-POOLS: icon.
CLASS cls_event_handler DEFINITION DEFERRED.
G L O B A L D A T A
DATA:
ok_code LIKE sy-ucomm,
Reference for conatiner
go_toolbar_container TYPE REF TO cl_gui_custom_container,
Reference for SAP Toolbar
go_toolbar TYPE REF TO cl_gui_toolbar,
Event handler
go_event_handler TYPE REF TO cls_event_handler.
G L O B A L T A B L E S
DATA:
Table for registration of events. Note that a TYPE REF
to cls_event_handler must be created before you can
reference types cntl_simple_events and cntl_simple_event.
gi_events TYPE cntl_simple_events,
Workspace for table gi_events
g_event TYPE cntl_simple_event.
CLASS cls_event_handler DEFINITION
CLASS cls_event_handler DEFINITION.
PUBLIC SECTION.
METHODS:
on_function_selected
FOR EVENT function_selected OF cl_gui_toolbar
IMPORTING fcode,
on_dropdown_clicked
FOR EVENT dropdown_clicked OF cl_gui_toolbar
IMPORTING fcode posx posy.
ENDCLASS.
CLASS cls_event_handler IMPLEMENTATION
CLASS cls_event_handler IMPLEMENTATION.
METHOD on_function_selected.
CASE fcode.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMETHOD.
METHOD on_dropdown_clicked.
Not implented yet
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
SET SCREEN '100'.
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
IF go_toolbar_container IS INITIAL.
Create container
CREATE OBJECT go_toolbar_container
EXPORTING
container_name = 'TOOLBAR_CONTAINER'.
Create toolbar
CREATE OBJECT go_toolbar
EXPORTING
parent = go_toolbar_container.
Add a button
CALL METHOD go_toolbar->add_button
EXPORTING fcode = 'EXIT' "Function Code
icon = icon_system_end "ICON name
is_disabled = ' ' "Disabled = X
butn_type = cntb_btype_button "Type of button
text = 'Exit' "Text on button
quickinfo = 'Exit program' "Quick info
is_checked = ' '. "Button selected
Create event table. The event ID must be found in the
documentation of the specific control
CLEAR g_event.
REFRESH gi_events.
g_event-eventid = go_toolbar->m_id_function_selected.
g_event-appl_event = 'X'. "This is an application event
APPEND g_event TO gi_events.
g_event-eventid = go_toolbar->m_id_dropdown_clicked.
g_event-appl_event = 'X'.
APPEND g_event TO gi_events.
Use the events table to register events for the control
CALL METHOD go_toolbar->set_registered_events
EXPORTING
events = gi_events.
Create event handlers
CREATE OBJECT go_event_handler.
SET HANDLER go_event_handler->on_function_selected
FOR go_toolbar.
SET HANDLER go_event_handler->on_dropdown_clicked
FOR go_toolbar.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
http://www.erpgenie.com/abap/controls/toolbar.htm#Simple%20example
http://help.sap.com/saphelp_nw04/helpdata/EN/42/d2ab343e416635e10000000a1553f6/content.htm
help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCITOOLBAR/BCCITOOLBAR.pdf
Regards,
Jagadish -
How to make buttons in application toolbar enable and disable
Hi ,
I have to shaow the buttons in application toolbar enable or disable dynamically , pls helpCheck syntax of SET PF-STATUS status EXCLUDING fcode in online help...
Regards,
Raymond -
I went to the website and it said it downloaded, but when I click on the button in my Toolbar, nothing happens. I seen on a search engine that they make "Print Friendly" for Firefox now. Can you tell me where to find it, how to put the button in my Toolbar? I must be doing something or not doing something for it not to be working for me. I am not real computer friendly but I'm not a beginner either. So if you dont mind Please explain to me how to fix this issue in relatively easy step by step instructions. Thank you for your time, Sheybiker
Is this what you are looking for? <br />
http://www.printfriendly.com/browser_tool
'''Click and Drag''' the Print Friendly button to your Bookmarks Toolbar. -
Making buttons in application toolbar dynamic....
Hello,
I have a application tool bar with 8 icon buttons defined. Now I have a custom configuration table where I check what buttons in application toolbar should be seen so that user can select which button he wants to see and which not anytime he wishes.
My question is how can I make buttons in application toolbar dynamic ?
Please guide.
Regards,
Rajesh.This is sample logic, but you can adapt it to you needs
DATA: excl_tab TYPE sy-ucomm OCCURS 0 WITH HEADER LINE.
AUTHORITY-CHECK OBJECT 'ZREO' ID 'ACTVT' FIELD c_print.
IF sy-subrc NE 0.
APPEND 'PRIN' TO excl_tab.
ENDIF.
IF ok_0010 = 'DISP' OR ok_0010 = 'DELE'.
APPEND 'SAVE' TO excl_tab.
ENDIF.
IF ok_0010 <> 'DELE'.
APPEND 'DELE' TO excl_tab.
ENDIF.
SET PF-STATUS 'STAT_100' EXCLUDING excl_tab. -
How to make the buttons INVISIBLE in the Application toolbar
Hi All,
I have a requirement to create a button in the Application toolbar of the Module Pool Screen. The field should be made Invisible by default. and it should be displayed based on one condition.
Could you please let me know how to make that particular button INVISIBLE. I think we can make it invisible by using EXCLUDING statement. But, How to make the button VISIBLE again when the check is satisfied.
I found from the portal that the FM 'VIEW_SET_PF_STATUS' can be used to make a button INVISIBLE. Could anyone help me out how to pass the parameters to this Function module?
or is there any Function Module available to make the button VISIBLE and INVISIBLE? Please help me on this issues.
Is there any possibility to make the button VISIBLE or INVISIBLE as we do for the screen fields using LOOP AT SCREEN..?
Thank you in advance.
Regards.
Paddu.Hi,
Try to use below in the PBO module status_0100 OUTPUT.
DATA t_fcode TYPE TABLE OF sy-ucomm.
refresh t_fcode[].
APPEND 'Function code name of the button' TO t_fcode.
Check the condition here for which you want to make field visible.
DELETE FCODE of the button from T_FCODE table
ENDIF.
SET PF-STATUS 'STATUS_0100' EXCLUDING t_fcode. -
How to Grey(Deactivate) Function Code at application Toolbar of a screen
Hi all,
I want to gray(deactivate) function codes at application toolbar of a normal screen. I am using excluding addition of set pf-status but it hides the button from the application tool bar.
I don't want to hide button, but gray only.
Thanx in advance.When editing the PF-Status itself, try selecting the menu option and then F7 (the Function Code / Activate / Deactivate button, or menu Extras > Function Active <-> Inactive).
Jonathan -
How to call report by click application toolbar button?
I need to know the way to call a report by click a button in application toolbar?
BR,
Ali
Moderator message: next time, please (re)search yourself instead of asking basic questions.
Edited by: Thomas Zloch on Aug 31, 2010 11:44 AMHi Ali,
Selection-screen function key is used to add push buttons on application tool bar.
Syntax:
selection-screen functuin key<num>
Where num is ranging from 1 to 5.
whenever application toolbat components are added using above statement,tables are defined in the structure "SSCRFIELDS" as "Functxt_01","Functxt_02","Functxt_03","Functxt_04","Functxt_05" for the related function key numbers.
eg:
Tables SSCRFIELDS.
Selection-Screen pushbutton/10(10 lb1 user-command pb1.
Selectiong-Screen Function key1.
Selectiong-Screen Function key2.
Selectiong-Screen Function key3.
Selectiong-Screen Function key4.
Selectiong-Screen Function key5.
Initialization.
sscrfields-Functxt_01 = 'first".
sscrfields-Functxt_01 = 'fifth".
At Selection-Screen.
case sy-ucomm.
When 'first'.
Sumbit zreport.
endcase.
Hope it solves your problem.
Regards,
Amarnath S -
How to add a custom button on Application Toolbar for ME21N, ME22N & ME23N
Hi Experts,
I am new to this forum. I hope someone will help me.
My Requirement is as :
I want to add a new custom button on Application Toolbar for ME21N, ME22N & ME23N.
There are already standard buttons in this toolbar which is Document Overview On, Hold, Personal Settings etc.
So after the 'personal settings' button i want add a new button and want to write a code which will open one custom screen.
I am not able to find any exit for this....
Please help...
Thanks....Hey Buddies
Try below BADI : ME_PROCESS_PO_CUST
and check with required methods.
1)PROCESS_ITEM
2)CHECK
3)POST
Regards,
Pranav -
How to let the button in the toolbar more distinct when its be selected?
hi.
How to let the button in the toolbar more conspicuous(distinct) when its be selected?Chnge it's backgroung color, it's border, it't icon if has one.... Coice the way you more like.
Abraham. -
How to Add button in Application Toolbar for Fb01(screen) Transaction
Hi All,
I need to Add a customized Button at Application toolbar for FB01 Tcode for standard screen.
I am unaware of this,please take it as an urgent issue and help me with your inputs.
Points will be given.
Thanks,
RameshOn which screen (in which standard status ?) to do what ?
You could try to bypass sscr key requirement using some BAdI like FI_HEADER_SUB_1300 to add a button to screen or identifying an implicit enhancement option in one PBO module/form to change PF-STATUS, then look for such an option in PAI module/forms.
Regards,
Raymond -
Adding Button on application toolbar on ABAP List display screen....
Hello Gurus,
I copied SAP program 'RFBUEB00' into custom program. When I execute the custom report, I see the data lijne by line in ABAP list. I see a deafult 'Select' button on application toolbar.
If I want to add additional custom button on application toolbar on ABAP list display screen, how can I do it ? Please help.
Regards,
Jainam.
Edited by: Jainam Shah on Oct 27, 2009 5:44 PM>
Jainam Shah wrote:
> In my case it just rights the data in ABAP screen as follows. I can't use ALV grid and stuff because its on older version.
>
>
FORM LISTE_SCHREIBEN.
>
> check = '@T9@'.
>
> FORMAT COLOR COL_KEY INTENSIFIED OFF.
> WRITE: / SY-VLINE,
> check,
> BKPF-BUKRS,
> BKPF-BELNR,
> BKPF-GJAHR.
> FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
> WRITE: BKPF-BLART,
> (8) BKPF-BLDAT DD/MM/YY,
> (8) BKPF-BUDAT DD/MM/YY,
> BKPF-WAERS,
> BKPF-XBLNR,
> 80 SY-VLINE.
> XAUSGABE = 'X'.
> HIDE: BKPF-BUKRS, BKPF-BELNR, BKPF-GJAHR, BKPF-BSTAT, XAUSGABE.
> IF BKPF-BKTXT NE SPACE.
> FORMAT COLOR COL_KEY INTENSIFIED OFF.
> WRITE: / SY-VLINE, CHAR4 UNDER BKPF-GJAHR.
> FORMAT COLOR COL_NORMAL INTENSIFIED.
> WRITE: BKPF-BKTXT UNDER BKPF-BLART,
> 80 SY-VLINE.
> HIDE: BKPF-BUKRS, BKPF-BELNR, BKPF-GJAHR, BKPF-BSTAT, XAUSGABE.
> ENDIF.
> ENDFORM.
>
>
> I have to select multiple lines and proces them. For one line I know I can use AT-LINE-SELECTION but this is multiple lines...
What is your SAP system version?
It seems to be displayed only in ALV. Well, if you can make it to display in LIST ... you can go with set pf-status.
good luck -
How to create multiple buttons in ALV Toolbar in Webdynpro ABAP
Hi all,
I am trying to create multiple buttons in Webdynpro ALV toolbar, please go through the code.
What happening is, second button is replacing the first one.
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_alv_table( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_alv_table( ).
DATA lv_value TYPE REF TO cl_salv_wd_config_table.
lv_value = lo_interfacecontroller->get_model(
DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
DATA button1 TYPE REF TO cl_salv_wd_function.
DATA button2 TYPE REF TO cl_salv_wd_function.
**First button
CREATE OBJECT lr_buttonui1.
lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
button1->set_editor( lr_buttonui1 ).
**Second button
CREATE OBJECT lr_buttonui2.
lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
button2->set_editor( lr_buttonui2 ).
How can I overcome this??
Thanks
EshwarHi Eshwar,
The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
**First button
CREATE OBJECT lr_buttonui1.
lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
button1->set_editor( lr_buttonui1 ).
**Second button
CREATE OBJECT lr_buttonui2.
lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
button2->set_editor( lr_buttonui2 ). -
How to add push button in application tool bar in SAP transaction VA01
How to add push button in application tool bar in SAP standard transaction VA01 and how to implement the code for that function code.
There is no scope to create a push button in application tool bar. Instead of that we can add in a menu bar.
Maybe you are looking for
-
Indexing of encrypted disk images permanently disabled in 10.8?
In the past, I've had no trouble forcing Spotlight to index my encrypted disk image, using the command in Terminal: sudo mdutil -i on /Volumes/Encrypted_Data After entering that command, my encrypted disk image was indexed and searchable using Spotli
-
How do I include images in text as zoomable thumbnails in a pdf file?
I have Adobe Acrobat X Pro, and MS word, which is my usually set up for pdf files. I to write an essay that is limited to 2 pages, to save space, I want to create a clickable thumbnails in the text, that will simply display a full picture when I clic
-
Is there a way to connect my Ipod classic to a Samsung Tv to watch videos AND play my music? Does the new Apple dock work with Samsung?
-
Error on using CLOB in Report's PL/SQL Editor
Hi Guys, I am using the Reports 9i (2.9.0.1.0) and using a field in Format Trigger to check is null or not. Field's datatype is CLOB. I am getting error on using this field in PL/SQL Editor otherwise data is showing on Layout Editor nicely. Does CLOB
-
How to do you hide bullets in Keynote?
You need bullets to control special insertion effects for each section of text. How do you hide the bullets so they are not seen, but are still there for the program to act upon.