Need help in this select drop down box

Hi i had a drop down box written with select and i had many options , when user selects the option it will insert this to database and when user goes to the edit form the preselected value has to be populate automatically in dropdown , but the last option is populating everytime when uses edit form.
below is the code:
insert page:
            <select name="council" id="council" name="Please select Council from dropdown box">
                <option  value="Division">Division</option>
                <option  value="Facility">Facility</option>
                <option  value="District D">District D </option>
                <option  value="District E">District E </option>
                <option  value="District J">District J </option>
                <option  value="District K">District K </option>
                <option  value="District L">District L </option>
                <option  value="District M">District M </option>
                <option  value="District N">District N </option>
                <option  value="District O">District O </option>
                <option  value="District Q">District Q </option>
                <option  value="District S">District S </option>   
                <option  value="District T">District T </option>
                <!--- Below code  is added just for temporary case ,for this drop down we need to pull all these data from databse--->
                <option  value="D 506">D 506</option>                                            
                <option  value="D 524">D 524</option>
                <option  value="D 525">D 525</option>
                <option  value="D 530">D 530</option>
                <option  value="D 531">D 531</option>
                <option  value="D 536">D 536</option>
                <option  value="D 549">D 549</option>
                <option  value="D 558">D 558</option>
                <option  value="D 562">D 562</option>
                <option  value="D 581">D 581</option>
                <option  value="D 583">D 583</option>
                <option  value="D 597">D 597</option>
                <option  value="D 598">D 598</option>
                <option  value="D 599">D 599</option>
                <option  value="D 628">D 628</option>
                <option  value="D 686">D 686</option>
                <option  value="D 698">D 698</option>
                <option  value="D 848">D 848</option>
                <option  value="D 862">D 862</option>
                <option  value="D 870">D 870</option></select>
this is edit page code:
                   <select name="council" id="council">               
               <cfoutput query="getdata">               
                <option  value="Division" <cfif council IS "#getdata.council#"> selected</cfif>>Division</option>
                <option  value="Facility" <cfif council IS "#getdata.council#"> selected</cfif>>Facility</option>
                <option  value="District D" <cfif council IS "#getdata.council#"> selected</cfif>>District D </option>
                <option  value="District E" <cfif council IS "#getdata.council#"> selected</cfif>>District E </option>
                <option  value="District J" <cfif council IS "#getdata.council#"> selected</cfif>>District J </option>
                <option  value="District K" <cfif council IS "#getdata.council#"> selected</cfif>>District K </option>
                <option  value="District L" <cfif council IS "#getdata.council#"> selected</cfif>>District L </option>
                <option  value="District M" <cfif council IS "#getdata.council#"> selected</cfif>>District M </option>
                <option  value="District N" <cfif council IS "#getdata.council#"> selected</cfif>>District N </option>
                <option  value="District O" <cfif council IS "#getdata.council#"> selected</cfif>>District O </option>
                <option  value="District Q" <cfif council IS "#getdata.council#"> selected</cfif>>District Q </option>
                <option  value="District S" <cfif council IS "#getdata.council#"> selected</cfif>>District S </option>   
                <option  value="District T" <cfif council IS "#getdata.council#"> selected</cfif>>District T </option>                   
                <option  value="D 506" <cfif council IS "#getdata.council#"> selected</cfif>>D 506</option>                                            
                <option  value="D 524" <cfif council IS "#getdata.council#"> selected</cfif>>D 524</option>
                <option  value="D 525" <cfif council IS "#getdata.council#"> selected</cfif>>D 525</option>
                <option  value="D 530" <cfif council IS "#getdata.council#"> selected</cfif>>D 530</option>
                <option  value="D 531" <cfif council IS "#getdata.council#"> selected</cfif>>D 531</option>
                <option  value="D 536" <cfif council IS "#getdata.council#"> selected</cfif>>D 536</option>
                <option  value="D 549" <cfif council IS "#getdata.council#"> selected</cfif>>D 549</option>
                <option  value="D 558" <cfif council IS "#getdata.council#"> selected</cfif>>D 558</option>
                <option  value="D 562" <cfif council IS "#getdata.council#"> selected</cfif>>D 562</option>
                <option  value="D 581" <cfif council IS "#getdata.council#"> selected</cfif>>D 581</option>
                <option  value="D 583" <cfif council IS "#getdata.council#"> selected</cfif>>D 583</option>
                <option  value="D 597" <cfif council IS "#getdata.council#"> selected</cfif>>D 597</option>
                <option  value="D 598" <cfif council IS "#getdata.council#"> selected</cfif>>D 598</option>
                <option  value="D 599" <cfif council IS "#getdata.council#"> selected</cfif>>D 599</option>
                <option  value="D 628" <cfif council IS "#getdata.council#"> selected</cfif>>D 628</option>
                <option  value="D 686" <cfif council IS "#getdata.council#"> selected</cfif>>D 686</option>
                <option  value="D 698" <cfif council IS "#getdata.council#"> selected</cfif>>D 698</option>
                <option  value="D 848" <cfif council IS "#getdata.council#"> selected</cfif>>D 848</option>
                <option  value="D 862" <cfif council IS "#getdata.council#"> selected</cfif>>D 862</option>
                <option  value="D 870" <cfif council IS "#getdata.council#"> selected</cfif>>D 870</option>
