How to add a dropdown box in an ALV  toolbar??

hi,
   i have a requirement where i need to add a dropdown box in my ALV Toolbar. To be precise next to the export button in my ALV.
Plz help me on this, thanks.

Hi Frank,
I am providing the some peice of code which will be helpful to you.
Adding the DropDown list to the ALV toolbar:
lr_functions ?= wd_this->r_table.
lr_function = lr_functions->create_function( 'MYDROPDOWNBYINDEX' ).
create object lr_dropdown_by_idx
exporting
texts_elementname = 'DROPDOWNBYINDEX.VALUE'.
lr_dropdown_by_idx->set_label_text( 'MYDROPDOWNBYINDEX' ).
lr_function->set_editor( lr_dropdown_by_idx ).
Providing the values to that DropDown:
Here in my example DROPDOWNBYINDEX.VALUE is the context attrubute. And i write the Supply function for that node as follows:
data:
lt_dropdownbyindex type if_componentcontroller=>elements_dropdownbyindex,
ls_dropdownbyindex type if_componentcontroller=>element_dropdownbyindex.
ls_dropdownbyindex-value = 'Nothing'. "#EC NOTEXT
append ls_dropdownbyindex to lt_dropdownbyindex.
ls_dropdownbyindex-value = 'ActionDropdownByIndex'. "#EC NOTEXT
append ls_dropdownbyindex to lt_dropdownbyindex.
node->bind_table( lt_dropdownbyindex ).
For reference you can refer the WD component SALV_WD_TEST_TABLE_TOOLBR which holds the same code
Hope this will help you. Reward points if it helps.
Cheers,
Darshna.

