Drop Down Selected value

Hi All,
   I have requirement where i need to populate a drop down in webui 6.0. I could populate the values using the V getter and P getter for setting the event and property as drop down.
following is the code that i have added in the P getter and V getter methods:
P GETTER:
  CASE iv_property.
     WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
      rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
     WHEN if_bsp_wd_model_setter_getter=>fp_server_event.
      rv_value = 'ProcessType'.
  ENDCASE.
V GETTER:
TYPES: BEGIN OF ty_namval,
           domvalue_l   TYPE  char3,
           ddtext TYPE  ddtext,
          END OF ty_namval.
  DATA:lt_ddlb TYPE bsp_wd_dropdown_table,
       ls_ddlb TYPE bsp_wd_dropdown_line.
  DATA: lit_tab TYPE TABLE OF dd07v,
        ls_tab TYPE dd07v.
  DATA: lt_tab1 TYPE TABLE OF ty_namval,
        ls_tab1 TYPE ty_namval.
  IF gr_ddlb_name IS NOT BOUND.
    CREATE OBJECT gr_ddlb_name
      EXPORTING
        iv_source_type = 'T'.
    ls_ddlb-key = 'Mer'.
    ls_ddlb-value = 'Mergers'.
    APPEND ls_ddlb TO lt_ddlb.
    CLEAR ls_ddlb.
    ls_ddlb-key = 'Acq'.
    ls_ddlb-value = 'Acquisitions'.
    APPEND ls_ddlb TO lt_ddlb.
    CLEAR ls_ddlb.
    ls_ddlb-key = 'Div'.
    ls_ddlb-value = 'Divestitures'.
    APPEND ls_ddlb TO lt_ddlb.
    CLEAR ls_ddlb.
    ls_ddlb-key = 'Clo'.
    ls_ddlb-value = 'Closures'.
    APPEND ls_ddlb TO lt_ddlb.
    CLEAR ls_ddlb.
    " sort based on value
    SORT lt_ddlb BY  value.
    IF sy-subrc = 0.
      gr_ddlb_name->set_selection_table( it_selection_table =
lt_ddlb ).
    ENDIF.
  ENDIF.
  rv_valuehelp_descriptor = gr_ddlb_name.
Problem is : When ever i select a value from the drop down it always shows the first record in the drop down.
Please help me in solving this problem. I am not sure where i made the mistake.
Thanks in advance!
Regards.
Warun

Hi There,
The problem doen not seem to be with GET V and GET P, rather it seems to be with GET and SET.
Also, you have defined a server event, this causes server round trip. Are you using the server event "Process Type" by defining an Event Handler EH_ONPROCESSTYPE etc ? if you are ot implementing the server event handling, then remove the Server event setting from GET P. If you are using the server event handling then let us know so that the problem can be diagnosed in a proper way.
I feel that you put a break point in SET method and one in GET method.
When user selects the value in dropdown, system call the SET method and value is SET, now a view refresh happens  and GET method is called when the view is getting loaded.
So you can check what value is getting set in SET method and what is happening in GET method.
I am sure that some code in GET method may be the culprit or event handler coding bug if you are handling server event.
Regards,
Suchita

