Dropdown list boxes

Hi friends,
Could u please tell me how to create a module pool program to charge the content of a a field of database table in a Dropdown list boxes . Please provide me step by step Process or link of file.
thinks .

Hi Karim,
see the below programs to fill the field with a valid listbox value, for example, in this program, I am building the listbox in the program and just assign P_FIELD a valid value from internal table'ivrm_values' . Create screen 100 and create a field call P_FIELD, make sure to select "ListBox" from the DropDown Field.
report  zpavan_0001.
type-pools: vrm.
data: p_field(20) type c.
data: ivrm_values type vrm_values.
data: xvrm_values like line of ivrm_values.
data: name type vrm_id.
start-of-selection.
Set default value, before calling the screen
  p_field = 'DEF'.
  call screen 100.
*&      Module  STATUS_0100  OUTPUT
      text
module status_0100 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
name = 'P_FIELD'.
  xvrm_values-key = 'ABC'.
  xvrm_values-text = 'ABC'.
  append xvrm_values to ivrm_values.
  xvrm_values-key = 'DEF'.
  xvrm_values-text = 'DEF'.
  append xvrm_values to ivrm_values.
  xvrm_values-key = 'GHI'.
  xvrm_values-text = 'GHI'.
  append xvrm_values to ivrm_values.
  call function 'VRM_SET_VALUES'
       exporting
            id     = name
            values = ivrm_values.
endmodule.                 " STATUS_0100  OUTPUT
*&      Module  USER_COMMAND_0100  INPUT
      text
module user_command_0100 input.
endmodule.                 " USER_COMMAND_0100  INPUT
Thanks and Regards,
Pavankumar