Similar Messages

  • How to add a text box in the layout (View)

    How to add a text box in the layout (View)

    Hi.
    Right Click in the RootUIElement container.
    Click Insert Element.
    Give Name: Input
    Type : Input Field.
    Press Enter.
    Regards
    Bala.

  • How to add a dropdown menu in flash document (.swf, .fla) ??

    How to add a dropdown menu in flash document (.swf, .fla) ??
    as i am developing a website for my semester proj, i need to add some flash contetn in the website..
    here is the link, http://www.mediafire.com/?wnx1jkwkkx9c118
    Check Out..
    the thing is i want a dropdown list/menu in "language selection - tab " (check the html page in above link).. plz help me out..
    Thank You,
    sairam

    For Flash questions check the Flash Forums. 
    http://forums.adobe.com/community/flash
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • How to Create a DropDown Box in a Selection Screen.

    Hi,
    I have a question. i.e, How to create a dropdown box in a Selection Screen. Could you please assist me.
    Thanks & Regards
    Sathish Kumar

    hi satish,
    The following can assist u to create a drop down ....
    Drop down list box can be created in a dialog screen(SE51) as well as selection screen.
      The sap list box allows to select a value from the list but we cannot enter our own value in the list box .The value list that will be displayed consists of two
    fields TEXT field of TYPE 80(C) and internal KEY field of TYPE 40(C).
    In screen painter to create a input/output field into list box we use
    'L" as a value for dropdown attribute for the i/o field.
    In screen painter to determine the type of method that will be used to fill the value
    list we use the attribute value list.
    If it is blank  the value list will be filled by the first column of the input help assigned to the screen field.This input help can be defined in the ABAP Dictionary, on screen using SELECT,VALUES screen statements or in event POV (PROCESS ON VALUE-REQUEST ) and the input help that will be passed to the field should consists of 2 columns ,the key column is filled automatically by the system.SAP recommends value list field should be blank.
    or
    The value  can be 'A' meaning that the value list will be filled in the event PBO(PROCESS BEFORE OUTPUT) or before the screen is displayed.In this method we use function module VRM_SET_VALUES to fill the values and pass it to the i/o field.
    If a function code is attached to the list box the selection of a value triggers a PAI
    otherwise PAI will not trigger.
    Example
    Dropdown list boxes
    REPORT DEMO_DYNPRO_DROPDOWN_LISTBOX.
    TYPE-POOLS VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST.
    DATA: WA_SPFLI TYPE SPFLI,
          OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM.
    TABLES DEMOF4HELP.
    NAME = 'DEMOF4HELP-CONNID'.
    CALL SCREEN 100.
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE INIT_LISTBOX OUTPUT.
      CLEAR DEMOF4HELP-CONNID.
      SELECT  CONNID CITYFROM CITYTO DEPTIME
        FROM  SPFLI
        INTO  CORRESPONDING FIELDS OF WA_SPFLI
       WHERE  CARRID = DEMOF4HELP-CARRIER2.
        VALUE-KEY  = WA_SPFLI-CONNID.
        WRITE WA_SPFLI-DEPTIME TO VALUE-TEXT
                               USING EDIT MASK '__:__:__'.
        CONCATENATE VALUE-TEXT
                    WA_SPFLI-CITYFROM
                    WA_SPFLI-CITYTO
                    INTO VALUE-TEXT SEPARATED BY SPACE.
        APPEND VALUE TO LIST.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                ID              = NAME
                VALUES          = LIST.
    ENDMODULE.
    MODULE USER_COMMAND_100.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'CARRIER'
         AND NOT DEMOF4HELP-CARRIER2 IS INITIAL.
        LEAVE TO SCREEN 200.
      ELSE.
        SET SCREEN 100.
      ENDIF.
    ENDMODULE.
    MODULE USER_COMMAND_200.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'SELECTED'.
        MESSAGE I888(BCTRAIN) WITH TEXT-001 DEMOF4HELP-CARRIER2
                                            DEMOF4HELP-CONNID.
      ENDIF.
    ENDMODULE.
    Reward if useful.
    Thank you,
    Regards.

  • How to add FONT DIALOG box to my notepad application

    hai friends.......
    i am developing a notepad application like windows notepad. for that application i want add FONT dialog box.could you please tell me how to add font dialog box to my application.
    thank you.........

    Start by going through the Swing tutorials linked from the topic listing page of the [_Swing forum_|http://forums.sun.com/forum.jspa?forumID=57]. When you are confident of being capable of displaying a dialog with the components you need, correctly layed out, check out the API for GraphicsEnvironment#getAllFonts and Font@canDisplyUpTo.
    Any Swing related questions you might have along the way should be posted in the Swing forum.
    db

  • How to add the REFRESH button in OOPs ALV grid

    how to add the REFRESH button in OOPs ALV grid

    Hi Naidu.
    Check the below code:
    Local Class Definition and implementation For events handeling
    CLASS LCL_EVENT DEFINITION .
      PUBLIC SECTION.
        METHODS :TOOLBAR FOR EVENT TOOLBAR OF  CL_GUI_ALV_GRID
                         IMPORTING E_OBJECT,
                 USER_COMMAND FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
                         IMPORTING E_UCOMM.
    ENDCLASS.    
    CLASS LCL_EVENT IMPLEMENTATION.
      METHOD TOOLBAR.
        WA_TOOL-FUNCTION = 'ZFC1'.
        WA_TOOL-TEXT     = 'TEST'.
        WA_TOOL-ICON     = '@EA@'.
        APPEND WA_TOOL TO E_OBJECT->MT_TOOLBAR.
      ENDMETHOD.             "DISPLAY
      METHOD USER_COMMAND.
        IF E_UCOMM = 'ZFC1'.
              ENDIF.
      ENDMETHOD.                    "USER_COMMAND
    ENDCLASS.                    "LCL_EVENT IMPLEMENTATION
    MODULE STATUS_0200 OUTPUT.
      SET PF-STATUS 'ZALV_BTON'.
      SELECT * FROM VBAK INTO TABLE GT_VBAK
               UP TO 30 ROWS.
    **** CREATE CONTAINER OBJECT
      CREATE OBJECT MY_CONTAINER
        EXPORTING
          CONTAINER_NAME              = 'CC1'
         EXCEPTIONS
          CNTL_ERROR                  = 1
          CNTL_SYSTEM_ERROR           = 2
          CREATE_ERROR                = 3
          LIFETIME_ERROR              = 4
          LIFETIME_DYNPRO_DYNPRO_LINK = 5
          OTHERS                      = 6 .
    ****** GRID TO CONTAINER
      CREATE OBJECT ALV
          EXPORTING
          I_PARENT          = MY_CONTAINER
         EXCEPTIONS
          ERROR_CNTL_CREATE = 1
          ERROR_CNTL_INIT   = 2
          ERROR_CNTL_LINK   = 3
          ERROR_DP_CREATE   = 4
          OTHERS            = 5.
      CREATE OBJECT OBJ.
      SET HANDLER : OBJ->TOOLBAR FOR ALV.
      SET HANDLER : OBJ->USER_COMMAND FOR ALV.
    ****** ALV DISPLAY
      CALL METHOD ALV->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          I_STRUCTURE_NAME              = 'VBAK'
        CHANGING
          IT_OUTTAB                     = GT_VBAK[]
        EXCEPTIONS
          INVALID_PARAMETER_COMBINATION = 1
          PROGRAM_ERROR                 = 2
          TOO_MANY_LINES                = 3
          OTHERS                        = 4.
    ENDMODULE.                 " STATUS_0200  OUTPUT
    *&      Module  USER_COMMAND_0200  INPUT
    *       text
    MODULE USER_COMMAND_0200 INPUT.
      IF SY-UCOMM EQ 'BACK'.
        LEAVE PROGRAM.
      ENDIF.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    Regards
    Kumar M

  • How to add a push button on an ALV grid  ?

    Hi,
    How to add a push button on an ALV grid, using ON_TOOLBAR, ON_USERCOMMAND Methods. Clicking on that push button, a new screen has to be displayed.

    Hi,
            Assuming that you want to have a "push-button" column, i.e. push-buttons within an ALV grid then you need to implement the following steps:
    (1) Set the style of the column as button
      ls_fcat-style = CL_GUI_ALV_GRID => MC_STYLE_BUTTON.
    (2) When the user pushes the button event BUTTON_CLICK is triggered. Thus, define an appropriate event handler method.
    <b>Reward points</b>
    Regards

  • How to add a standard tool bar in alv

    H i
    i am developing a custom report  in Alv interactive report for to dispaly MRP information.
    Can you sejjest me how to add  a standard tool bar in alv.
      i displayed one final alv grid display there i have to add standard tool bar and application tool bar.
    Thanks,
    Rams
    Edited by: Ramsoft on Oct 27, 2010 12:09 PM

    Hi,
    Give the PF ststus name in  the PF status parameter of ALV FM
    I_CALLBACK_PF_STATUS_SET          = ' PF_STATUS'. " this parameter of ALV FM
    FORM pf_status USING pt_extab TYPE slis_t_extab.
      SET PF-STATUS 'MAIN' .
    ENDFORM.                    "pf_status
    Then create a main PF status by double clicking on it , after this goto EXTRA in menu
    EXTRA>ADJUST TEMPLATE> then give program - SAPLSLVC and status - STANDARD this will give u standard toolbar of ALV ,
    THen add what ever button you require in application toolbar
    Regards,
    Madhukar Shetty

  • How to add a dropdown menu to the search box (the 'search this site' box that appears on all subsites)

    Hello there,
    I know that in the search center you can add search verticals. Then you can configure the search box so it has a drop down menu so you can specify the result source you want to search. 
    But my question is about the 'search this site' box which appears on all subsites, so not the one in the search center. Is it possible to add the same dropdown menu to this box as in the search center?
    Thanks in advance!

    Hi,
    According to your post, my understanding is that you wanted to add a dropdown menu to the search box.
    You need to look at the Search Settings page that is located under the Site Collection Administration of the Site Settings.
    Here are some similar blogs for your reference:
    SharePoint 2013 Search Settings and Search drop down menu
    Customizing Search Navigation on a SharePoint 2013 Publishing Site  
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to add a check box

    Hi all,
    How can I add a check box in a interactive report???

    This link will help you
    http://docs.oracle.com/cd/E1437301/apirefs.32/e13369/apex_item.htm_

  • Still learning, How to add a search box, to search with in your website

    Hello,
    Am trying to add a search box to our website to search within our website. For example i have several pdfs that i would like our customers to pull up but only if they know the correct file name or should i say if they search for the correct name of the pdf? Am not sure if am clear to what i want but if anyone has some advice on how to do this i appreciated.
    Thank you in advance

    If your site is dynamically compiled from PHP code & MySql databases, you would run a PHP query. 
    If your site is static HTML pages, you'll need to use a 3rd party search engine like Freefind.com or a software app such as Zoom from Wrensoft.
    Freefind will index your entire site including PDFs if you choose that option. 
    They offer both free and paid versions of their search engine.  You simply copy & paste their code into your pages.
    Zoom is stand alone software. Free for small sites with tiered pricing for larger ones.
    Nancy O.

  • How to sort 2 dropdown boxes with joined context?

    Hi Guys,
    I have 2 dropdown boxes that are lined to the same table context.
    I do the binding by using the one bind_table method.
    one DD is showing the Key while the other shows the description. They both have the same binding.
    once the user changes one, new data is selected and the drop downs show the key & description.
    What I want to do is to sort each list to be ordered. one by keys and the other by descriptions.
    How should I do that?
    thanks,
    Itay

    Hi,
    first,
    I would like to mention that there is no joined solution to what I asked here, which is different than what you ask...
    You have to make 2 context nodes if you want to sort the data different.
    in a drop down, you can't display 2 separate columns.
    The only thing you can do is to concatenate the key to the description, something like:
    CA - Canada
    US - USA
    FR - France
    if you need to present more than one column maybe it will be best to put a table and link it to some event...
    I "solved" this issue by putting 2 drop downs. I wanted to allow the user to select a value from a list and then to change the screen according to his selection.
    I did something like:
    Choose by key: <dropdownbykey - Key column>
    Choose by description: <dropdownbykey - Desc column>
    I hope this helps...
    Itay

  • How to add a check box in ALV Grid using SAP R/3 release 4.6b?

    Hello everyone,
    I hope you all fine.
    I'm writing because I have a requirement with ALV Grid,  what I need to do, is to insert a checkbox into a cell, I already read the forum to know how to do that, but I'm using a SAP R/3 release 4.6b, and when I execute the program the checkbox is displayed greyout,  because this release doesn't have the EDIT property into the slis_t_fieldcat_alv.
    Does any body know how to enable the checkbox cell in the ALV Grid for this release?, so it will allow the user to mark the desired rows.
    I'll really appreciate if you guys could help me to find a solution.
    Thanks for your time.
    Regards,
    Guillermo

    Hi,
    if you need just a check box for each line, try to get rid of this line from your layout.
    g_layout-box_fieldname = 'ZZCHECK'.
    SAP uses this field to store info about selected lines. Hence you click on the second check box, you select different line and the first line is erased. You can select more line by holding SHIFT + CTRL
    Cheers

  • How to populate a dropdown box based on a selection in another Dropdown box.

    I am trying to find out a way to do the following:
    I am using coldfusion ....working on a form. The form has
    couple of dropdown boxes. Based on the selection on the first
    dropdown box another dropdown box needs to get populated with
    different options. These options will be coming from a query. I am
    trying to find out the Javascript code for doing this.
    Thanks in advance.

    jchopra,
    There's a method to doing what you're wanting to do that I've
    used extensively.
    Basically, within my code, I start by invoking the method
    that returns the data for the dropdown lists. Then, I use the
    following code to pour the data returned into a javascript array:
    var locArray = new Array(#evaluate(locs.recordcount+1)#);
    locArray[0] = new Array('','','','','','','','','',);
    <cfloop query="locs">
    locArray[#locs.CurrentRow#] = new
    Array('#JSStringFormat(locationId)#',
    '#JSStringFormat(fkyPolicyId)#',
    '#JSStringFormat(locationNumber)#',
    '#JSStringFormat(description)#',
    '#JSStringFormat(address1)#',
    '#JSStringFormat(address2)#',
    '#JSStringFormat(zipcode)#',
    '#JSStringFormat(city)#',
    '#JSStringFormat(state)#';
    </cfloop>
    Then I wrote a javascript function that is assigned to the
    first dropdown's onChange() event. When the user changes the value
    that is selected within the dropdown, I use javascript to locate
    (using the policyid) the corresponding record in the javascript
    array and populate and/or select the appropriate value(s) in the
    second dropdown.
    If the data returned from the method invocation is too large
    to use within a javascript array, you may need to limit the results
    that are returned.
    Hope this makes sense. If not, please let me know.
    ds

  • How to add a list box with values for a ztable in SM30

    Hello Gurus,
                    I had created a table maintenance for Ztable and added many extra functionality to that. Now i would like to add a list box or check table for a field. Can i do that with out Regenerating my table maintenance. Please help me its..very urgent.

    Have referred this domain to the data element, this should be the Field type in ur table for the particular field.
    Eg: <b>SE11 > table name > fields-ZTEST > fieldtype-ZZTEST</b>
    ZZTEST in the data element > create a domain for this data element and in that specify teh value range.
    Save and activate it.
    Make sure that u regenerate teh table maintenance generator else u cant see the changes.
    Now if u press F4 u can see only thevalues specified, also u will see only the list box with values in SM30.
    Try this,please let me know if u face any difficulties.

Maybe you are looking for

  • Date format in XML conversion

    Hello, I am using oracle8i. The date format is not giving the proper date values in XML conversion.. create table test(dt date); insert into test values(sysdate); insert into test values(sysdate); insert into test values(sysdate); TEST.WORLD> select

  • Scrolling Feeds !Newbie Alert!

    Hi, I have a basic website which I'm trying to make a little more interesting. I have added a news feed which has around 5 items on it per day and comprises of small pictures and text. However, the news feed is the whole length of the page and I kind

  • Automatically adding user to company

    We're looking at using Delegated User Administration with Companies to limit the scope that some administrators have (they will only be able to assign certain roles to members of their company).  We want all new users to be members of the same compan

  • Schedule a flash object in CMC

    I have saved a flash object into Bo enterprsise. How do i schdule the objects as i do not see any options in CMC to schedule it. Regards Chandra

  • DPS App capability for Iphone and Android?

    Hi there. I'm aware this question may have been asked in a number of different guises. But it's been a while, and I'm hoping the likes of Bob Levine or Bob Bringhurst can provide some fresh insight for all us DPS supporters. My company is a DPS profe