Disabled ToolBar Buttons

Hi Folks ,
how can i eanble/disable a toolbar button insted of using exclude table ?

hi,
chk this sample.
REPORT  z_test_interactive NO STANDARD PAGE HEADING.
DATA: BEGIN OF it_one OCCURS 0,
      vbeln LIKE vbak-vbeln,
      erdat LIKE vbak-erdat,
      END OF it_one.
DATA: BEGIN OF it_two OCCURS 0,
      vbeln LIKE vbak-vbeln,
      posnr LIKE vbap-posnr,
      END OF it_two.
DATA: BEGIN OF it_code OCCURS 0,
      okcode LIKE sy-ucomm,
      END OF it_code.
DATA: fld(20), val(10).
START-OF-SELECTION.
  SET PF-STATUS 'STATUS'.
  SELECT vbeln
         erdat
         FROM vbak
         UP TO 100 ROWS
         INTO TABLE it_one.
  IF sy-subrc = 0.
    SORT it_one BY vbeln.
    SELECT vbeln
           posnr
    FROM vbap
    INTO TABLE it_two
    FOR ALL ENTRIES IN it_one
    WHERE vbeln = it_one-vbeln.
  ENDIF.
  LOOP AT it_one.
    WRITE:/(10) it_one-vbeln,
           (10) it_one-erdat.
  ENDLOOP.
AT LINE-SELECTION.
  IF sy-lsind = 1.
    it_code-okcode = 'FCODE1'.
    APPEND it_code.
    CLEAR it_code.
    it_code-okcode = 'FCODE2'.
    APPEND it_code.
    CLEAR it_code.
    SET PF-STATUS 'STATUS'  EXCLUDING IT_CODE.    GET CURSOR FIELD fld VALUE val.
    IF fld = 'IT_ONE-VBELN'.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = val
        IMPORTING
          output = val.
      LOOP AT it_two WHERE vbeln = val.
        WRITE:/ it_two-vbeln,
                it_two-posnr.
      ENDLOOP.
    ENDIF.
  ENDIF.
AT USER-COMMAND.
  CASE sy-ucomm.
    WHEN 'BACK1' OR 'CANC1' OR 'EXIT1'.
      IF sy-lsind = 2.
        SET PF-STATUS 'STATUS' .
        SET USER-COMMAND 'BACK'. "this is the trick to go back to first list
      ENDIF.
      IF sy-lsind = 1.
        LEAVE TO SCREEN 0.
      ENDIF.
  ENDCASE.
rgds
anver
pls mark hlpful answers