Similar Messages

  • How to read the selected value of a dropdown list box

    Hello,
    I have 2 custom fields which are of type dropdown list on Accounts(CRMM_ACCOUNT) PCUI application details tab.I need to read the selected value of first dropdown list item,based on that second dropdown list will be populated.
    I know where to populate the dropdown list box,it is in FILL_DROPDOWN_LISTBOX.
    I dont know how to trap the selection made on dropdown list.
    PLease guide me on how to trap the dropdown list field selection value.
    Thanks in advance.
    Thirumala.

    Hello,
    Check what is done in standard for the fielf REGION which is inked to the country.
    Otherwise, you can do the following :
    - in field group customizing, for field 1, flag the 'send request' flag. So, when you change the value in this field via the dropdown, the MAC methods are immediately called.
    - Put the new value in a global variable (GV).
    - in the fill_dropdown_listbox method, get the value from this GV and based on it, filter the values for the dropdown of field 2.
    Hope this will help you,
    Regards,
    Frederic

  • Is it possible to enter our own value in dropdown list box in Module Pool. How?

    Dear Experts,
    Being new to ABAP, I am trying my hands on Dropdownlist box on Module Pool.
    I want to pull data from Ztable(Custom Table) into Dropdown list box on Screen in Module pool and be able to edit it, delete it and enter new data through it, thus thereby able to manage the Ztable. Is it possible in dropdown.
    Looking forward for experts advice.
    Regards
    Deepika

    Dear Kannan,
    Thanks. But why sud I write an event in Table maintenance generator. My code is in Module Pool and it has no connection with Table Msintenance.
    The I/O field Drop down list box is on the Screen in my Module Pool. I am able to pull data in it from Ztable but now I want to edit this pulled data and also want to enter new data in this dropdown list box.
    Regards
    Deepika

  • Selected value in dropdown list box

    hi forums,
      how to capture the selected value in drop down list box and how it will link with the table.
    layout:
        <htmlb:dropdownListBox  id = "d1%>"
                                nameOfKeyColumn = "vbeln"
                              nameOfValueColumn = "vbeln"
                             table       = "<%=it_sales%>" />
    in dropdown list box,how do i capture the selected values.
    OnInitialization:
    Select vbeln from vbak
      into corresponding fields of table it_sales.
    regards,
    ravi.

    hi Ravikiran,
       In button even,we r mension the event_type = 'click'.
    but in dropdownListBox what is the event_type.
    i tryed like this.
    DATA : EVENT TYPE REF TO CL_HTMLB_EVENT.
    ***this is for button************
    *event = CL_HTMLB_MANAGER=>get_event( RUNTIME->SERVER->REQUEST ).
    *IF event->NAME = 'button' AND event->event_TYPE = 'click'.
    DATA : button_event TYPE REF TO CL_HTMLB_EVENT_BUTTON.
    button_event ?= event.
    *ENDIF.
    *********this is for dropdownListBox**********
      event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
      IF event->name = 'dropdownListBox' AND event-         >event_type = 'selection'.
           DATA :  dd_listbox_event TYPE REF TO CL_HTMLB_EVENT_SELECTION.
           dd_listbox_event ?= event.
    CASE EVENT->ID.
    when 'id1'.
    CALL METHOD REQUEST->GET_FORM_FIELD
          EXPORTING
            NAME  = 'id1'
          RECEIVING
            VALUE = SEL.
    WHEN 'myButton'.
       CALL METHOD REQUEST->GET_FORM_FIELD
         EXPORTING
           NAME  = 'id1'
         RECEIVING
           VALUE = SEL.
    ENDCASE.
    endif.
    with regards,
    ravi.

  • Filtering values in a dropdown list box

    Hello Team
    In the BSP application CRM_IC, we want a drop down list box to be filled based on the entry selected from another dropdown list box. We have all the entries for the second drop down box in ABAP internal table .However, we do not want a server round trip to happend in doing so. Thus we have used the attribute 'Onclientselect' and we are trying to call a java script function call on this event to filter this ABAP internal table . In this function, we would like to fill the contents of the second dropdown list box after reading the contents of the first dropdown list box. Please advice us as to how this can be achieved. Basically, we observed that ABAP server side script is not executed in the java function.
    Thanks
    Rony

    Rony,
    I have used the following technique to synchronize the
    contents of two drop down list boxes.
    <b>Scenario:</b>
    The selection in listbox ddlbxSystemEquipNum, which I
    will call "A", determines the contents of listbox
    ddlbxModuleEquipNum, which I will call "B".
    I use a JavaScript array to shadow the ABAP internal
    table containing the possible values for listbox B.
    When the page is initially displayed, listbox B is
    populated from the ABAP internal table.
    When a new selection is made in listbox A, I use the
    onClientSelect event to call a JavaScript function,
    updateModuleList(), to update the contents of listbox B
    from the JavaScript shadow array based on the selected
    value in listbox A.
    <b>Code Excerpts:</b>
    <u>Declare the JavaScript shadow array and listbox B update function</u>
    <script language="javascript" type="text/javascript">
        var moduleArray = new Array();
        function updateModuleList() {
            var selSystem = frmNrg1100.ddlbxSystemEquipNum;
            var selModule = frmNrg1100.ddlbxModuleEquipNum;
            // Get selected system equipment number
            var selected_system =
                    selSystem.options[selSystem.selectedIndex].value;
            // Clear module select options
            selModule.options.length = 0;
            // Add module select options for the selected system
            var j = 0;
            for (var k = 0; k < moduleArray.length; k++) {
                if ( (selected_system == moduleArray[k].system) ||
                                         moduleArray[k].system == "") {
                    selModule.options[j++] = new Option(moduleArray[k].text,
                                   moduleArray[k].value,
                                   moduleArray[k].selected) ;
    </script>
    <u>Specify the onClientSelect event handler on list box A</u>
    <htmlb:dropdownListBox
        id = "ddlbxSystemEquipNum"
        width      = "400"
        onClientSelect = "updateModuleList()"
    <u>ABAP and JavaScript to populate internal table and shadow array of possible values for listbox B</u>
    <%
    loop...
            wa_module_options-system   = wa_customer_tool-equipment_num_t.
            wa_module_options-text     = tool_list_text.
            wa_module_options-value    = wa_customer_tool-equipment_num_m.
            wa_module_options-selected = selected.
            append wa_module_options to module_options.
    %>
    <script language="javascript" type="text/javascript">
        // Add all possible Module select options to a JavaScript array of objects
        moduleArray[moduleArray.length] = {  system:"<%=wa_module_options-system %>",
                                               text:"<%=wa_module_options-text %>",
                                              value:"<%=wa_module_options-value %>",
                                           selected:"<%=wa_module_options-selected %>" } ;
    </script>
    <%
    endloop.
    %>
    Hope this helps.
    Regards,
    Shawn

  • LiveCycle 8.1 on Vista: dropdown list box doesn't show all values

    On Vista Business O/S, in LiveCycle 8.1, I am using a dropdown list for 254 items, not dynamically loaded (all values are declared in the definition of the object). When the form runs, the dropdown list appears. I can scroll through the list. However, the scroll stops short, never showing the last few items on the list.<br /><br />   Is there some limit I have exceeded or is there some know bug I have encountered or is there some other action I need to take so I can choose any item from the dropdown list?<br /><br />   Dropdown list box is defined as user-entered - optional, default <none>.<br />254 text items, longest item is 19 characters, average item is 10 characters long. <br /><br />   Thanks in advance for any help, hints, or tips you provide.<br /><br />Dr. Dave Dyer

    Dear Friends....
    it seems to be a bug of the SQL Server Data Tools, (SQL Server 2012 SP2)... I did the deploy of my Dashboard, (and details Reports), to my Test Reporting Services Server.. and everything works as expected....
    Cheers, Luis

  • How to attach value range table to dropdown list box

    Hi there,
    could u please explain me how to attach a value range table to dropdown list box (i.e I/O box with dropdown attribute as list with key).
    if possible please explain me with a sample code.
    Thanks in advance.
    -Tulasi.

    hi ...if the associated domain of the field that u are using as i.o field has value range the same will come as drop down list...u u select the list box option and click from dictionary check box on the attributes...
    To check if the domain has it or not...go to the domain..click on value range..u can see thr,...if values are not thr u can giv the same...
    Or if u are not refering to dictionary type then use fm VRM_SET_VALUes
    reward if the abv is helpful..

  • Blank line in DropDown List box

    I have a case where I want to add a blank entry in a drop down list box that is bound to a database table. I want the blank to be the default, then the user can select the bound values if desired. How do I do this without binding the drop down box to a prepopulated array?

    Hi
    Go to the JSP source of that page and add
    <f:selectItem itemLabel="None" itemValue="0"/> before
    the line <f:selectItems binding="#{Page1.dropdown1SelectItems}" ....
    With this you can deselect the previous selection by selecting None from the dropdown list. You can also use blank spaces instead of None.
    Thanks
    Srinivas

  • 2 cascading multiple dropdown list boxes that fill a form field in Infopath

    I have a request to do this:
    first field is a cascading list box is type of work (can select more than 1 type of work)( separate list)
    then based on the choices above the
    second cascading list box has the various people's names from the first list box (can select more than 1 person)(separate List )
    then I need to from the second list box have a form field hold the various email addresses of all the people selected in the second list box.
     how would I do a multiple tier cascade in Infopath form?

    those are good examples, but here is the thing the first two dropdowns can be more than 1 selection, could be 50 items selected.
    and selection 2 dropdown doesnt lookup into  selection 1. but they do have a related column.
    company name..... ( just  saying).

  • BSP Application: Dropdown List box

    Hello Experts,
    I have a drop down list in my BSP Application. I have build the dropdown using internal table.
    <htmlb:dropdownListBox id = "REV_STAT"
    table = "<%= int_stat_typ %>"
    selection = "<%= application->wf_stat_typ %>"
    nameOfKeyColumn = "ZE_REV_STAT"
    nameOfValueColumn = "ZE_REV_STAT_DESC" />
    1. INPROGRESS
    2. SURVEYED
    3 CLEAN UP FINALISED.
    In the page I have a save button. Intially the list is displayed in above order and INPROGRESS Status is visible in dropdown list. I change the status to CLEAN UP FINALISED and save.
    Next time when I return to page according to selection I require to display CLEAN UP FINALISED . Now the page is displaying the INPROGRESS Status not the saved entry.
    The application->wf_stat_typ holds the Key and desc of CLEAN UP FINALISED .
    How can I assign the value CLEAN UP FINALISED to dropdown field and get it displayed when page is displayed?

    Hi Sandeep,
    not sure what you mean by
    The application->wf_stat_typ holds the Key and desc of CLEAN UP FINALISED
    but this field should hold the key only.
    Do a view source in your browser and see exactly what HTML is being rendered.
    Cheers
    Graham Robbo

  • Font Size for Dropdown List Box

    Hi All,
    We are in ECC 6.0 with Integrated ITS. We have a 'Z' EWT transaction with a corresponding service maintained in SICF being executed via ITS and/or Portals.
    The problem is that the font sizes for the dropdown list values for all these input fields are very small. The same transaction when run in ECC has no such font issues.
    Does anyone have any idea of why that is happening and if the font sizes for these dropdown list fields can be changed or not?
    Thanks in Advance
    Shounak

    Hello Shounak,
    If this is in Portals then you may be able to change the size of the font through the Portal Theme Generator. 
    Edgar

  • Please help !!!! How to get data into dropdown list box

    Hi all,
    I want to display data from ResultSet object to drop down
    list box in my JSP form.
    How should I proceed ?
    Please help me what should I do ?
    Thanks for any help in advance.
    savdeep.

    dear hermione
    it depends on the compexity of the application
    i could also have suggested to use a JSP custom tag
    that can populate the values stored in a table. I
    guess u must have used that approach too.
    But why to make the things complicated when they can
    be done in an easier manner.
    The author seems to be a beginner and telling him to
    call Helper classes just to make a drop down is not
    at all feasible.
    what do u say?I believe it is best to start with a proper approach than finding quick solutions. Of course, JSTL sql tags allow you to execute queries within the JSP but they look cleaner in code.
    Certainly, if the OP is a beginner in JSP (presuming that he has some background of core Java and OOP), I don't see any reason why there should not be a separate class with a well-defined responsibility. This will help the OP develop a thinking towards designing a good solution rather than simply patching in bits of procedural code to get the job done. There is a difference in doing something and doing in properly. :)
    I suppose I am a little wary since I have been working too long maintaining code developed by others. A simple change in the requirement needs a lot of impact on several components.

  • Dynamic entry list in Dropdown List Box

    Hi All,
    I need to create a dropdown box in a form whose input is connected to the output of a bapi/query. I want the values of a field in the bapi to the elements of the entry list.
    Can anyone tell me how to create the entry list dynamically?
    Thanks,
    Sruti

    Hi,
    Create Drop-Down List in VC
    Go throgh this links...
    http://help.sap.com/saphelp_nw04s/helpdata/en/96/c33a3382914f6d8aeba11413e3e356/frameset.htm
    Web blog
    /people/thomas.jung/blog/2006/05/26/visual-composer-value-help-data-service
    Referece Guide
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9326072e-0c01-0010-bc97-f72e93338101
    and
    http://help.sap.com/saphelp_nw04s/helpdata/en/bf/39becc90824d4d999eb05336345e5e/frameset.htm
    Senthil K.

  • Populating a dropdown list box from from a RFC/web service call

    Hello All,
      So far all the samples that I have on dropdown listboxes pulls their values from the Simple Type Enumeration table. Howvever, If i will like to populate the dropdown listbox with returned values from an imported model, does anyone have any documentation on how this may be achieved ? Thank you.
    from
    Kwok Wei

    Hi
    If u want to populate the Values in DropDown from RFC call u can use the following code
    IWDAttributeInfo  ainfo = wdContext.node<<NodeName>>().getNodeInfo().getAttribute("<<Value Attrib that is bounfd to the Drop Down>>");
         ISimpleTypeModifiable st = aiinfo.getModifiableSimpleType();
         IModifiableSimpleValueSet vs = st.getSVServices().getModifiableSimpleValueSet();
         for(int i=0;i<wdContext.node<<Ur Table Parameter Name>>().size();i++)
              vs.put(Key,Value}
    The Above code is for Drop Down by Key
    For Drop Down By Index
    for(int i=0;i<wdContext.node<<Table Paramter>>().size();i++)
              IPrivateFinancingPlanView.I<<NodeElement>> prodElement = wdContext.create<<Node Element>>();
              prodElement.set<<Value Attribute Bound to drop Down>>(wdContext.node<<Table Paramter>>().get<<Table Paramter>>(i).getDescription());
              <<Parent Node Element>>.node<<Child Node>>().addElement(<<Child Node Element>>);
    Wishes
    Krishna kanth
    Message was edited by: krishna  kanth

  • Dropdown Lisx box in servlets

    HI,
    I have a servlet with dropdown list box and text item. Whenever i choose the value based on that I have to display some data
    below the these Items.( Dropdown and Text item).
    The input in the text item will search in the below diplayed data and re-display again.
    My question is, when i change the value in the dropdown listbox, it is not changing the data and selected value is
    NOT staying in the dropdown listbox. can anybody help me in this problem.
    Here is my code...
    out.println("<HTML>");
    out.println("<HEAD>");
    out.println("</HEAD>");
    String i_country="USA";
    String i_key =" ";
    out.println("<BODY onLoad=\"document.lov.i_key.focus()\">");
    out.println("<DIV align=left>");
    out.println("<FORM ACTION=physician_internal_medical_school_popup name=lov>");
    // out.println("<INPUT TYPE=hidden NAME=pProfessionID VALUE=1>");
    out.println("<FONT FACE=Arial,Helvetica SIZE=-1>Country:<SELECT NAME=i_country onChange=\"document.lov.submit()\">");
    while(Country.next())
    if(Country.getString("country").equals(i_country))
    out.println("<OPTION SELECTED>"+Country.getString("country"));
    else{
    out.println("<OPTION>"+Country.getString("country"));
    } // End of IF stmt
    } // End of While Country
    out.println("</SELECT>");
    out.println("</FONT>");
    out.println("<FONT FACE=Arial,Helvetica SIZE=-1>Search:</FONT><INPUT TYPE=text NAME=i_key SIZE=20 MAXLENGTH=20 onChange=\"document.lov.submit()\" VALUE="+ i_key+">");
    out.println("</FORM>");
    if ( i_country == "** UNKNOWN **")
    School_2 = stmt3.executeQuery(" SELECT name "+
    "     FROM LP_SCHL_PRG "+
    "          WHERE profession_id = "+p_profession_id +
    "          AND country IS NULL "+
    " AND name LIKE '%"+i_key+"%'"+
    "          ORDER BY 1" );
    while(School_2.next())
    out.println("<FONT FACE=Arial,Helvetica SIZE=-2><A HREF=\"javascript:sendValue('Albany Medical College')\">"+School_2.getString("name")+"</A></FONT><BR>");
    } // End of While School_2
    }else
    School_1 = stmt2.executeQuery(" SELECT name "+
    "     FROM LP_SCHL_PRG "+
    "          WHERE profession_id = "+p_profession_id +
    "          AND country = '"+i_country +"'"+
    " AND UPPER(name) LIKE '%"+i_key+"%'"+
    "          ORDER BY 1 ");
    while(School_1.next())
    out.println("<FONT FACE=Arial,Helvetica SIZE=-2><A HREF=\"javascript:sendValue('Medical College')\">"+School_1.getString("name")+"</A></FONT><BR>");
    } // End of While School_2
    } // End of If
    out.println("</FORM>");
    out.println("</DIV>");
    out.println("</BODY>");
    out.println("</HTML>");

    Just a hint:
    I think that
    get reference of status_tab into M_MAT_REF
    creates a reference to the local variable status_tab.
    At the time then the drop-down is rendered, this local variable does not exist anymore.
    I would try is this way
      FIELD-SYMBOL <fs> TYPE TIHTTPNVP.
      CREATE DATA me->m_mat_ref TYPE TIHTTPNVP.
      ASSIGN me->m_mat_ref->* TO <fs>.
      <fs> = status_tab.
    or this way
    1) change the type of m_mat_ref to TYPE TIHTTPNVP (not TYPE REF TO TIHTTPNVP).
    2)
    DATA lr_mat_ref TYPE REF TO TIHTTPNVP.
    m_mat_ref = status_tab.
    GET REFERENCE OF m_mat_ref INTO lr_mat_ref.
    p_replacement_bee = CL_HTMLB_DROPDOWNLISTBOX=>FACTORY(
    id = p_cell_id
    selection = m_row_ref->STATUS
    table = lr_mat_ref
    nameOfKeyColumn = 'NAME'
    nameOfValueColumn = 'VALUE' ).

