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.
Similar Messages
-
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] -
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 disable the button???
Hi, guys.
I searched the forum, but did not find anything about disabling the button. There are examples of disabling text areas... But when i tried to implement same technics to disable a button, it did not work.
I have a page with two regions items region and buttons region. When page opens i want to check if P1_TXT_BOX in items region is empty and if yes, disable button P1_CMD_DOTHIS in buttons region. And then onBlur for P1_TXT_BOX, if it is not empty - enable the button.
Pls, help...
Thnks.
MikeHi,
I have always struggled with buttons and javascript in APEX because of the way it generates the buttons (as a "button" not "submit").
A way round it would be to create the buttons using html then disabling the accept button:
<input type="submit" id="P1_DOWNLOAD" value="Download" onclick="swapButtonStatus();" />
<input type="submit" id="P1_ACCEPT" value="Acc" onclick="swapButtonStatus();" />
<script>
document.getElementById('P1_ACCEPT').disabled="true";
</script>
You just need to put them in the region footer or somewhere applicable.
And use the following javascript function in the HTML Header:
function swapButtonStatus()
var downloadButton = document.getElementById('P1_DOWNLOAD');
var acceptButton = document.getElementById('P1_ACCEPT');
if(acceptButton.disabled=="")
downloadButton.disabled="";
acceptButton.disabled="true";
//you can submit the button using: then create a process that
//runs when request=Accept
doSubmit('Accept');
else if(downloadButton.disabled=="")
acceptButton.disabled="";
downloadButton.disabled="true";
//you can submit the button using: then create a process that
//runs when request=Download
doSubmit('Download');
Hope this helps
Graham. -
Create button to application toolbar in report
Hi,
May i know how to create new button name continue near the save button or print button at the application toolbar?
Any suggestion ???HI,
For creating a new button, write the name of the button on the tool bar for ex. &CONTI.
Double click on it, and choose the icon and function text ofr it.
Save and activate the menu.
Your button gets created in the menu.
Declare the variable in your program with the code for continue.
Here's an example,
form set_pf_status using rt_extab type slis_t_extab.
set pf-status 'ALV_MENU'.
endform.
form user_command using p_ucomm type sy-ucomm
data : vbeln type vbeln_va.
case p_ucomm.
when '&CONTI'.
ENDCASE.
Regards,
Pritha.
Reward if helpful. -
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 -
How to disable the starting application on the MPB
hi guys,
Please help me on how to disable the automaic starting application on my MPBSystem Preferences / Users & Groups / Startup items button.
Delete those you don't want to launch at start up. -
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. -
Disabling the button in a form
Hi,
May i know how to disabling the button in a form based on value of item in same itself. For eg: In a form an Select list item called 'Flag' which holds the values like Y and N. If Flag is N means the Button called 'Check' will be disable otherwise no need to disable the button 'Check'. It is our requirement, please help me if any one know the solution.
Regards,
NeelHi Neel,
You could set the conditional display of the button based on a Plsql function returning a boolean.
Something along the lines of:
IF :P1_ITEM = 'Some Value' THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
This will not display the button at all unless the P1_ITEM is equal to the value that you want.
This is the simplest form that will get you going. If you want to "grey out" the button to leave it visible but disabled then you would need to investigate this a little further. I have seen some other threads that would probably help you out here but am no exert on javascript so just have a poke around.
Hope this helps,
Mike C -
Disabling the Button in Ap invoice through custom pll
Hi
i have done one customization in ap invoices , such way that
in supplier screen --> organization tab--> created the DFF for the supplier limit say 4000
now in ap invoices screen, now i creating the PREPAYMENT, if the amount exceed that 4000, it will create hold, i written code for that
now my problem is in HOLD TAB Release button is there,
my requirement is RELEASE BUTTON SHOULD BE DISABLED until the until the amount is not rectified.
in custom pll
if form_name = 'APXINWKB' then
if block_name = 'AP_HOLDS' then
if event_name = 'WHEN-NEW-RECORD-INSTANCE' then
l_invoice_id := name_in('INV_SUM_FOLDER.INVOICE_ID');
l_release_hold :=xxcus.AKRUTI_PAYABLES_PKG.release_single_hold(l_invoice_id);
if l_release_hold = 1 then
fnd_message.set_string('Check the Advance amount enter greater than Supplier Limit or Advance amount greater than Purchase Order amount');
fnd_message.show;
set_item_property('APXHOLDS.AP_HOLDS_CONTROL.ACTION_BUTTON',ENABLED,PROPERTY_FALSE);
elsif l_release_hold = 0 then
set_item_property('APXHOLDS.AP_HOLDS_CONTROL.ACTION_BUTTON',ENABLED,PROPERTY_TRUE);
end if;
end if;
end if;
end if;
the release button is not diabling since in the AP INVOICES forms, HOLDS is IN OBJECT GROUPS of that form the HOLD forms is APXHOLDS, how to disabled the button,
it showing the message"'Check the Advance amount enter greater than Supplier Limit or Advance amount greater than Purchase Order amount"
but it is not disabling the buttonare you using 11.5.10? If you are why not try the personalization features?
-
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. -
Disable the buttons for creation using PFCG roles
Hi SAP Experts,
How to disable the buttons for creation using PFCG roles?
Regards,
JayaHi,
u have to write the code in <b>at selection-screen output</b> event
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF <b>P_PRINT</b> = 'X'. " this is radiobutton
IF screen-name = 'P_RANGE'.
SCREEN-INPUT = 0.
ENDIF.
modify screen.
ELSE.
IF screen-name = 'S_LFDAT-LOW'.
SCREEN-INPUT = 0.
ENDIF.
IF screen-name = 'S_LFDAT-HIGH'.
SCREEN-INPUT = 0.
ENDIF.
IF screen-name = 'S_WERKS-LOW'.
SCREEN-INPUT = 0.
ENDIF.
IF screen-name = 'S_WERKS-HIGH'.
SCREEN-INPUT = 0.
ENDIF.
IF screen-name = 'P_LIFNR'.
SCREEN-INPUT = 0.
ENDIF.
IF screen-name = 'S_BUKRS'.
SCREEN-INPUT = 0.
ENDIF.
modify screen.
ENDIF.
ENDLOOP.
Hope it helps.
Regards,
Sonika -
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 disable the maximize and minimize button of JDialog
How to disable the maximize and minimize button of JDialog. I have an application which has JDialog box, but in that i should not have maximize and minimize button.If any one come across this problem and got a solution please helpout me.
Btw, isn't it a little strange to ask thisquestion...
Actually, I thought it was meant to be sardonic...
Dialogs don't have those buttons, so the question
n should be to the OP how did he/she get them in the
first place? Cuz they aren't using JDialog to do it,
unless it's something to do with a specific look &
feel.I somehow missed that, good point :-) -
How to disable the 'Change - Display' Button in Cluster via SM34 ?
Hi
I have a View Cluster maintained with a transaction wich calls SM34 passing it the Cluster.
I need the dialog be only in display mode, so i'm looking for a way to disable the button Change<->Display.
Does somebody knows how can i do this ? maybe with an event, the button does not appears or well making the button does not change the display mode (does not change the field VIEW_ACTION siwtch from 'S' to 'U')
Thanks in advanced
FrankHi Frank,
On SAP 4.7 Version
1). Goto SHD0
2). Enter the transaction code as SM34
3). ENter the transaction Variant as say ZSM34
4). Click on the create button --> this will take you to the sm34 screen. If you want to default some value or disable something on this screen just hit enter on this screen. You will get a popup window to select and restrict.
5). You can further go to next screen and deactivate the menu. On the popup screen you will get a button MENU FUNCTIONS.
Hope this helps
Cheers
VJ
Maybe you are looking for
-
HT201303 Random Apple id password resets - how to stop this?
A couple of months ago I started getting emails from Apple titled "How to reset your Apple Id password" and then more worryingly "Your Apple Id password has been reset". This happened several times over the next few days and I know this was not done
-
How to enter a floating value in a custom table.
hello guys, I have created a custom table, the table has a field of type fltp(floating type) now when i create a maintanence genrator, this field is not displayed in the maintenance generator screen. Can any one suggest me what is the reason ? also h
-
Filter warning and ascii save error
Hello, I am performing modal analysis using a impact hammer, USB NI 9233 cRIO DAQ and Sound and Vibration assistant. The steps have been set in Signal express as DAQ Acquire =>Trigger=>Filter=> Power spectrum => FRF => Save to Ascii. I am f
-
Problem with Copy To/Browse for Folder
Don't know when it started doing this, but now when I right-click and select Copy To and select Browse for Folder it only shows me folders that are under my W7 user name. I need to get to my external drive, but it doesn't display Computer. Strange an
-
Where the heck is theAutomation Mode pop-up menu
sorry, I can't even begin to do the most basic mixing, because I can't find the Automation Mode pop-up menu. They say it is above the pan control, but no it's not anywhere! And the manual assumes you see it but... it's not there. Stupid question, sor