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

Similar Messages

  • Adding a Button to the Sales Order screen

    Good Day
    Experts:
    I have added a button to the SalesOrder screen with help from a previous post here on the forum.  The button was lined up with the others that were already exisitng on the screen.  Recently, I have encountered a problem with it.  When the SalesOrder screen is run on a different machine,  the button is almost not visible.  It appears there is some kind of issue with the screen resolution just for this button. 
    Do I have to do something special with this button when it is shown on the screen to get it to remain in line with the existing buttons?
    Thanks,
    EJD

    Hi Ed
    Are you setting the button in relation to the surrounding existing objects?  Like for instance ...
            Dim oButton As SAPbouiCOM.Item = oForm.Items.Item("2").Specific 'Cancel button
            Dim oNewButton As SAPbouiCOM.Button
            Dim oNewItem As SAPbouiCOM.Item = oForm.Items.Item("Test") 'your new button or control
            With oNewItem
                .AffectsFormMode = True
                .Left = oButton .Left  + oButton.Width ' notice how button is positioned based on  existing one
                .Top = oButton .Top
                .Width = oButton.Width
                .Height = oButton.Height
                .FromPane = oButton.FromPane
                .ToPane = oButton.ToPane
                .TextStyle = intTextStyle
                oNewButton = .Specific
            End With
            With oNewButton
                .Caption = strCaption
            End With
    Message was edited by:
            Neftali Figueroa
    Message was edited by:
            Neftali Figueroa

  • Adding custom buttons to the Rich Text Editor in CQ

    Hi,
    I have added custom buttons to the rich text editor in order to allow our editors to add specific content, such as popovers, custom videos and other data necessary data.
    I have successfully modifed the Rich Text editor so, that it includes the custom buttons in the actions panel.
    I have also managed to make the buttons work and include the data where necessary, when user highlights the text and clicks on a certain button.
    The last bit I am struggling with, is the visual feedback we give to the users when this text has associated action with it.
    E.g. when we select this text and make it bold when we click on the word B the button B becomes highlighted in the actions panel, later when we continue typing our text and click again on "bold" the letter B becomes highlighted again.
    Is there any button related callback/method I could overwrite to add this functionality and make my button highlighted ?
    Thanks,
    Puzanovs

    After lot's of thinking found a solution....
    Essentially the first step is to extend the CQ.form.rte.plugins.Plugin in your custom button.
    Then during the UI initialisation we create our "custom"
    var pressButton = new ui.TbElement("press-button", this, true,this.getTooltip("press-button")); // Essential extend of the button
    setInterval(function() {
                     if(window.jQuery) {
                         window.jQuery(document).ready(function () {
                             window.jQuery(".x-edit-glossary-insert").css({width:45,"background-image":"none"}); // Ignore the background
                             window.jQuery(".x-edit-glossary-insert").text("Press Button"); // Set the name
                            $(document).on({
                                mouseenter: function(){
                                  window.jQuery(".x-edit-glossary-insert").html("<b>Press Button</b>"); // Set the name bold                        
                                mouseleave: function(){                       
                               window.jQuery(".x-edit-glossary-insert").html("Press Button"); // Set the name normal
                             }}, '.press-button');
                 }, 100);
    tbGenerator.addElement("press-button", plg.Plugin.SORT_LISTS, pressButton, 10); // element is inserted
    Every time the element is inserted I add the following html
    <span class="press-button">Test peter</span>
    Now, every time in the editor, the content editor mouse overs the custom button it is higlighted in the RTE))

  • Adding a button to the toolbar

    I am having some trouble with a custom toolbar button. I add the button in a Reader plug-in with no problems:
    > //Create a AVIcon object
    > AVIcon myIcon = (AVCursor)LoadBitmap(gHINSTANCE, MAKEINTRESOURCE(Save_BMP));
    > //Create a new button
    > AVToolButton MyButton = AVToolButtonNew (ASAtomFromString("Test"), myIcon, FALSE, FALSE);
    AVToolButtonSetHelpText(MyButton, "Test tooltip");
    > //Retrieve the File toolbar
    > const char * toolbarName= "File";
    > AVToolBar ToolBar = AVAppGetToolBarByName(toolbarName);
    > //Attach the button
    > AVToolBarAddButton(ToolBar, MyButton, FALSE, NULL);
    However, if a user has customized the toolbar eg. with e-mail and search buttons, my custom button only shows up in the first instance of Reader. If the user opens a second PDF document, the button is not visible in the new Reader window.
    I have tried removing the button and adding it again, but this results in two buttons in the first instance and a single button in the second instance.
    Should I add the button in another way to solve this? Using a javascript file perhaps? I have experimented with a trusted function in a .js file, but I could not figure it out - nor find a fitting example.

    Hi,
    1. create GUI status with "Status" name and "Short text"
    2. Now a screen will appear with the following,
       a. Menu Bar
       b. Application tool bar
       c. Function keys
    3. Click the down arrow near the application toolbar
    4. Enter the function code like SAVE, EXIT, etc., You 
       can also give ur own meaningful naming convention .
       For example ( ZTEST)
    5. Now press enter, it will ask for "Static text" or "Dynamic Text". Choose Static text and press enter
    6. Now it will ask for function text and Icon name. Specify some function text ( what it does ) and Icon name u want to attach.
    7. Press enter. It will ask for function keys. Specify a function key and press enter.
    8. Now u can handle this function code (ZTEST) either in PBO/PAI like IF FUNCTION = ZTEST ...ENDIF
    Note:
    Don't forget to set the GUI status u have created in PBO event.
    Example code to set PF status.
    PROCESS BEFORE OUTPUT.
      MODULE liste_initialisieren.
      MODULE setstatus_0100.
       LOOP AT extract WITH CONTROL
       tctrl_ztufi_league CURSOR nextline.
        MODULE liste_show_liste.
      ENDLOOP.
    In the above MODULE setstatus_0100 do the following,
    SET PF-STATUS 'ZGUI'. ( The GUI status u have created).
    I hope this helps you.
    Regs,
    venkat

  • Adding a Button in the Application toolbar when using LDB for HR programs

    Hi Experts,
    I have a requirement to add a new button after execute button in the Application tool bar for the HR programs when using LDB PNP.
    Normally when we are using LDB in our program we will get a extra button provided by SAP after the execyte button.          When we are creating a new button for this  by using the table fields sscrfields  with the function key as 2 we are not able to see the new button.
    can any one help me in this issue.

    please post your relevant coding with respect to the button
    A.

  • Adding a button before the TOC button in a WebHelp Pro navigation bar

    My client wnats to add a "Home " button to the left of the TOC button in the navigation bar. I can ad buttons to the right of the "standard buttons": TOC, Search, Print, and Glossary, but even if I go and edit the skn file and add the "Home" botton before the TOC one, it still displays to the right. Is there anything I am missing?
    Thanks.
    Using RoboHelp 9 and Robohelp Server.
    Thanks

    Hi,
    I don't have RH Server, so this is a bit of a guess but I think one method will work.
    Modify the toolbar order in whstart.js.
    1. In whstart.js, go to line 184 (RH10), it has the text else if (nMsgId == WH_MSG_TOOLBARORDER).
    2. Below the opening bracket add the following code:
    oMsg.oParam = "CUSTOM|toc|glo|idx|fts|blackblock|searchform|banner";
    return false;
    3. Open whskin_tbars.htm and go to the bottom of the file to find a few calls starting with addButton.
    4. Copyt the id of the button (customxxxx) and replace the text CUSTOM in whstart.js.
    Modify whskin_tbars.htm
    1. Open whskin_tbars.htm
    2. Go to the bottom of the file and find a few calls starting with addButton.
    3. Set the lines in the order you want the buttons to appear. (Don't forget the 'blankblock' button to push certain content to the right of the toolbar.
    4. Remove the call to the function ReSortToolbarButtons() from the file whskin_tbars.js.
    If WebHelp does still resort the buttons, try adding return false; as the first code in the function ReSortToolbarButtons() in the file whtbar.js
    Hope this helps,
    Greet,
    Willam

  • Decision popup on click of a custom toolbar button during the call

    Hi,
    I created a custom button in the CTI toolbar to open up a decision popup. The popup opens fine when i am not in the call whereas if i am in a call the popup doesn't open.
    Is this the standard behaviour? If that is the case is there any workaround to open a popup during the call?
    Thanks
    Selvan

    IF param1-value EQ 'ZPOPUP'.
          DATA lo_popup TYPE REF TO if_bsp_wd_popup.
          lo_popup = me->comp_controller->window_manager->create_popup_2_confirm(
                                iv_title          = 'Test Popup'
                                iv_text           = 'Test Popup'
                                iv_btncombination = if_bsp_wd_window_manager=>co_btncomb_yesno ).
          lo_popup->open( ).
          RETURN.
        ENDIF.

  • Popup on click of a toolbar button during the call

    Hi,
    I created a custom button in the Interaction center toolbar to open up a decision popup. The popup opens fine when i am not in the call whereas if i am in a call the popup doesn't open.
    Is this the standard behaviour? If that is the case is there any workaround to open a popup during the call?
    Thanks
    Selvan

    IF param1-value EQ 'ZPOPUP'.
          DATA lo_popup TYPE REF TO if_bsp_wd_popup.
          lo_popup = me->comp_controller->window_manager->create_popup_2_confirm(
                                iv_title          = 'Test Popup'
                                iv_text           = 'Test Popup'
                                iv_btncombination = if_bsp_wd_window_manager=>co_btncomb_yesno ).
          lo_popup->open( ).
          RETURN.
        ENDIF.

  • Adding a button to the Open Items List

    Hiya everyone,  I am trying to add a button to the Open List Items form (formType - 152) which is located in Reports -> Sales & Purchasing -> Open Items List.  When I attempt to add a button to that particular form it does not appear.  The only form I seem to be be able to add a button to is on the main menu.  I have added my code below:
    Private Sub CreateMySimpleForm()
            Dim oItem As SAPbouiCOM.Item
            Dim oButton As SAPbouiCOM.Button
           oForm = SBO_Application.Forms.ActiveForm
            oItem = oForm.Items.Add("80", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 6
            oItem.Width = 65
            oItem.Top = 51
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "View Document"
        End Sub
    Has anyone got any ideas.....Thanks

    I have discovered that the button appears if the Open List Items window is open when I run my code so the button can actually appear on that form.  However, how do I change this line :
    oForm = SBO_Application.Forms.ActiveForm
    so that it specifies that the button will appear only on the Open List Items form.  When I change that line to:
    oForm = SBO_Application.Forms.GetForm("152",1 )    ....it keeps on complaining that it cannot find that form. 
    I'm not sure what the Count is supposed to be in:
    GetForm(Type As String, <b>Count</b> As Integer) 
    If anyone could help me out I would be grateful.....Thanks

  • Can you adjust the height of the toolbar button in the skin file?

    Can I manually adjust the height of the toolbar navigation buttons in the skin file? It seems no matter how tall I make the nav panel, the buttons adjust size accordingly. Can I tell it to be 50% or something like that? For example, this is what I see for the glossary button.
    <toolbaritem mode="BtnWithIcon Mode" type="built-in-glossary" id="4">
       <name>Glossary</name>
       <text>::??DefaultWebSkinText??::</text>
       <color></color>
       <image></image>
       <icontype>none</icontype>
       <selected>
        <color></color>
        <image></image>
        <icontype>none</icontype>
       </selected>
       <style>100</style>
      </toolbaritem>
    Notice I am not using custom images or anything, just plain text.
    Thanks

    Hi Josh
    You must be someone that dearly loves digging into code.
    The simplest way to adjust the buttons is to use the built in Skin Editor.
    Hmmm, and in writing that response it occurs to me that you haven't exactly advised which of the outputs you are creating. The skin editor I'm referring to is the WebHelp skin editor. To open it, click View > Pods > Project Set-up. Once that pod is open you should see the Skins folder. Expand that and double-click the skin you are using to open and edit it using the skin editor.
    Cheers... Rick

  • How to remove the delete and edit toolbar buttons from the Overview page

    Hi,
    In the account/contact overview page, we see that the interaction history assignment block does not support the EDIT and DELETE options.
    However, when we click on the hyperlink description of an activity in the interaction history, we get into the overview page of the activity. Here we can see the DELETE button and the EDIT button.
    Is there a way to remove these two options from the overview page of an activity which is in COMPLETED status and in the interaction history section?
    Please advice.
    Thanks & Best Regards,
    Ramesh.
    PS: We use CRM 5.2 Web UI.

    You can hide the box that shows the snippets and the "Restore Previous Session" box with code in userContent.css
    *http://kb.mozillazine.org/userContent.css
    *http://kb.mozillazine.org/Editing_configuration
    You can use the ChromEdit Plus or Stylish extension to have easier access to the customization files.
    *ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
    <pre><nowiki>@-moz-document url(about:home){
    /* hide snippet container on the about:home page */
    #snippetContainer { display: none !important; }
    /* hide sessionRestore container on the about:home page */
    #sessionRestoreContainer { display: none !important; }
    </nowiki></pre>

  • Why is Illustrator adding a slash to the beginning of all my exported artboard image file names?

    When ever I export my artboards as JPGs for my client to view Illustrator has recently started adding a slash to the front of the file name.
    For example, until a recent update my files would look like this when I exported them. As one would expect:
    artboard_image_01.jpg
    artboard_image_02.jpg
    artboard_image_03.jpg
    and so on...
    But now when I export it does this, even though there is no slash in the file name:
    /artboard_image_01.jpg
    /artboard_image_02.jpg
    /artboard_image_03.jpg
    and so on...
    I'm using Illustrator CC 2014 on a Mac running Yosemite 10.10
    Any thoughts? It's really annoying and driving me crazy.

    I noticed it immediately after updating to the latest version release of Illustrator CC, so I don't think it's the OS. If I need to step back to an older version I will, but I hoped there was a fix.

  • Adding a theme to the beginning of a slide show

    I created a slideshow in IPHOTO and sent it to IDVD+6. I picked out the theme "kids showtime" and tried to add it to the beginning of the slide show. It has one drop zone. I put one photo in the zone. When I preview-the theme plays over and over. I want it to play once and then have the slide show start. Any help would be appreciated.

    Any theme that has motion and music will repeat. No way to stop it after one cycle. And there's no way to automatically start the slideshow, unless you put it in the Autoplay well in Map... I don't think you want to do that.

  • Adding a button to the title bar

    I need to place a button in the upper-right corner of an NSWindow's title bar. In Interface Builder, I can place a button in the correct spot, but it is always beneath the title bar. To work around this, I'm currently using a subclassed NSWindow with a borderless mask and creating the title bar, including the stoplight buttons, from scratch.
    Is there a better way to do this or a way to re-order my button on top of a title bar? It seems like there should be a simpler way to achieve this effect.

    > Is there anyway to change what the window is called when
    it's
    > minimized?
    The name you type into the file properties is the name you
    will see when the
    file is minimized.
    Steve
    ACE - Adobe Community Expert, Authorware
    My blog -
    http://stevehoward.blogspot.com/
    Authorware tips -
    http://www.tomorrows-key.com

  • GridBagLayout  adding extra buttons on the second row

    Here is a classic example of GridBagLayout taken from javadoc. I wonder is there a way I can have "Button6b", "Button6c" and "Button7" added to the same row as "Button6" and "Button6a"?
    import java.awt.Button;
    import java.awt.Font;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.WindowConstants;
    public class ButtonsExample extends JPanel {
        protected void makebutton(String name, GridBagLayout gridbag, GridBagConstraints c) {
            Button button = new Button(name);
            gridbag.setConstraints(button, c);
            add(button);
        public void init() {
            GridBagLayout gridbag = new GridBagLayout();
            GridBagConstraints c = new GridBagConstraints();
            setFont(new Font("SansSerif", Font.PLAIN, 14));
            setLayout(gridbag);
            c.fill = GridBagConstraints.BOTH;
            c.weightx = 1.0;
            makebutton("Button1", gridbag, c);
            makebutton("Button2", gridbag, c);
            makebutton("Button3", gridbag, c);
            c.gridwidth = GridBagConstraints.REMAINDER; // end row
            makebutton("Button4", gridbag, c);
            c.weightx = 1.0;
            c.gridwidth = GridBagConstraints.RELATIVE; // next-to-last in row
            makebutton("Button6", gridbag, c);
            makebutton("Button6a", gridbag, c);
            makebutton("Button6b", gridbag, c); // I'd like this
            makebutton("Button6c", gridbag, c); // and this
            c.gridwidth = GridBagConstraints.REMAINDER; // end row
            makebutton("Button7", gridbag, c); // and this button to appear on one row
        public static void main(String args[]) {
            JFrame f = new JFrame("GridBag Layout Example");
            f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
            ButtonsExample ex1 = new ButtonsExample();
            ex1.init();
            f.add("Center", ex1);
            f.pack();
            f.setSize(f.getPreferredSize());
            f.setVisible(true);
    }

    Welcome to our community, Kristi
    As for why we aren't able to add buttons to Question Slides,
    only the Captivate developers know the answer. Perhaps there is a
    technical issue involved.
    About the only thing I can think of would be to insert an
    image of the buttons in a disabled state. At least that may provide
    some consistency for you.
    Cheers... Rick

Maybe you are looking for

  • Share only specific groups with users over cardDAV?

    OS X Server 3.2.2 I've successfully set up the Contacts server, but it appears that cardDAV syncing is an all-or-nothing prospect.  There appears to be no way to sync only select groups of contacts with select users or groups.  Instead, it appears yo

  • How can I cancel a download?

    I ordered the download of a TV series 'accidentally' (it was free!) without realizing how long it would take to download each video. Now I just want to stop this error permanently. How can I cancel a download from itunes? It keeps pausing but I don't

  • How do I make memo fields avalible via a Universe?

    How do I make memo fields avalible via a Universe? I have several memo fields in the table I want to publish via a universe except each time I build the universe and export it, all the fields are avalible except the memo fields. Any help would be app

  • Moving to a new Mac Pro

    I am retiring my old G4 workhorse. I don't plan to use Migration Assistant because: 1) I have read in these forums that there are issues/problems going from a PowerPC to an Intel machine, 2) I have picked up a lot of stuff over the years (2003 - 2009

  • I forget my answers of security question

    please help me i try more than 30 times