Maybe you are looking for

  • Slow iMac (s?)-Mail has created a monster?

    I've only noticed this over the last 2 days, and only saw this symptom this morning. I have 2 iMacs that I use regularly, a 2.8 GHz Core2Duo/24"/2 GB RAM (Mid 2007), and a 3.6 GHz i5/27"/ 4 GB RAM (Mid 2010) at home. I usually leave my work iMac on o

  • KEYNOTE - Export to quicktime with slides turned off

    I have just done a full set of speaker walkup slide intros and then tried to output to quicktime with certain slides turned off and the ones I wanted to export turned on. Each time I would export the QT movie (for individual speakers turned on and th

  • Slow Motion on EX-1

    I'm shooting a short comedy with the Sony EX-1, likely for web/DVD. I'd probably shoot the whole thing in 1080p24 BUT I need a few shots in slow-motion by "overcranking" to 60fps - and that is only possible in 720p24. So, any suggestions as to whethe

  • Radio buttons with validate item trigger

    hi, how can execute this trigger I am completely new in oracle would it be like this? using trigger when_radio_changed > declare quantityA number; begin IF :radio_button1=1 THEN SELECT quantity_on_hand into quantityA FROM INVENTORIES WHERE Product_ID

  • Cant get Apogee Duet/Masetro to work on my brand new MacBook Pro

    Alright.. maybe someone can help me here?? I just bought a new 15inch macbook pro, logic pro 9, and a apogee duet interface. After installing everything, I cannot get the Duet to work at all!! Maestro doesnt pop up when I connect. I have to manually