Set Default value in dropdown box.

I used selection= "Default Value" in dropdown box to do this functionality.But when i selected other value it is
selecting the default value and saving also.but i want that page initiated the default value should be there and user can select other values and save.
Please give me solution for that as soon as possible.
Thnks in advance.

Actually i m using the following code and it is fetching value from a table.Can u understand this code n provide me solution for default value.
<htmlb:gridLayoutCell columnIndex       = "5"
                              rowIndex          = "2"
                              colSpan           = "1"
                              wrapping          = "FALSE"
                              verticalAlignment = "TOP" >
          <htmlb:dropdownListBox id                = "unitDropdownListBox"
                                 table             = "<%= IT_MSEHI %>"
                                 nameOfKeyColumn   = "MSEHI"
                                 nameOfValueColumn = "ZMSEHI"
                                 onSelect          = "setunitValue"
                                 disabled          = "<%= LV_MODEITEM %>"
                             selection         = "<%= it_item-unit %>" />

Similar Messages

  • How to Set default value to dropdown list in oracle ADF

    hi,
    I need to set default value in the drop down list in oracle ADF.
    If you take in HTML :
    <select>
    <option value="">Select Value </option>
    <option value="saab">Saab</option>
    <option value="mercedes">Mercedes</option>
    <option value="audi">Audi</option>
    </select>
    Like this i need to set default value in drop down llist in oracle ADF.
    Thanks and Regards,
    M. Ramu.

    Hi Ramu,
    Please be more clear on ur post whts ur Jdev version and wht type of dropdown u r using model driven or static list..?????
    Its hard to help u without proper info..
    Just have a look into this before u post a thread...
    https://forums.oracle.com/forums/ann.jspa?annID=56
    Regards,
    Suganth.G

  • Set Default Value  In list box

    Dear All,
                   I am using the F4IF_INT_TABLE_VALUE_REQUEST this FM for filling the list box .Now i want to set  default value in the list box
    Example-
    Supose i have 2 List box  A & B and in list box i have to set default value in A list box X value and in B list box Y value .
    X and Y value is coming in the list box from the master table .
    Thanks & Regards

    Code Snippet for your referance:
    *F4 Help for Output Type
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_KSCHL
    DATA: l_repid TYPE syrepid,
            l_dynnr TYPE sydynnr.
      MOVE: sy-repid TO l_repid,
            sy-dynnr TO l_dynnr.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'KSCHL'
          dynpprog        = l_repid
          dynpnr          = l_dynnr
          dynprofield     = 'P_KSCHL'
          window_title    = text-001
          value_org       = 'S'
        TABLES
          value_tab       = it_value_tab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3

  • How to Set Default Value of Dropdown Menu on Screen Painter

    Hi,
    I have 2 dropsdown menu, the first one's dropdown values are taken as defined (input1 TYPE bcont-type). The second dropdown values are defined using FM vrm_set_values. How do I set the default value for both dropdown in screen painter?

    Hi,
    Try this
    PARAMETERS: P_EBELN TYPE EKKO-EBELN MODIF ID S1 AS LISTBOX VISIBLE
      LENGTH 20.
    ID = 'P_EBELN'.
    VALUE-KEY = 1.
    VALUE-TEXT = 'Hi'.
    APPEND VALUE TO T_DROP.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        id                    = ID
        values                = T_DROP
    EXCEPTIONS
       ID_ILLEGAL_NAME       = 1
       OTHERS                = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE T_DROP INTO WA_DROP INDEX 1.
    P_EBELN = WA_DROP-TEXT.

  • How can we set default value within html:file

    Hai,
    To set default value to text box i use the following code. It works well.
    <html:text property="modifyserverdesc" value="<%= serverDesc%>" styleClass="text" size="38"/>But for file i use the code
    <html:file styleClass="file" property="modifyserverimgfile" value="<%= serverImage%>" size="40"/>It doesn't display value. What is problem here?

    Hi,
    guess that one option in a RowImpl would be to check if the attribute is null or if the attribute value can be found in the VO that populates the list. If first is true or seconds false (cannot be found) you return the first value of the VO, making it the current attribute value
    Frank

  • Plsss help me: how to set default values in html:file and html:radio

    Hai,
    To set default value to text box i use the following code. It works well.
    <html:text property="modifyserverdesc" value="<%= serverDesc%>" styleClass="text" size="38"/>But for file i use the code
    <html:file styleClass="file" property="modifyserverimgfile" value="<%= serverImage%>" size="40"/>It doesn't display value. What is problem here?
    how to set default selection in <html:radio>.

    No it won't help.
    You can't set a value into an <input type="file"> control at all. The user has to put values in themselves.
    The reason behind this is security. If the programmer could put any value they liked in there, you could upload any file at all from a users computer without their intervention. eg C:\windows\system32\passwords.txt
    Bottom line: you can't put a default value into the input type="file" control.
    And a good thing too ;-)

  • To set Default values for web items in WAD

    Hi Experts,
          I am designing the web templates. There, I placed some drop-down boxes. In that item, I would like to set default values.
          Usually in the drop-down box, 'show all values' is selected. Instead of displaying all values, the drop-down box should be set to the filter value.
           Pls give me the solution to sort out the problem....
    Yours,
    Yokesh.

    are you using 7.0 or 3.x?
    in 7.0 you can use the webcommands of the webTemplate.
    Use Dataprovider commands and there is an option for assigning a default value.
    To eliminate All Values, unchecked it for the dropdown box.
    hope it helps,
    have a nice day
    DavidG

  • Extending flash: how do I set default values for filenames

    Hi,
    I am trying to set default values for filenames
    <choosefile> and <popupslider>s that will show up when
    my XMLpanel first loads in my jsfl extension file. It seems that I
    can only set default values for textbox items.
    How do I do this for filenames and popups?
    As a workaround, I also tried using a flash object dialog box
    to look like a <choosefile>, or any jsfl command, but then
    how do I return those values back to the XMLpanel that calls them.
    and pass the data back to my jsfl script.
    lemme know if you know a way,

    Create two constants for the Allocate Mode input (right click > create > constant). Place one in the true case of the case structure, and place the other one in the false case. Wire them to the same tunnel (border of the case structure), then wire the tunnel to the Allocate Mode terminal of the AO Config. I don't have Traditional DAQ installed, but that should do it.
    Misha

  • How to set default values in matrix combo

    hai everybody.
    i want to set default values in a matrix combo box. how to do that
    pls.......

    Hi Priya,
    Public Sub comboload1()
            Try
                ds = oform.DataSources.DBDataSources.Add("OUSR")
                oitem = oform.Items.Item("pm7")
                omatrix = oitem.Specific
                ocolumns = omatrix.Columns
               ocolumn = ocolumns.Item("V_2")
               ocombo = ocolumn.Cells.Item(r).Specific (r = row number)
                LoadEroToCombo1(ocombo)
            Catch ex As Exception
                oapp.MessageBox(ex.Message)
            End Try
        End Sub
    load to combo function is below
        Public Sub LoadEroToCombo1(ByRef ocombo As SAPbouiCOM.ComboBox)
            Dim rset As SAPbobsCOM.Recordset
            Dim querystring As String
            Dim rcount As Long
            Dim rindex As Long
            Try
                rset = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                querystring = "SELECT T0.U_NAME FROM OUSR T0"
                rset.DoQuery(querystring)
                rcount = rset.RecordCount
                rset.MoveFirst()
                ocombo.ValidValues.Add("0", "Select")
                For rindex = 0 To rcount - 1
                    ocombo.ValidValues.Add(rset.Fields.Item(0).Value, rindex)
                    rset.MoveNext()
                Next rindex
                ocombo.Select("0")
                rset = Nothing
                System.GC.Collect()
            Catch ex As Exception
                oapp.MessageBox(ex.Message)
            End Try
        End Sub
    try this code if it helps please reward points
    Regards
    Cool Ice
    Edited by: Cool Ice on Jul 28, 2008 1:43 PM

  • How to set default value to relationship filed(ess~my~fam)new child

    Hi Experts,
    i have a standard ESS Application for Family members/dependents for Malaysia(essmyfam)-->New child
    When i click on new child a view gets opened withcontains relationship field with dropdown.Kdsvh is the field that is binded to dropdown.By default downdown is empty,when i click on dropdown it contains some values(Legitimate,adopted,others).
    my problem is node binded to dropdown(selectedinfotype) contains many attributes.so how can i set default value as others from values that dropdown contains.
    Code i tried
    In wdinit of Vcperfamilymydetail component
    wdContext.currentSelectedInfotypeElement().setKdsvh(wdContext.nodeSelectedInfotype().getSelectedInfotypeElementAt(3).getKdsvh());
    Error: Indexoutofbond exception
    Reply is Highly appreciated..
    Thanks
    Shikore
    Edited by: kishore shikore on Aug 18, 2009 6:09 PM

    Hi Kishore,
                    you can set the lead selected value while adding the vales to drop down. let say u are getting the data from model node say "Test".
    use the below code in doinit method:
    int size = wdContext.nodeTest().size();
    for (int i-0;i<size;i++){
    ITestElement test = wdCOntext.nodeTest().getTestElement(i);
    ISelectedInfotypeElement element = wdContext.nodeSelectedInfotype().createSelectedInfotype();
    element.setKdsvh(test.getKcsvh());
    wdContext.nodeSelectedInfotype().addElement(element);
    if("Others".equals(test.getKdsvh())){
    wdContext.nodeSelectedInfotype().setleadSelection(element.index());
    Hope it helps
    Thanks and Regards

  • Set default value based on sql query?

    Hi,
    is it possible to set default value of an BC entity attribute by using sql expression?
    Eg. "select max(x)+1 from y where userid=?"
    Rgs
    Jernej

    Jernej,
    Yes, you can do this. Edit your entity object attribute, and in the Edit Attribute dialog select "Derived from SQL Expression". Then you can enter your expression in the Expression text box.
    Blaise

  • Set default value for product type

    I want to set default value in product type drop  down box
    in component PRD01QR.
    view  SearchHelp.
    I tried with setter and getter , but not working
    they are using query string.

    Hi,
    You can achieve this by redefining the method GET_VH_PRODUCT_TYPE() in IMPL class of searchHelp view. Just copy paste the implementation of this method from super class and now control the internal table as per your requirement like
    comment out the line       APPEND INITIAL LINE TO lt_ddlb. (line no: 47)
    as it will add an empty line at the starting of internal of product type values which you dont want. In you case there should be some default value for product type field, so arrange the inetrnal table values according to you requirement and what ever value you want to default for product type that should be the first value in the drop down without empty line and add an empty line at the end of the internal table.
    No need to call super->GET_VH_PRODUCT_TYPE() in your implementation as you have written all the required code in your implemenation itself.
    Hope this would help you!
    Regards,
    Ajay

  • Set Default Values in Listbox with Dialog Programming

    Hi all,
    I am stuck with a problem i.e  I am working with Dialog Programming Screen
    where i have to set default values in some n numbers of Listbox which i have created on Screen.
    This default value is needed to be fetched from database table.
    I am using single table. Hence no confusion that i have to first fetch data from 1st listbox then corresponding data is fetched into second & so on ..NO NO This is not required.
    Simple one screen which will update a table in database, where  some fields on the screen needs to be default set as per tables domain default values set while table creation.
    Please help me out in this.
    Thanks & Regards,
    Sandhya.

    Please search SDN, before you post a new forum from next time... any ways just follow the below code..
    u need to use the FM 'VRM_SET_VALUES' to implement list box in module pool. Check the below code. u have to write this code in PBO..
    if c = 0.
    select land1 landx from t005t into table wi_country.
    sort wi_country by land1.
    delete adjacent duplicates from wi_country comparing all fields.
    loop at wi_country.
    wa_ctry-key = wi_country-land1.
    wa_ctry-text = wi_country-landx .
    append wa_ctry to wi_ctry.
    endloop.
    call function 'VRM_SET_VALUES'
    exporting
    id = 'ZCUST_MASTER1-COUNTRY'
    values = wi_ctry
    exceptions
    id_illegal_name = 1
    others = 2
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    c = 1.
    endif.
    Hope this helps u,
    Regards,
    Rajesh

  • Default value in list box

    hi,
    i need to know how to set default value for a list box in selection screen.

    Hi
    check this code
    at selection-screen output.
      name = 'P_DATE'.
      value-key = '1'.
      value-text = 'Today'.
      append value to list.
      value-key = '2'.
      value-text = 'Last 7 days'.
      append value to list.
      value-key = '3'.
      value-text = 'Last 30 days'.
      append value to list.
      value-key = '4'.
      value-text = 'Last 90 days'.
      append value to list.
      value-key = '5'.
      value-text = 'Last year'.
      append value to list.
    Call the ''VRM_SET_VALUES' to display the values in Listbox
      call function 'VRM_SET_VALUES'
        exporting
          id     = name
          values = list.
    at selection-screen.
      if sy-ucomm = 'CLI1'.
        sscrfields-ucomm = 'ONLI'(001).
      endif.
      if p_date = '1'.
        p_date11 =  sy-datum .
      elseif p_date = '2'.
        p_date11 = ( sy-datum - 7 ).
      elseif p_date = '3'.
        p_date11 = ( sy-datum - 30 ).
      elseif p_date = '4'.
        p_date11 = ( sy-datum - 90 ).
      elseif p_date = '5'.
        p_date11 = ( sy-datum - 365 ).
      endif.
    Reward points if useful...
    Regards
    Sreenivas

  • Combobox - set default value; get selected value

    Hi!
    I have a combobox (h:selectOneMenu) in my application. I put the values in it from a java bean. I would like to set the default value of combo box, but I don't know how.
    And I would like to know which value is selected, but I don't know as well.
    Please help mt to find the solution of these 2 problems!
    Thanks!
    rfalir
    ******************************* JSP ***************************
    <h:selectOneMenu id="type" binding="#{myComboBoxValuesBean.myBindingValuesForType}">
    <f:selectItems value="#{myComboBoxValuesBean.valuesForType}"/>
    </h:selectOneMenu>
    ***********************************bean***********************************
    package bean;
    import java.util.HashMap;
    import java.util.Map;
    import javax.faces.component.html.HtmlSelectOneMenu;
    public class ComboBoxValuesBean {
         HtmlSelectOneMenu myBindingValuesForType;
         Map valuesForType;
         // ************************** getter **************************
         public HtmlSelectOneMenu getMyBindingValuesForType() {
              return myBindingValuesForType;
         public Map getValuesForType() {
              if (valuesForType == null) {
                   initValuesForType();
              return valuesForType;
         // ************************** setter **************************
         public void setMyBindingValuesForType(HtmlSelectOneMenu myBindingValuesForType) {
              this.myBindingValuesForType = myBindingValuesForType;
         public void setValuesForType(Map valuesForType) {
              this.valuesForType = valuesForType;
         // ************************** others **************************
         private void initValuesForType() {
              valuesForType = new HashMap();
              valuesForType.put("Karakter","C");
              valuesForType.put("Sz�m","N");
              valuesForType.put("D�tum","D");
    }

    h:selectOneMenu works as following:
    JSF<h:selectOneMenu value="#{myBean.selectedItem}">
        <f:selectItems value="#{myBean.selectItems}" />
    </h:selectOneMenu>MyBeanprivate String selectedItem;
    public String getSelectedItem() {
        if (selectedItem == null) {
            selectedItem = "key2"; // default value;
        return selectedItem;
    public void setSelectedItem(String selectedItem) {
        this.selectedItem = selectedItem;
    public List getSelectItems() {
        List selectItems = new ArrayList();
        selectItems.add(new SelectItem("key1", "value1");
        selectItems.add(new SelectItem("key2", "value2");
        selectItems.add(new SelectItem("key3", "value3");
        return selectItems;
    }

Maybe you are looking for