Adding custom button in standard toolbar in ALV

Hello All,
I need to add a customized button called "Copy" on ALV. The following code is giving me few standard buttons like "Append" "Delete" "Insert" etc. So, how can I add "Copy" button besides one of these standard buttons.
data: l_value type ref to cl_salv_wd_config_table.
data: lr_table_settings type ref to if_salv_wd_table_settings.
lr_table_settings ?= l_value.
lr_table_settings->set_read_only( abap_false ).
Appreciate help.
Thks & Rgds,
Hemal

Create One method
And inside that method write the below code
(Here i  am creating delete button you can create any name button you want just replace the name
  DATA lV_EDITBTN TYPE REF TO cl_salv_wd_fe_button.
  DATA lr_buttonui TYPE REF TO cl_salv_wd_fe_button.
  CREATE OBJECT lr_buttonui.
  lr_buttonui->set_text( 'Details' ).
  lr_buttonui->set_tooltip(
  'Shows Detail Screen as per the View selected' ).
Generating Function Object for Button.*
  DATA btn_button TYPE REF TO cl_salv_wd_function.
  btn_button = lo_value->if_salv_wd_function_settings~create_function(
                          id = 'DETAILS' ).
  btn_button->set_editor( lr_buttonui ).
  DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
After that create another method  and make it as a event ( it means now it become event )
select event ON FUNCTION FROM THE LIST
Inside that event   write
CASE LV_FCODE.
    WHEN 'DETAILS'.
       wd_this->fire_OP_TODEATILS_plg( ).
endcase.
May be it may help

Similar Messages

  • Adding custom fields to standard Asset Accounting  ALV reports

    Hello,
    I have recently added some fields to the Asset Master table ANLU using the customizing include CI_ANLU.  I have also added some fields using an append structure to ANLZ.  I now need to have these fields available in the standard reports for Asset Accounting.  One example is the report generated for transaction S_ALR_87011963.  I need the new fields available in the 'Displayed Columns' list when clicking the Change Layout icon.  Any suggestions?
    Thanks,
    JR

    Hi Vignesh,
    Adding new fields is not possible, but custom subscreens can be added.
    Check enhancements QQMA0001 (subscreen for notification header) and QQMA0008 (subscreen for additional data).
    It might help you.
    Thanks & Regards,
    Swati

  • 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

  • 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 push buttons in standard ALV

    Hi ,
    Is there any possiblity to add custom push buttons to standard ALV in Webdynpro for ABAP.
    If so, please provide me the solution.
    Thanks in Advance.
    cheers,
    sravan.

    I got the answer .

  • 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 custom button to Ribbon for custom list definition

    I'm trying to add a custom button to the ribbon, specifically for a custom list definition.  I have two custom list definitions, one for a document library (Type="11008") and one for a list (Type="10002").  
    I can use the following CustomAction to successfully add a button to the document library ribbon:
    <CustomAction Id="MyCustomAction.DocLib"
    RegistrationId="11008"
    RegistrationType="List"
    Location="CommandUI.Ribbon">
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.Library.Share.Controls._children">
    <Button
    Id="MyCustomAction.DocLib.Button"
    Alt="Help"
    Sequence="5"
    Command="SayHi"
    Image32by32Left="-64" Image32by32Top="-320" Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png"
    Image16by16Left="-64" Image16by16Top="-176" Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png"
    LabelText="Say Hi!"
    TemplateAlias="o1"/>
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler Command="SayHi" CommandAction="javascript:alert('Hi!');"/>
    </CommandUIHandlers>
    </CommandUIExtension>
    </CustomAction>
    If I try to do the same thing for my list, the button does not show up:
    <CustomAction Id="MyCustomAction.List"
    RegistrationId="10002"
    RegistrationType="List"
    Location="CommandUI.Ribbon">
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.List.Share.Controls._children">
    <Button
    Id="MyCustomAction.List.Button"
    Alt="Help"
    Sequence="5"
    Command="SayHi"
    Image32by32Left="-64" Image32by32Top="-320" Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png"
    Image16by16Left="-64" Image16by16Top="-176" Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png"
    LabelText="Say Hi!"
    TemplateAlias="o1"/>
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler Command="SayHi" CommandAction="javascript:alert('Hi!');"/>
    </CommandUIHandlers>
    </CommandUIExtension>
    </CustomAction>
    What am I missing that is keeping me from getting this button to show up in my List ribbon?

    Well, I debated just deleting my question, but I'll leave it up in case someone else runs into this.  My custom list definition for my list had <Toolbar Type="Freeform" />.  I don't remember why I changed that, but once I changed
    that back to <Toolbar Type="Standard"/> my custom buttons started showing up as expected.
    The answer
    here pointed me in the right direction.

  • Adding a button to standard OWL

    Hello Gurus,
    How do we add a custom button to the Accounts OWL and act on click of it?
    I see that the UI is not extensible like that.
    The requirement is to select a number of customers from the list and click the button. The button click should call an action on the account business object.
    Can we add an embedded component below the list, add a button and on click of that, call action on the BO. How do we get the selected rows (customer IDs)?
    Any suggestions are appreciated.

    Hi Mahesh,
    the Account-BO is not an ESF2-Object. Therefore you won't have the possibility to add an action on Account-BO. The action-feature is only available on ESF2-Objects (like Service Request, Activity etc.). -> a Button in an EC would be an option, BUT I am not sure, if it is even possible to get the selected rows from the standard.
    A more heavy aproach would be to build your own Account OWL and show this instead of the standard OWL. This would have much more dev. effort, but provides you all freedom for custom action. But you would need to rebuild all the standard functionality (I guess you cannot rebuild everything there from PDI).
    Best regards
    Tom

  • Adding Custom fields to standard  SAP-EBP application

    Hi,
    A functionality requires some custom fields to be added to the standard SAP-SRM EBP ( Manage business partners) application.
    If I copy the whole BBP_VENDOR_CREATE program into a Z-program, and the BBPMAININT internet service to a Z-application, then would it be feasible??
    Which is the best way to add custom fields in a SAP standard EBP application--in the 'Manage business partners' section.
    Regards,
    Goutam

    Hi
    I don't think it's easily possible to add custom fields to the existing transaction - BBPMAININT.
    For adding customer fields you can refer the SAP OSS not - 672960, but I don't think it will be of much help here.
    <b>Since SAP has not upgraded this transaction - BBPMAININT for a quite long time, you need to do all the logic and validation from your end.</b>
    <u>Better to go for you own Z (custom program) and make your logic accordingly.</u>
    Regards
    - Atul

  • Adding Custom buttons to ECL Viewer

    Hello Everyone,
    We have a requirement where I need to add a custom button on the Redlining section of the ECL Viewer. Like currenty, SAP provides tools like Drawing a line or Square or Rectangle and also Insert Image kind of functionality when doing Redlining. So, the question is in this section along with SAP buttons, can I add a custom button out there which helps to provide my own functionality like adding custom drawing tools?
    Please let me know if thats possible or does it requrie modifying some of the SAP DLL files.
    Thanks,
    Shashidhar.

    Dear Shashidhar,
    regarding your request I have to inform you that the ECL Viewer is developed by a third-party vendor company and so from SAP point of view there is no chance to enlarge the buttons for redlining in the ECL Viewer.
    Best regards,
    Christoph

  • IC_BASE, Page Fragments : root_content.htm adding custom code in standard .htm

    Hi All,
    I am adding custom code in Page Fragments : root_content.htm of bsp application : IC_BASE, for particular business purpose but after activating
    its asking to select page fragments. here its showing IC_BASE and etc.. could you pls guide me how to check which page fragment for this
    root_content.htm. and also i am adding custom code in mail.htm under page with flow logic of same bsp application. so here i am assuming page
    fragment is IC_BASE.
    Jimmi.

    Hi Jimmi,
    In General if you want to modify standard BSP component, you need to enhance the component first and then you need to enhance the particular view you want to modify. You can directly modify the .htm page in view after enhancement.
    Regards,
    Dharmakasi.

  • Adding custom buttons to crystal reports html viewer

    Hello,
    I'm using crystal reports for eclipse and I have a time chart in my report that is displayed with html viewer. I need a button bar to navigate on this chart e.g. the button which adds values to chart for the next month.
    Is it possible to add custom buttons to the button bar of crystal reports viewer ?
    Thanks in advance.
    Greetings,
    Nikolas

    Dear Shashidhar,
    regarding your request I have to inform you that the ECL Viewer is developed by a third-party vendor company and so from SAP point of view there is no chance to enlarge the buttons for redlining in the ECL Viewer.
    Best regards,
    Christoph

  • Adding custom buttons to JOptionPane

    Hi,
    I need to add custom buttons to my showMessageDialogue boxes.
    I know that
    JOptionPane.showMessageDialog
    (null, "message body", "message title", JOptionPane.YES_NO_OPTION,
    JOptionPane.INFORMATION_MESSAGE);displays an information box with a 'Yes' and a 'No' button. But how do I include three or more custom buttons on such a box?
    For example, I want to display an information message box with buttons: 'Auto', 'Prompt' and 'Never'.
    What if I want to mix orthodox buttons, with my custom buttons? For example, putting 'Auto', 'Prompt' and 'Cancel' in one information message box?
    Thanks,
    Hasanka.

    Use the last method for showMessageDialog. The options[] paremeter can take an array of Strings and return to you which button was pressed (by index).
    showOptionDialog
    public static int showOptionDialog(Component parentComponent,
                                       Object message,
                                       String title,
                                       int optionType,
                                       int messageType,
                                       Icon icon,
                                       Object[] options,
                                       Object initialValue)Brings up a modal dialog with a specified icon, where the initial choice is dermined by the initialValue parameter and the number of choices is determined by the optionType parameter.
    If optionType is YES_NO_OPTION, or YES_NO_CANCEL_OPTION and the options parameter is null, then the options are supplied by the Look and Feel.
    The messageType parameter is primarily used to supply a default icon from the Look and Feel.
    Parameters:
    parentComponent - determines the Frame in which the dialog is displayed; if null, or if the parentComponent has no Frame, a default Frame is used
    message - the Object to display
    title - the title string for the dialog
    optionType - an integer designating the options available on the dialog: YES_NO_OPTION, or YES_NO_CANCEL_OPTION
    messageType - an integer designating the kind of message this is, primarily used to determine the icon from the pluggable Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
    icon - the icon to display in the dialog
    options - an array of objects indicating the possible choices the user can make; if the objects are components, they are rendered properly; non-String objects are rendered using their toString methods; if this parameter is null, the options are determined by the Look and Feel.
    initialValue - the object that represents the default selection for the dialog
    Returns:
    an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the Dialog

  • Re :adding custom fields to standard transaction

    Hi ..
         I've added custom fields to vbap table..I have also
    added these fields in the va02 screen.
    Now whatever values I enter for the zfields(va02 ) must be saved in vbap table.
    How do i do this?.
    Should I write in MV45AIZZ .(PAI).
    what are the steps i have to follow?.
    Thanks and regards..
    tharun venkat

    zfield in the program means the corresponding field name u have given for the newly added field in the table.
    IN the layout u might have added some field ad have given some name (I/O) field name.

  • Adding Custom Buttons to Flash Help Skin

    Hi.. Can anyone suggest me how to add custom buttons to
    FlashHelp Skin. I know we can do this in WebHelp don't know how to
    do that in FlashHelp. Any help is greatly appreciated. Thank
    you..

    In a VI go to Edit >> Run-Time Menu to change the menu seen to the user when the VI is running.
    To handle when a selection is made use the Event structure.  There are are several shipped examples in the Example Finder.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

Maybe you are looking for