Similar Messages

  • Performing Calculation based on drop down selection

    I need help with simple calculation. Im building an estimate form, and have the fields:
    "Total"  (manually entered total amount)
    "GrandTotal" (automatically calculates Total*1.07 to add 7% NJ sales tax)
    Next I have 3 drop down boxes with payment options, and then text fields to receive $$ amounts based on drop-down selection:
    "1st Payment Option" (options: 50% down, 100% paid in full, custom entry)
    "2nd Payment Option" (options: 50% at completion, 25% in 14 days, custom entry)
    "3rd payment Option" (options: 25% completion, custom entry)
    For whichever options are selected in the drop-downs, i'd like the text fields to auto-fill.
    (Text fields are titled "1st Payment", "2nd Payment", "Final Payment".
    So how do I take the value from "GrandTotal" and get it to automatically be calculated by 50%, 25% or whatever and be filled into separate text fields?

    It can be done with proper form design. You can use the any of the 3 calculation options but some may require some extra form fields and you can specify a numeric value to a drop down option that is different from the displayed text.

  • Problem in sending drop down list value to jsp page showing  null value

    i am trying to send a drop down list value from client side to a jsp page but getting null value
    this is first page where i have accessed data from database and putted it in a drop down list
    <select name="sub">
         <%
         while(rs2.next())
         cat=rs2.getString(1);
         %><option value="<%=cat%>"><%=cat%></option><%
         }%></select>
    <input type="submit" value="Go"></input>
    now on submit i am going to another page
    where i want the selected value from drop down list to be printed
    i have used there
    <%
    String subject= request.getParameter( "sub.value" );
    out.println(subject);
    %>
    but it is printing null here what is the problem that i m facing
    thanx & reagrds
    sweety

    how to generate dynamically names for text boxes
    i am generating text boxes in while loop when selecting data from database
    while(rs1.next())
    name=rs1.getString(1);%>
    <tr>
    <td>1</td>
    <td><%out.println(name);
    //i am printing here stud_id a unique key and want to update records from following text boxes to particular stud_id
    %></td>
    <td><input type="text" name="????"></input></td>
    <td><input type="text" name="????"></input></td>
    <td><input type="text" name="????"></input></td>
    <td><input type="text" name="????"></input></td>
    </tr><%
    the structure is like
    stud_id | attended theory | conducted theory | ateended practical | conducted practical
    where attended theory, conducted theory............. are to be inputed manually for all students and then update in database
    so i am facing problem in generating names for textboxes how to do that
    so that those can be updated in database for particular student
    Thanx & Regards
    sweety

  • Change values of drop down list when other drop-down list value is clicked

    Hi Gurus,
    I look for my requirement very much but I can't find. I think it must be very simple but I can't do it, please help :
    I have to custom added fields. Both of them is made drop-down list by picklist defined in GET_P...methods.
    When I click and select a value from the first drop-down list, I want that second drop-down values are fully changed, depend on what I select in the first list. If I select my value and press enter in the first drop down box, I can do my requirement with GET_V...method. But if I don't press enter, the values of second list doesn't change, they remain same. I want exactly that when I click and select a value from first drop-down list, second drop-down list values are automatically change, dependent on what selected. Do I have to define and event?? where and how, please help me..

    Hi,
    You must have created the field as a dropdown using the below code in the get_p method.
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter~fp_fieldtype.
            rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
      ENDCASE.
    Here you need to add the below lines of code along with the previous code. for the first dropdown value
      IF iv_property =  if_bsp_wd_model_setter_getter=>fp_server_event.
        rv_value = 'DDLB_CLICK'.
      ENDIF.
    This would refresh the screen when the user selects any value from the dropdown.
    Regards,
    Radhika

  • How do i populate one field based upon a drop down select from another field?

    Here is what I am trying to do:
    Field 1 is a drop down selection list that requires a user to make a mandatory selection which in this case is a list of apartment complexes. What I am trying to accomplish is once that user makes a selection from the drop down list (Field1) that it will populate Field 2 (standard txt) with the corresponding apartment complexes address.
    So I pick Talan Apartments from field 1, it would populate field 2 with Talan Apartments address. I tried messing around with calculation scripts but I'm fighting a loosing battle here. Some help would be greatly appreciated!

    Hi,
    Here is a sample: https://acrobat.com/#d=Hi0ZwVgVB1PWbxc6OJ0z4A where the script in the exit event of the dropdown sets the value of the address object.
    Good luck,
    Niall

  • Is there a way to create form fields to tab into and type and or drop down selection fields in pages as you can with microsoft word?

    is there a way to create form fields to tab into and type and or drop down selection fields in pages as you can with microsoft word?

    No

  • Select customer name from a drop down Select List or be able to type it in

    Hi,
    Is there a way to allow my users to have an option to either select a customer name from a drop down Select List or be able to type it in...
    Thanks in advance

    This is an excellent option for another application but in this one I would prefer a drop down list to allow my users to see all the orders (to pick from the list) or type it in if they can't find it in the list...
    I know how to create a drop down select list but not sure what to do to allow users to be able to manually type in as well...
    Thanks

  • In Ver 4.0, what happened to the drop down selections for previous windows for the current tab?

    In the previous versions of Firefox, in any open tab that had multiple windows open, i. e. from a search where you would go to many different windows, there was a drop down selection to the right of the "back/forward" button that would let you select prior windows ... and always the first one. That is no longer there. It was extremely helpful and I used frequently. Can you add it?

    You can get the drop down list by either right-clicking on the back/forward buttons, or holding down the left button until the list appears.
    If you want the drop-down arrow you can add it with the Back/forward dropmarker add-on - https://addons.mozilla.org/firefox/addon/backforward-dropmarker

  • Drop down selection menu stopped working on Firefox 16

    Hi there,
    I have a drop down selection menu (<select></select>) on my website that triggers an ajax function to display a specific table using jquery's datatable. Prior to firefox 16, the selection menu worked fine. I clicked on the menu, and the options showed up. However, ever since I upgraded to firefox16, the selection menu doesn't work as expected anymore :S
    Here's the thing, first time I clicked on an option, selection menu expanded, and I can click on any option to trigger the table change function. Everything is working fine till that point.
    It's when I clicked on the selection menu the second time, the selection menu stopped working. It didn't even expand and show any options. I checked with firebug (No js error). I tried safemode/hardware acceleration option I read from another thread, it doesn't work either.
    I checked with the firebug console log and I noticed the click event was being triggered whenever I clicked on it, but my selection menu somehow just won't expand (The options are in the html). I checked with all the other browsers as well, and everything seems to be fine (Even the previous version of FF).
    Strangely enough, when I click on any other elements on the website and then go back to clicking that selection menu, the selection menu seems to have reset to my 1st step's state. (It stopped expanding as soon as I chose an option though and I will have to click on another element again.)
    Chuck

    See also [[/questions/935870]]

  • How to modify drop down list values of a screen field in UDM_DISPUTE?

    Hi All,
    I have a requirement wherein i need to modify the drop down list for a screen field depending on the value of the other screen field in transaction UDM_DISPUTE. 
    Please suggest how this can be achived.
    Any BADI 's or any other approach is available?
    Thanks in advance,
    Srilakshmi.

    Hi,
    At what time do you want to modify the drop down list, while creating or after creating the dispute case. There are some BADI's where we can change the attribute drop down list values.
    Thanks,
    Sunil

  • Generic service issue-need to text value on drop down selection

    Hello,
    Below given is the problem scenario.
    I have a dropdown box, on the selection of which values should be filled to the next drop down box.
    It is working perfectly using generic service. When the second drop down box is selected, certain
    values should be shown on the screen. But the values are not appearing on the display texts.
    Let me know the possible causes.
    Thanks,
    Aravind

    solved

  • How do I configure a dynamic table with Data-Drop Down selections to store separate values?

    I am attempting to use LiveCycle to create an Order Form that uses an ODBC to a SQL database. When a user makes a selection, a separate column in the table references the "Item #" associated in the SQL table, and generates a corresponding barcode.
    My problem is that when I select an Item from the drop down list, all the items in the table change. What am I missing here to separate the rows as different line items? I tried adding a [*] to the end of the connection string, and that allows me to select different options but does not generate the "Item #" or "Barcode" field.
    The screenshot below shows the basic form. When I select any of the data drop downs, all of the Items change.
    I used the auto generated script for the "Add Row +" button shown below. Is this my issue? Or do I need to alter the way I'm setting up the Data Binding in for my Data Drop Down?
    this.resolveNode('Table1._Row1').addInstance(1);
    if (xfa.host.version <8) {
      xfa.form.recalculate(1); }

    package pruebadedates;
    import java.sql.*;
    * @author J?s?
    public class ClaseDeDates {
        /** Creates a new instance of ClaseDeDates */
         * @param args the command line arguments
        public static void main(String[] args) {
            java.sql.Date aDate[] = null;       
            Connection con = null;
            Statement stmt = null;
            ResultSet rs = null;
            try{
                Class.forName("com.mysql.jdbc.Driver").newInstance();
                con = DriverManager.getConnection("jdbc:mysql://localhost/pruebafechas", "root", "picardias");
                    if(!con.isClosed()){
                    stmt = con.createStatement();
                    stmt.executeQuery ("SELECT dates FROM datestable");
                    rs = stmt.getResultSet();
                        while (rs.next())
                        aDate[] = rs.getDate("dates");
            catch(Exception e)
               System.out.println(e);
            //System.out.println(aDate);     
    }Hi, There is my code and the errors that I get are:
    found : java.sql.Date
    required: java.sql.Date[]
    aDate = rs.getDate("dates");
    Actually I have No idea as How to get a Result set into an ArrayList or Collection. Please tell me how to do this Dynamically. I have like 25 records in that Database table, but they will grow, so I would really appreciate to know the code to do this. I suspect my problem is in the bolded part of my code.
    Thank you very much Sir.

  • How to create a drop down box values on design time?

    Hello,
    I have a drop down box that I would like to edit on design time to have the valus 1 to 10.
    Is it possible to doo it on design it or do I have to create a loop in the code to do that?

    See go to LocalDictionary->Data Type-> SimpleType Right Click and create a Simple Type giving some Package Name
    Once u have created
    There u will see Enumeration Tab and give Key Value Pairs by pressing New Button
    Now Create a Context Attr and at Type property select that three dots
    Then go to Dictionary Simple Type and select the Package u have given
    then select the Simple type u have created
    Then assign the context Attr to the UI Element
    Message was edited by: krish kanth

  • Drop down list value dependant on value in another drop down list

    Hi
    I am not familiar with Java Script so if anyone can advise me on this I would be grateful.  I am using ADobe Livecycle V8.0.
    I have two drop down lists - DDL1 and DDL2.
    The choices in DDL1 are "High, Medium, Low, None"
    The choices in DDL2 are "Positive, Negative, None"
    If "None" is selected in DDL1 I want DDL2 to display "None". 
    If any of the other values are selected in DDL1, then I don't want anything autofilled in DDL2.
    Hope this makes sense!
    Thank you.

    This should do the trick:
    in the "change" event of DropDownList1, put this:
    if (xfa.event.newText == "None"){
    DropDownList2.selectedIndex = 3; // at pos. 3, you should have "None"
                                                           // otherwise change here at your convenience
    else {
    DropDownList2.selectedIndex = 0; // here first element empty/default
                                                            // maybe you prefer the last one
    Note that generally dropdown boxes have the first or last element empty/default; this way, when you script the "else" part, you can easily reset DropDownList2.

  • Drop down selection is not refreshing the page data correctly

    I have a drop down menu for a CREATE DATE. The record is based on a Identification ID. This identification ID can be in our system for multiple CREATE DATES. The CREATE DATE drop down is populated by checking how many different CREATE DATES there are for a particular identification ID.
    The last identification ID looks great. It populates all the fields. However if you select an older CREATE DATE, the page does not get populated with that CREATE DATES data. The whole page even looks different. It looks like an older version of the page before I added all the new fields.
    What is causing the older CREATE DATES not to look like the current create date.
    Please let me know if you need any additional information. Thank you!!
    Pattibz

    Thank you for your reply. Here are some details. Please let me know if I am not giving the information you need.
    One page item called CREATE_DATE displayed as a Select LIST with submit. The source type is a database column called ID_IDENT. The ID_IDENT is just a
    The List of Values is: Named LOV is the Select Named LOV. The list of values definition is a query against a table in our database:
    select CRE_DT, ID_IDENT from IDENT_TABLE where UNIQ_ID = :P3_UNIQ_ID
    ORDER BY CRE_DT DESC
    This is the date on which the ID_IDENT data was created. The date is displayed in a pull down menu, which allows you to select from a list of available "as of" dates when viewing the data. Only data on the most recent ID_IDENT record may be manually altered.
    I have a UNIQ_ID = '34587443'. It acutally has records in the database with that UNIQ_ID. The only difference is the create date. On record of 345778 was done on 10/1/2008 and the current date 10/13/2008.
    I see these two dates in the CREATE_DATE pull down menu. This is fine. The drop down orders the dates by DESC so I have the lastest date on top fo the pull down.
    If I want to pick the date of 10/1/2008, I need go into the web page, open the Create Date pull down and select the older date.
    When I pick the older date 10/1/2008, the page does not look the same as the defaul tor oldest time date and numbers.
    The page is different and most of the data on the webpage is there.
    What should have happened is that I choice the newer date from the drop down, the page refreshes with the data from 10/1/2008
    and all the parameters are displayed from the date of 10/1/2008. It isn't only part of the fields are being populated and the page itself doesn't refresh to the look of the original page. Thank you.
    Edited by: pattibz on Sep 12, 2008 11:15 AM

Maybe you are looking for