Similar Messages

  • Is it possible to disable a button in the Headstart 6i Toolbar/smartbar?

    In a master/detail form, which I'm developing, I want to disable
    the Create Record button in the Toolbar the moment I enter the
    detail block.
    I've tried using QMS$TOOLBAR.DISABLE_BUTTON in the WHEN-NEW-
    BLOCK-INSTANCE, but that wouldn't work.
    I'm using Headstart 6i.
    Can somebody tell me if it's possible to disable the buttons and
    if so, how?
    Regards,
    Ivo Hensgens

    Yes, you can disable a button on teh smartbar.
    You do this by disabling the associated menu item.
    Use: QMS$MENU.DISABLE_ITEM or QMS$FORM_FUNCTION.DISABLE.
    (See page 14-9 en 14-10 of the User Guide)
    In your case you can use:
    QMS$FORM_FUNCTION.DISABLE('CREATE_RECORD');
    By the way: there is now a seperate forum for Headstart.

  • How to disable statdard application toolbar button in O4TFN using BADI

    Hi,
    I want to disable standard application toolbar button in O4TFN using BADI, i want to disable it for specific users should be deactivated and for others it should be activated.
    Thanks in advance..

    Hi Ed,
    But in control panel -> user accounts -> Change user account control settings
     I can set the settings to always notify
    and default notify when programs try to make changes to computer.
    But I can't set it to never prompt because only administrator as power to do that and if I set never prompt in  administrator account the settings in standard user remains in
    always notify.
    so please let me know, if there is any other way to over come the problem.
    Main problem is application from unknown source always prompt for admin password.
    I need to disable it from prompting for admin password to run applications in standard accounts.

  • Disable save button in toolbar in offline form

    Hi to all !
    I am facing a wierd problem in my  adobe interactive offline form.
    I have added a save button in my offline form . I have added  validation script on this button.
    Hence I want the user to use this button only.So I want to disable the save button  that comes in the adobe reader for every user of this particular form.
    i know that their is a similar functionality for wd adobe form but i am creating an offline form, and i do not know how to disable the button in this case.
    So please help me

    Hi Kuldip,
    if you're trying to hide the Save Button in the Adobe toolbar, then you can place the following code in the wdDoModifyView method to hide the whole toolbar.
    // Get interactibe form handler.
            IWDPDFDocumentInteractiveFormHandler iFormHandler = WDPDFDocumentFactory.getDocumentHandler(wdThis.wdGetAPI(), "<name of your form>");
    //     Get appearance setter. 
          IWDPDFDocumentAppearance appearance = iFormHandler.getDocumentContext().getAppearance();
         // Hide menu bar.
         appearance.hideMenuBar(true); 
         // Hide tool bars.
         appearance.hideToolBars(true);
    hope this helps,
    harman

  • 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.

  • Enable disable toolbar items on click on any checkbox,radio button,text box.

    Hi Friends,
    I am create application in eclipse RCP E4 and now i am trying to Enable disable toolbar items on click on any checkbox, radio button, text box .
    Please Help me friends....

    Hello friend my proble is solve and now i am sharing my solution ....
    I am create RCP application and view side any listener click event fire time apply this code
    IEvaluationService evaludationService = (IEvaluationService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IEvaluationService.class);
    evaludationService.getCurrentState().addVariable("noOfRowsChecked", noOfRowsChecked);
    evaludationService.requestEvaluation("com.jobsleaf.propertytester.canDeleteItem");
    and add plug in extension and create property tester class means listener property tester class side apply this code
    IEvaluationService ws = (IEvaluationService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IEvaluationService.class);
    Integer integer = (Integer) ws.getCurrentState().getVariable("noOfRowsChecked");
    if (integer != null)
    if (integer.intValue() > 0)
    return true;
    I hope useful above code when use property tester in eclipse RCP

  • How to disable Print button on WebDynpro ABAP ALV

    In WebDynpro ABAP, a standard menu appears around the ALV,  that has a PRINT button and an EXPORT button.
    Is there anyway to disable those buttons????
    Thanks
    John

    Hi John,
    Check the interface if_salv_wd_std_functions. It contains methods which are used to hide the standard ALV toolbar buttons.
    Also refer : Removing "print version" button in alv
    How to hide Print and Filter option from dynamic ALV

  • Plug-in toolbar button activation question

    I'm not a plug-in developer and do not foresee becoming one, but I am trying to understand how Acrobat handles custom toolbar buttons that you add via JavaScript.
    Im interested in the cEnable parameter that you can specify when using app.addToolbarButton. With it, you can specify a JavaScript expression that sets the value of event.rc to true or false to control whether the toolbar button is enabled or not. What Im trying to understand is when, exactly, does this expression get evaluated? In my testing, it seems as though it is triggered continuously, but I dont know what particular event(s) triggers it. It is not documented in the Acrobat JavaScript reference.
    I tried reading through the plug-in related documentation in the SDK to see if I could figure out what event a plug-in would be likely to register for if it needed to be able to disable its toolbar button(s), but came up empty. If a plug-in wanted to disable a toolbar button in a similar manner, what event(s) should it be listening to?
    What is Acrobat using to trigger the evaluation of the code specified with the cEnable parameter for app.addToolbar button? Speculations are welcome if not known.
    Thanks,
    George

    > In that case the cEnable code is run when the button loads and each time a document is opened/closed in that view pane.
    It's not just limited to that. Whatever event it is, it seems as though it is continually triggered. For example, if I set the cEnable code to be based on the value of a global variable, the button is affected immediately after I alter the global variable:
    cEnable: "event.rc = global.myVar;"
    Then, in the JavaScript console, if I execute:
    global.myvar = false;
    my button immediately becomes disabled. Something must trigger it, and I'm suspecting it's related to the ECMAscript/Forms plug-in and may not be an event that other plug-ins can be notified of.
    George

  • UI: Toolbar - (F?)AQ about toolbar button activation and usage

    <b>Q:</b>
    How can I add functionality of the two SAP toolbar buttons shown on the screenshot?
    <b>Reply:</b>
    Please note that the clicks on the toolbar buttons are translated into MenuEvents!
    I.e. if the button is active at the time you want to use it - just declare a MenuEvent handler for it... (find the Menu ID e.g. in the UI help - or from version 2005 on through hovering over the corresponding menu item).
    If the toolbar button is inactive - activate the corresponding menu item first.
    Please note that you cannot:
    - add or remove toolbar buttons (you can just disable them)
    - add or remove top level menu items

    Just a FYI

  • How does one disable a button in the web UI?

    How does one disable a button in the web UI? I am trying to disable the edit button in the web UI for Accounts. What are the steps to take in order to accomplish that?

    Hi Abdul,
    Locate the Toolbar group group for that application. It should be ACC_OIC01 in your case. You can deactivate a specific button (event) under the toolbar group.
    Regards,
    J.Prabananth

  • Disabling toolbar in browser

    i have to disable the toolbar in the browser when the application is running.ie back and other buttons.
    can this be done. i don't know java script or jsp much as i'm a beginner.
    does it require java script or jsp. i have a java script code but i dont know how it works. can any body help me please.
    code goes here:
    <html>
    <body>
    <SCRIPT LANGUAGE="JavaScript">
    window.open('x. htm','newWindow','height=768,width=1024,toolbars=n
    o,scrollbars=yes,resizable=yes');
    window.opener = top;
    window.close();
    </SCRIPT>
    </body>
    </html>
    please tell me whether this works or is there any other method.
    thanks

    x.htm is the webpage that you want to open in the new window.
    Replace that with whatever you wish.
    However, you can not completely stop people using the browser toolbar buttons. A simple ctrl+N will open up a new window, with the same URL, and the buttons available.

  • Adding toolbar buttons in the beginning

    Hi Experts,
    Can somebody tell me how to add my own toolbar buttons in ALV in the beginning.
    When i am adding buttons using the event handler class it is adding the buttons only at the end. I want the buttons in the very beginning.

    Hi Aditya,
    I am adding toolbar buttons using the below method.
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_toolbar.
        DATA: ls_toolbar  TYPE stb_button.
    append a separator to normal toolbar
        CLEAR ls_toolbar.
        MOVE 3 TO ls_toolbar-butn_type.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    append an icon to create new skills
        CLEAR ls_toolbar.
        MOVE 'CREATE'(000) TO ls_toolbar-function.
        MOVE icon_create TO ls_toolbar-icon.
        MOVE 'Create Detail'(001) TO ls_toolbar-quickinfo.
        MOVE ' ' TO ls_toolbar-disabled.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    append an icon to change existing information
        CLEAR ls_toolbar.
        MOVE 'CHANGE'(003) TO ls_toolbar-function.
        MOVE icon_change TO ls_toolbar-icon.
        MOVE 'Change Detail'(004) TO ls_toolbar-quickinfo.
        MOVE ' ' TO ls_toolbar-disabled.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    append an icon to display information
        CLEAR ls_toolbar.
        MOVE 'DISPLAY'(006) TO ls_toolbar-function.
        MOVE icon_display TO ls_toolbar-icon.
        MOVE 'Display Detail'(007) TO ls_toolbar-quickinfo.
        MOVE ' ' TO ls_toolbar-disabled.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    append an icon to delete information
        CLEAR ls_toolbar.
        MOVE 'DELETE'(009) TO ls_toolbar-function.
        MOVE icon_delete TO ls_toolbar-icon.
        MOVE 'Delete Detail'(010) TO ls_toolbar-quickinfo.
        MOVE ' ' TO ls_toolbar-disabled.
        APPEND ls_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.                    "handle_toolbar

  • How to Disable Save Button in interactive form via sfp

    Dear,experts
    My requirement is that Disable Save Button in interactive form via sfp .Is there any options to do this or write Javascript/Formcalc.Please help!
    Thanks
    Vince.

    I found a adobe documentation that says that If you want to disable some toolbar buttons, you will have to use application-level Javascript. Looks like it is not possible from ADLC
    Place the following Javascript code inside a .js file in
    %ProgramFiles%\Adobe\Reader 9.0\Reader\JavaScripts   to disable the toolbar buttons:
    // [File - Create Adobe PDF Using Acrobat.com], plus toolbar button
    app.hideMenuItem("WebServices:CreatePDF");
    app.hideToolbarButton("Weblink:CreatePDF");
    // [File - Collaborate], plus toolbar button
    app.hideMenuItem("Annots:FileCollaboration");
    app.hideToolbarButton("Annots:CollabToolButton");
    app.hideToolbarButton("CommentTask");
    app.hideToolbarButton("SigTaskButton");
    app.hideToolbarButton("SaveFileAs");
    app.hideToolbarButton("Save");
    Regards
    Sandy

  • Disable 'SAVE' button on 'FILE' menu on some forms using personalization

    Hi there,
    I need to disable 'SAVE' button on 'FILE' menu on some forms using personalization. Please let me know if you know how to do this. Currently we have done this through custom.pll and we are trying to phase out custom.pll. Any help is appreciated.
    thanks
    Sudeep

    whether i know u cannot disable SAVE toolbar through Personalization. You do it with custom.pll.
    CHECK FOLLOWING LINK
    Disable Save item from Contrl Menu
    Pradhyumn Sharma

  • Enable User Defined toolbar button on click -  editable alv grid using oops

    Hi all,
    I  have created editable alv using  oops concept.
    created 2 user defined toolbar button save and print using method toolbar
      ls_toolbar-text      = 'Print'.                         "#EC NOTEXT
        ls_toolbar-quickinfo = space.
        ls_toolbar-checked   = space.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    requirement is
    initially print button should be disabled, and save enabled
    when i click save button, print button should be enabled.
    I want coding in editable alv oops concept
    kindly help
    regards
    senthil kumar

    Halo Senthil,
    You should call set_toolbar_interactive method of cl_gui_alv_grid in the on_user_command( ie the event handler for event user command) .
    method on_user_command.
    case e_ucomm.
    when 'SAVE'. or whatever your function code is .
    my_save_flag = 'X'.
    call method grid->set_toolbar_interactive.
    endmethod.
    This triggers the toolbar event of the
    cl_gui_alv_grid. Inside the eventhandler method ( ie the on_toolbar method ) you should set the toolbar.
    if my_save_flag = 'X'.
    read table e_object->mt_toolbar
    clear l_toolbar-disabled.
    modify e_object->mt_toolbar.
    endif.
    e_ucomm will not have  the function code if the save button is not in the toolbar area.
    then you can set the my_save_flag in the data_changed event handler of the Cl_gui_alv_grid.
    Regards
    Arshad

Maybe you are looking for