</cfoutput>               
            </select>
i dont know where i am making mistake and i observered one behavoir that if i have less options it is working but not with many why like that , please help me in this
Thanks

Seems to me your conditionals should look something like this:
<option value="Division"<cfif getData.council is "Division"> selected="selected"</cfif>>Division</option>
<option value="Facility"<cfif getData.council is "Facility"> selected="selected"</cfif>>Facility</option>
Your condition is the same for every option, and would likely never evaluate to true:
<cfif council IS "#getdata.council#"> selected</cfif>
getData.council will be "Division" or "Facility" or "District D" or ...
... but it would never be "council".
HTH.
Charlie

Similar Messages

  • To develop cascading select drop down box from web service

    Hi,
    I have two select drop downs one is "STATE" and other is "CITY". I am fetching the values for state drop down from a web service method "return"(*a list is returned from that method*) . Now i have a method in a webservice which accepts a string type argument(state) which returns the cities corresponding to that state. I made another drop down from "return"( list is returned from that method) of this second method which gives me city.
    Now what i want to do is on selecting a state the webservice method should get executed passing "selected state" as a parameter to my web service function and that return will populate my second drop down list.
    Can partial trigger help me in this?
    If partial trigger is helpful,how will i pass an argument to my second method which is returning me cities?
    OR
    Is there some other way to do it?

    Hi,
    check this one: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/70-dependent-listboxes-using-ws-286107.pdf
    Frank

  • Can anyone help solve this frustrating drop down bug in Adobe Reader 8?

    Has anyone encountered drop downs in their PDF form that don't work in Adobe Reader 8?
    A simple example is my form (stripped back) here:
    http://www.wikski.com/misc/test.pdf
    I've built a form with 22 sections in it, some 1800 lines of code, and now every single drop down has decided to not work in Adobe Reader 8.
    The behaviour is when you select a drop down, it immediately deselects itself and you can't use the element at all.
    I previously had this occur, and by simply deleting the element in LiveCycle Designers ES2 (which is what I've used to create the entire form) and recreating it exactly the same; seemed to fix it. However, I am so far past the point of being able to recreate every drop down this time, I need to actually know what's causing the bug.
    Any help would be greatly appreciated!
    Cheers,

    xfa.layout.relayout(); is required to re-render the entire form in order to have the field change color on Enter event. Without this, the field won't change color in Adobe Reader 8, this goes for all fields not just drop downs. Instead it'll just flicker the color change, xfa.layout.relayout(); makes the color change stick.
    Thanks for your help, I've decided to take the set_focus() event off drop downs and keep it in place just for other field types such as the text input field.

  • Need help fixing a CSS Drop-Down menu for IE6

    Hello.
    I have created an entirely CSS drop down menu for my website
    which works perfect in Firefox, Safari, Opera and IE7 however when
    I tested in IE6 it displayed like this -->
    image
    here or go to http://www.runecentral.net/index.php (Must have
    /index.php as i have redirected / to the community forum.)
    Here is my code

    Thank you for your reply.
    To answer your first question, I tried it with just one
    before and it caused Internet Explorer to display the background
    incorrectly so I just kept them both.
    I have replaced background-image with background:
    url(/img/defmenu.png) repeat-x;
    But, I cannot access my XP machine until tomorrow so I cannot
    view the site in IE6, if you could test it and tell me if it is the
    same as the image linked to in my first post that would be great.
    Kind Regards,
    Perry

  • Dynamically create drop down box with JSP

    Hi,
    I hope this is not a repeat post, I have search the forum and a posting has not jumped out at me. I am making a jsp that dynamically constructs a custom SQL query.
    I have a number of text boxes with an id, my jsp page calls a servlet, the servlet reads the contorl id and the value to build the query - this works great. However, there's a large text input box which receives a number of extra conditions - this text box receives the input in the following format:
    searchAttributeName1,searchAttributeValue1;searchAttributeName2,searchAttributeValue2
    This is functional, however, it's a bit rubbish as the user has to know the special recognised attributeNames. What I would like to have is some sort of criteria control. This would consist of a drop down box populated from the servlet, a text input for the value and a button to add another criteria control. so the user could build up the number of query criteria. The drop down box ensures they cannot select the wrong keyword, pressing the add criteria button adds a new drop down box and text box pair to the screen.
    An example of this I recently saw was at Intel's jobs search web site https://jobs.intel.com/jobs/jobs.iccw - see that for example.
    Has anyone got any ideas on how to achieve this? I initially thought use jsp scripting (there is no restriction against this) but I need to use javascript I'm guessing as the button click triggers adding a new combo box. Another idea was to use styles and tables to hide the other drop down boxes but this seems like a real hack that I'd like to avoid. I can do with with .NET i hope java can deliver!
    Any ideas are much appreciated - I am a novice with java web development so please, any examples thoroughly explain (no need to explain populating the drop down box - there seem to be plenty of posts on this).
    Thanks for any help or ideas on this issue -

    Gina,
    Here is some sample code for using a ComboBox in a JSP from an EditCurrentRecord bean. This particular example uses a query, you can also populate combo boxes, list boxes, radio buttons and checkboxes from a static list. See the JavaDocs for the EditCurrentRecord bean.
    <jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
    <%
    RowEditor.initialize(application, session , request, response, out, "wt_bc_WT_bcModule.WalkthroughEngineSlidesView");
    RowEditor.setTargetUrl("WalkthroughEngineSlidesView_SubmitInsertForm.jsp");
    RowEditor.createNewRow();
    RowEditor.setReleaseApplicationResources(true);
    RowEditor.useComboBox("Presname","select pres_name,pres_name from wt_info","PRES_NAME","PRES_NAME");
    RowEditor.render();
    %>
    </jsp:useBean>
    null

  • My account doesnt appear in the drop-down box

    Hello!
    i forgot a password to one of my accounts (navladaster) and now im trying to get a new one using my email. i receive token and a security code, but when i enter it, the account i need doesnt appear in the drop-down box. This account used to be connected to another email address, though i remember changing the email on that account successfully. is there any way to get a new password now or at least to check to what email address it is connected now if didnt pay for skype services?
    Thank you so much!
    navladaster

    using another account, open the Add a Contact window and enter the possible email address/es that you may have registered in that account in the email address field.  Once you entered the right email address, the results will show the username of the account in question.  
    IF YOU FOUND OUR POST USEFUL THEN PLEASE GIVE "KUDOS". IF IT HELPED TO FIX YOUR ISSUE PLEASE MARK IT AS A "SOLUTION" TO HELP OTHERS. THANKS!
    ALTERNATIVE SKYPE DOWNLOAD LINKS | HOW TO RECORD SKYPE VIDEO CALLS | HOW TO HANDLE SUSPICIOS CALLS AND MESSAGES
    SEE MORE TIPS, TRICKS, TUTORIALS AND UPDATES in
    | skypefordummies.blogspot.com | 

  • Changing text in a selection drop down

    Hi all,
    Does anyone know how to change the text(not value) that is displayed in a single line selection drop down box from a javascript function.?
    ie.
    <select name="companyMenu" size="1" >
    <option value=" ">Want to change this text</option>
    </select>
    regards
    JK

    its ok, found the answer.
    simply place an id in the option tag and refer to the innerText.
    ie
    <select name="companyMenu" size="1" onchange=whatever(this.form);>
    <option id="commonText" value="">Want to change this text</option>
    and for the function
    function whatever(f) {
         commonText.innerText = "happy";
    which replaces "Want to change this text" with "happy"
    cheers
    JK

  • Create a dynamic form where selected text boxes appears, based on options chosen in a drop-down box

    HELP!!! Can anyone please provide some guidance on how to create a dynamic form where selected text boxes appears, based on options chosen in a drop-down box.
    I have a form which – based on the department that's selected from a drop-down box – will have different form fields/text boxes, etc, made available.
    Is this possible in LiveCycle, if so, can you please provide the script/info - as needed.
    Thanks,

    In the preOpen event of the second dropdown list you put something like (in formCalc):
    if (dropdown1 == 1) then
    $.clearItems()
    $.setItems("Year, 2 Year,  3 Year")
    elseif (dropdown1 == 2) then
    $.clearItems()
    $.setItems("3 Year,  4 Year")
    endif

  • Adding '-Select-' on top for a drop down box

    Hello,
    I have a drop down box mapped to a field in the context, the field has some domain values and are populated in the run time. but I have to add another top row '-Select-' indicating to the client that the field need to be selected.
    To add 'Select', I can write a method in the WDDOINIT method of the controller and also loop through the domain values and append to the drop down box. But I don't want to do too much of d/b interaction, as the fields are anyway loaded to the dropbox by mapping.
    Is there a way in web dynpro, that we could do like in normal ABAP reports, to Loop at the screen and identify all the drop down boxes and add a 'select' row at the top?
    I really appreciate any help.
    Thank you
    KV.

    Hi Kiran,
    Can you make your requirement more clear to me?
    As much I understand from your message is that you want to add a dynamic Text on the top of Dropdown.Like Select the field need to be selected.
    from where you will get this field information?
    what message you want to add?
    If you have the field information then
    (a)Create a textView on the top of Dropdown
    (b) Bind it's property "Text" to the context attribute say Text .
    (c) now set this value like
    wdcontext.currentcontextelement().setText("Select "+field);
    If this is not the right interpretation of your problem then please explain it in detail and tell me step by step what you want to do?
    Regards,
    Praveen

  • Multiple select options in 1 drop down box?

    Hi,
    I have created a form that works perfectly except for the fact that I need to provide multiple select options in the 1 drop down box; for example, I'm asking what product the customer is interested in and his answer could be multiple items such as Soap, Sanitizer, Hand Towels, Face Cloths etc...
    At the moment, the customer can only select 1 item not multiple.
    Is this possible?
    Thanks in advance for the help!

    Hi,
    It is not possible to allow the user to select multiple items in a dropdown list.
    You could use a list box, which does allow multiple selections.
    Good luck,
    Niall
    Assure Dynamics

  • How to show the selected item in a drop-down box......

    hi,
    i m using the following code for selecting from the drop-down box...
    <html:select property="lddate" style="width:160">
    <html:options collection="load_dt" name="AlmCurrencyRiskAnalysisBO" property="load_dt" labelProperty="load_dt"/>
    </html:select>
    but what happng when i m select any date from the dropdown box it does not show that date. it only shows the last entry date in the load_dt arraylist.
    i m trying to implement this on a jsp page..can anyone plz tell me what shuld i do to show selected date...plzz help..its vry urgent.........

    Vini,
    He seems to be using Struts not ADF Faces.
    Seems, you have given list to to property and labelProperty, Can you re-check these properties?
    Sireesha

  • How do I use Javascript to populate a text field based on a selection from a drop down box?

    Greetings,
    I have virtually no experience with JavaScript and I am trying to figure out how to add some basic automation features to an Adobe form.  I have a drop down box called "Hospital_Name" that will contain approximately 7 possible selections.  When the user makes a selection, I would like to have the text field (called "Hospital_Address") below the drop down box populate with the corresponding address for the selection.  I have the "Hospital_Address" text field configured for multiple lines and would like the address to have a line break between the street address and the city/state/zip.
    For example, if the user selected "Hospital 1", the text field would display:
    123 Main St
    Anytown, CA 12345
    Any help or examples you can provide would be greatly appreciated.

    You have the element names within the object within brackets.
    Make sure your brackets are properly placed and matched.
    // Place all pre-population data into a single data structure
    var Location = {
    "--Hospital--":{ line1: " ", line2: " " },
    "Bellevue Medical Center":{ line1: "2500 BMC Drive", line2: "Bellevue, NE 68123" },
    "CHI Bergan Mercy":{ line1: "7500 Mercy Road", line2: "Omaha, NE 68124" }, 
    "CHI Immanuel":{ line1: "6901 N. 72nd Street", line2: "Omaha, NE 68122" }, 
    "CHI Lakeside":{ line1: "16901 Lakeside Hills Court", line2: "Omaha, NE 68130" }, 
    "CHI Midlands":{ line1: "11111 S. 84th Street", line2: "Papillion, NE 68046" },
    "Creighton University Medical Center":{ line1: "601 N. 30th Street", line2: "Omaha, NE 68131" },
    "Nebraska Medical Center":{ line1: "4400 Emile Drive", line2: "Omaha, NE 68105" }
    // some debugging code to see location names;
    console.show();console.clear():
    for(I in Location) {
    console.println(I);
    // end debugging code;
    function SetFieldValues(Hospital_Name) {
        this.getField("AddLine1").value = Location[Hospital_Name].line1;
        this.getField("AddLine2").value = Location[Hospital_Name].line2;
    This is not a beginners task but requires a fair amount of knowledge about the structure of objects, defining strings, and structure of arrays.
    Are you sure you have all the field names correctly spelled and capitalized?
    Do you get any error in the JavaScript console?
    Just trying the line that defines the "Location", I get the following error:
    SyntaxError: invalid property id
    1:Console:Exec
    undefined
    All the form field in a PDF are processed by using JavaScript and any error in any script will stop JavaScript processing.
    It might help to have a link to the problem form.
    Make sure your brackets are properly placed and matched.
    // Place all pre-population data into a single data structure
    var Location = {
    "--Hospital--":{ line1: " ", line2: " " },
    "Bellevue Medical Center":{ line1: "2500 BMC Drive", line2: "Bellevue, NE 68123" },
    "CHI Bergan Mercy":{ line1: "7500 Mercy Road", line2: "Omaha, NE 68124" }, 
    "CHI Immanuel":{ line1: "6901 N. 72nd Street", line2: "Omaha, NE 68122" }, 
    "CHI Lakeside":{ line1: "16901 Lakeside Hills Court", line2: "Omaha, NE 68130" }, 
    "CHI Midlands":{ line1: "11111 S. 84th Street", line2: "Papillion, NE 68046" },
    "Creighton University Medical Center":{ line1: "601 N. 30th Street", line2: "Omaha, NE 68131" },
    "Nebraska Medical Center":{ line1: "4400 Emile Drive", line2: "Omaha, NE 68105" }
    function SetFieldValues(Hospital_Name) {
        this.getField("AddLine1").value = Location[Hospital_Name].line1;
        this.getField("AddLine2").value = Location[Hospital_Name].line2;

  • Advice needed on the Drop-down box description.

    There are lots of postings on how to get the drop-down box working and there's even a How-to guide called Dropdown boxes. However, I have a field (defined using the AET tool) which has an Search help assigned, so the drop-down list is automatically displayed for me. Having said that I'm still bemused as to how it works as there's no code in the P and V Getter methods.
    Anyway, that aside, the dropdown box is working fine, as mentioned, but I also have the description field to populate with the description of the value returned by the drop-down box. In my case it's a Department code and associated description.
    Initially, I inserted code in the SET_DEPT method to lookup the description (using a SELECT statement) and place the result in the DEPT_DESC field. However, this method is not being called, I don't think, or at least my break point is not being reached.
    So I'm looking for somewhere to place the code which will be called when the DEPT field changes value, and I can then lookup the description and populate the DEPT_DESC field.. Both the DEPT and DEPT_DESC fields are in the same context node by the way.
    It's a real pity that when you create new fields in the AET tool you can't relate one field to another or somehow use a search help and say that the source is another field and this field will hold the result, or something like that.
    Jason

    Hi,
    It was said that the SET_* method will be called when you press enter on the view to trigger a server round trip.
    For your case, I'd like to suggest you take standard coding for example.
    That is the categorization in service ticket view in IC_AGENT role.
    When select the first category, if the second category only has one value, it will be automatically set. which should be similar to your requirement.
    component view GSMCDDLB/DropDownList
    call stack is
    METHOD SET_FIELDS      CL_GSMCDDLB_DROPDOWNLIST_IMPL=CP
    METHOD EH_ONCATCHANGE  CL_GSMCDDLB_DROPDOWNLIST_IMPL=CP
    METHOD DO_HANDLE_EVENT CL_GSMCDDLB_DROPDOWNLIST_IMPL=CP
    when a value is selected in the first dropdown, an event is triggered, you may debug and find out your event, and make the codings in EH_* method.
    set value for other field is some what simple also, like that in
    METHOD SET_FIELDS      CL_GSMCDDLB_DROPDOWNLIST_IMPL=CP
    CALL METHOD lr_dropdownlist->if_bol_bo_property_access~set_property
    If the first field is not a dropdown, for example a field with F4 help, after select the value from the popup, there will be event SELECT_OBJECT triggered for the view I tested.
    You may put breakpoint in do_handle_event for the controller class and observe what event was triggered.
    Then make the relevant coding.
    Hope could do help!
    Hongyan

  • How to capture the value selected in the drop down box

    Hi all,
    I am populating values in  drop down box by using FM vrm_set_values in module pool.
    like below
    01  ABC
    02 ACB
    03 BCA
    04 CAB
    in module pool drop down box element name is RQGM-VALUE.
    Problem is what ever the value is select in the drop down box from above element RQGM-VALUE is not filling any value.
    i need to capture the value selected in the drop down box and pass it to another variable.

    Hi,
    Refer this standard code. Your issue will be resolve.
    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 TYPE sy-ucomm,
          save_ok TYPE 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(sabapdocu) WITH text-001 demof4help-carrier2
                                            demof4help-connid.
      ENDIF.
    ENDMODULE.

  • How to put drop down box in selection screen

    Hi all,
    I have to create a selection screen.
    in that i have to use a drop down box for the text box.
    how to do that.
    thanking u.
    with regards,
    giri.

    HI
    Check thi ssample code -
    REPORT ZTESTPRG.
    TYPE-POOLS: VRM.
    DATA: NAME TYPE VRM_ID,
    LIST TYPE VRM_VALUES,
    VALUE LIKE LINE OF LIST.
    PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
    AT SELECTION-SCREEN OUTPUT.
    NAME = 'PS_PARM'.
    VALUE-KEY = '1'.
    VALUE-TEXT = 'LINE 1'.
    APPEND VALUE TO LIST. VALUE-KEY = '2'.
    VALUE-TEXT = 'LINE 2'.
    APPEND VALUE TO LIST.
    CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
    START-OF-SELECTION.
    WRITE: / 'PARAMETER:', PS_PARM.
    Hope this helps.
    OR
    You can use the F4 function module or use a List box
    see the sample codes
    See the following ex:
    TYPES: BEGIN OF TY_MBLNR,
    MBLNR LIKE MKPF-MBLNR,
    END OF TY_MBLNR.
    DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
    data: it_ret like ddshretval occurs 0 with header line.
    At selection-screen on value-request for s_mat-low.
    Select MBLNR from mkpf into table it_mblnr.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'MBLNR'
    PVALKEY = ' '
    DYNPPROG = ' '
    DYNPNR = ' '
    DYNPROFIELD = ' '
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
    TABLES
    VALUE_TAB = IT_MBLNR
    FIELD_TAB =
    RETURN_TAB = IT_RET
    DYNPFLD_MAPPING =
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF SY-SUBRC = 0.
    read table it_ret index 1.
    move it_ret-fieldval to S_mat-low.
    ENDIF.
    Go through the test program.
    REPORT Ztest_HELP .
    TABLES : MARA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_MATNR(10) TYPE C.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR TYPE MATNR,
    END OF ITAB.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
    SELECT MATNR
    FROM MARA
    INTO TABLE ITAB
    UP TO 10 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'MATERIAL NUMBER'
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_MATNR'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = ITAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3.
    LIST BOX
    Input : p_char = 'J'.
    Press: enter
    List Box of Month = January, June , July.
    REPORT ZLIST_VALUES.
    TYPE-POOLS vrm.
    tables:
    spfli.
    parameters: p_char type c.
    parameters:
    p_month(12) as listbox visible length 20,
    p_year as listbox visible length 20 .
    DATA:
    t_table TYPE STANDARD TABLE OF vrm_value,
    t_table1 TYPE STANDARD TABLE OF vrm_value,
    vrm_values1 LIKE LINE OF t_table.
    DATA:
    t_year TYPE STANDARD TABLE OF vrm_value.
    data: w_year(4) type n value '2000'.
    at selection-screen output.
    vrm_values1-key = 'a'.
    vrm_values1-text = 'January'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'p'.
    vrm_values1-text = 'February'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'q'.
    vrm_values1-text = 'March'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'r'.
    vrm_values1-text = 'April'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 's'.
    vrm_values1-text = 'May'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 't'.
    vrm_values1-text = 'June'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'u'.
    vrm_values1-text = 'July'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'v'.
    vrm_values1-text = 'August'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'w'.
    vrm_values1-text = 'September'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'x'.
    vrm_values1-text = 'October'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'y'.
    vrm_values1-text = 'November'.
    APPEND vrm_values1 TO t_table.
    vrm_values1-key = 'z'.
    vrm_values1-text = 'December'.
    APPEND vrm_values1 TO t_table.
    t_table1[] = t_table.
    delete t_table1 where text+0(1) <> p_char.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'p_month'
    values = t_table1
    EXCEPTIONS
    ID_ILLEGAL_NAME = 1
    OTHERS = 2.
    do 10 times.
    add 1 to w_year.
    vrm_values1-key = sy-index.
    vrm_values1-text = w_year.
    APPEND vrm_values1 TO t_year.
    enddo.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'p_year'
    values = t_year
    EXCEPTIONS
    ID_ILLEGAL_NAME = 1
    OTHERS = 2.
    start-of-selection.
    write: p_month.

Maybe you are looking for