How to Change a Default Value from Drop Down Box displayed in Web Dynpro?

Hi,
How to Change a Default Value from 'High' to 'Low'  in a Drop Down Box for RANGE field displayed in Standard Web Dynpro Component.  I saw a Default Value set for a RANGE field  in View Context When I select that field and click on Display. I am seeing Default Value set it to 'HI'. Please let me know how to change from HIgh to Low.
I appreciate your help!
Thanks,
Monica

hi,
use the set_attribute( ) method now to set the attribute with a particular key eg HIGH in ur case
// u can use the code wizard( control +f7) this code will be auto generated when u select the
//radio button to read the context node
DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
  DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
  DATA ls_cn_node TYPE wd_this->element_cn_node.
* navigate from <CONTEXT> to <CN_NODE> via lead selection
  lo_nd_cn_node = wd_context->get_child_node( name = wd_this->wdctx_cn_node ).
* get element via lead selection
  lo_el_cn_node = lo_nd_cn_node->get_element(  ).
* set single attribute
  lo_el_cn_node->set_attribute(
      name =  `ATTribute name.`
      value = 'LOW' ).
it will solve ur query ..
also refer to this component
wdr_test_events -> view dropdownbyidx and dropdownbykey ->method name onactionselect.
regards,
amit

Similar Messages

  • How to set default value for drop down box in jsf

    Hi,
    Can anyone help me to set the default value in drop down box using <af:selectManyChoice> ?
    As I know there is an unselectedLabel attribute in <af:selectOneChoice> but not valid attribute for <af:selectManyChoice>.
    Any help must be appreciated.
    Regards,
    AK

    Hi Frank
    My entity type is a List in managed bean. I have set the entityType in the constructor of the managed bean. I have attached my code here.
    TPSearchCriteriaBean.java****************************************
    /** Constructor */
    public TPSearchCriteriaBean() {
    super();
    entityType=new ArrayList<String>();
    entityType.add(UIConstants.LIST_ITEM_ALL);
    authorizationType=new ArrayList<String>();
    authorizationType.add(UIConstants.LIST_ITEM_ALL);
    companyType=new ArrayList<String>();
    companyType.add(UIConstants.LIST_ITEM_ALL);
    mrgStatus=new ArrayList<String>();
    mrgStatus.add(UIConstants.LIST_ITEM_ALL);
    legalStatus=new ArrayList<String>();
    setEntityType(entityType);
    setAuthorizationType(authorizationType);
    setCompanyType(companyType);
    setMrgStatus(mrgStatus);
    country = "0";
    //address = new AddressBean();
    UIConstants.java***********************************************************
    public static final String LIST_ITEM_DEFAULT = "select";
    public static final String LIST_ITEM_ALL = "0";
    LOVManager.java*****************************************************************
    public List<SelectItem> getLovList(String lovType, boolean requiredOption_SELECT, boolean requiredOption_ALL)
    log.debug("LOV loading for " + lovType + ": START");
    List<SelectItem> lovList = new ArrayList<SelectItem>();
    //check validity of lov loading request
    validLov:
    for (int i = 0; i < lovTypeArray.length; i++)
    if (lovTypeArray.equals(lovType))
    break validLov;
    log.debug("ERROR: LOV Type not valid.");
    return lovList;
    //First select is replaced by ALL here
    //<-- Select --> should be an option
    if (requiredOption_SELECT)
    lovList.add(new SelectItem(UIConstants.LIST_ITEM_DEFAULT, "--Select--"));
    LOVDao dao = new LOVDao();
    dao.loadLOVValues(lovType, lovList);
    log.debug("LOV Loading successful!");
    //<ALL> should be an option
    if (requiredOption_ALL)
    lovList.add(new SelectItem( UIConstants.LIST_ITEM_ALL, "ALL"));
    return lovList;
    Kindly help me.
    Regards,
    AK

  • PCUI : Changing the Default in the drop down box.

    Dear Gurus,
      How can I change the dropdown default in the show dropdown box of Lead application from "My Favorites" to "My Leads". Also, if I want to add an extra listing in this dropdown box how do I achieve it.
    Thanks in advance!
    Vivek.

    You are in 4.0, i did't remember the GET dropdown as it is not there in 5.0 release.
    GET dropdown gets its values from the fieldgroup(FG) assigned to the search area. There is rule to display fieds in the get dropdown. It takes all fields in the FG which are visible in the LIST. <b>FIRST</b> field in the FG will be shown as default in the GET DDLB.
    <i>For example look at the CRMM_ACCOUNT shows Account ID as default. Because field PARTNER1 is first field the FG ACC_SEARCH_LOG_11 which is inlcude in the FG ACC_SEARCH_04. Move the SORT1 field to position 1 in FG ACC_SEARCH_LOG_11. Now "Sort term 1" will be defaulted in the GET DDLB</i>
    Hope this will solve the problem.
    Raj

  • How to capture selected value from drop down by index

    Dear friends,
    i want to capture the value of select value from drop down by index, for eg if  select air france, how to capture , could any one please let me know
    Thanks
    Vijaya

    Hi Vijaya,
    You can get the value of selected from drop down as below
    Check out the event handler method attached to Onselect event of the ui element drop down by index , if no event is associated, then create an event and attach to the drop down list
    Now you will be having the CONTEXT_ELEMENT in the WDEVENT parameter
                   data lo_element type ref to if_wd_context_element.
                   lo_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT').
    Now, you can get the static attribute value of selected  drop down value & let us say your drop down list values are populated from context node 'ND_DRP_DOWN'
                   data ls_data type wd_this->element_nd_drp_down.
                             lo_element->get_static_attributes(
                                       importing
                                       static_attributes = ls_data ).
    Hope this helps you.
    Regards,
    Rama

  • How to change a date value from "java.util.Date" to "java.sql.Date"?

    Hi all,
    How to change a date value from "java.util.Date" to "java.sql.Date"?
    I m still confusing what's the difference between them.....
    thanks
    Regards,
    Kin

    Thanks
    but my sql statement can only accept the format (yyyy-MM-dd)
    such as "select * from xx where somedate = '2004-12-31'
    but when i show it to screen, i want to show it as dd-MM-yyyy
    I m using the following to change the jave.util.Date to str and vice versa. But it cannot shows the dd-MM-yyyy. I tried to change the format from yyyy-MM-dd to dd-MM-yyyy, it shows the wrong date in my application.
         public String date2str(java.util.Date thisdate)     {
              if (thisdate != null)     {
                   java.sql.Date thissDate = new java.sql.Date(thisdate.getTime());
                   return date2str(thissDate);
              }     else     {
                   return "";
         public String date2str(java.sql.Date thisdate)     {
              if (thisdate != null)     {
                   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                   return sdf.format(thisdate);
              }     else     {
                   return "";
         public java.util.Date str2date(String thisdate)     {
              String dateFormat = "yyyy-MM-dd"; // = 1998-12-31
              java.util.Date returndate = null;
              if (thisdate != null)     {
                   SimpleDateFormat dateFormatter = new SimpleDateFormat(dateFormat);
                   try {
                        returndate = dateFormatter.parse(thisdate);
                   } catch (ParseException pe) {
                        System.out.println (pe.getMessage());
              return returndate;
         }

  • How to change the Unitprice value from 2 decimals to 3 decimals in script

    Hi Gurus,
    how to change the Unitprice value from two decimals to three decimals for each item level for PO in script.
    Please provide some possible solutions.
    Thanks,
    V.V.

    Hi,
    Check the options available like
    &VAR(.2)&  this will print 2 decimals
    &VAR(.3)&  this will print 3 decimals
    need to change the value for how many decimals you need
    Thanks & Regards
    Sarves Sombhatla

  • How can I remove a mailbox address from the "From" drop down box in a new e-mail my old e-mail address continue to populate as the sender address

    How can I remove a mailbox address from the "From" drop down box in a new e-mail my old e-mail address continue to populate as the sender address

    Hello,
    Try Mail>Preferences>Accounts icon>Account Information tab>Click on the Outgoing SMTP server drop down, choose edit Server list, highlight the old one & click Remove.
    (Such convolution is worthy of Windows® in my estimation)

  • How do I stop the toolbar from dropping down when I load a program?

    How do I stop the toolbar from dropping down when I load a program?  When  I close a program Like world or Warcraft for example the toolbar keeps opening up when the World of Warcraft manager reopens How do I stop this for this and other programs
    I use, its really annoying and should be fixed or a setting made to stop it from doing this entirely.
    KingOfMyPC58

    Hi,
    Could you please share a screenshot here with us for better understanding this issue.
    Regarding to “other programs”, what are these programs, more detailed information would be very helpful.
    Regards,
    Yolanda
    Yolanda
    TechNet Community Support

  • Max of values in drop-down-box

    Anyone know how many velues can be coped by drop-down box? Somewhere I read it can cope with 500 values. Is that right? Or it can cope more?
    Thanks in advance.

    Hi Sanjaya,
    I think it's not important if a dropdown can cope more than 500 values, because this wouldn't be user friendly. In that case you should use a value help.
    Best Regards,
    Marcel

  • How can I insert a spreadsheet containing drop down boxes and links to other spreadsheets into a keynotes slide?  Please help :(

    How can I insert a spreadsheet containing drop down boxes and links to other spreadsheets into a keynotes slide?  Please help
    I need to retain all the formula's and the sheets these formulas are linked from.

    Have you considered switching out of Keynote and over to your spreadsheet program when you get to this slide? If you launch the speadsheet program before Keynote you can switch using Command-Tab. You can then switch back into Keynote when you are done.
    I realize that this is not what you were looking for but I don't think it is possible to do exactly what you want.

  • How to get ALL values as default for  a drop down box in JSF

    Hi,
    I have a drop down box in JSF page which retrieves values from LOVCache.java. I have values like Company, Client, User, ALL in the drop down box.
    By default blank value is selected for the drop down box. I want to make ALL(which retrieves data for all the values) as default value for the drop down box.
    Could any body help me? Any help must be appreciated.
    Thanks,
    Aseet

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • How to show first parameter value in drop down list as a default value dynamically in ssrs report?

    Hi,
    in my ssrs report i have two parameters, accounts and Manager ,there is a cascading between the accounts parameter and manager parameter, as per the cascading we will get managers names based on the account we selected in the accounts parameter,
    my requirement is the first name in the mangers drop down list  has to get selected as default value.
    please help me with this, it is an urgent requirement.
    Thanks in advance,
    Naveen

    Hi NaveenMSBI,
    According to your description, you want to use cascading parameters in the report, if the accounts are selected when you preview the report, the first manager name will be selected from drop down list as the default value. If so, there can be two scenarios:
    • If manager is single-valued parameter, we can get Available Values and Default Values from the same query as below. Then when the accounts are selected, the first manager name will be selected as default value.
    SELECT managerName FROM table_name WHERE accounts IN (@accounts)
    • If manager is multi-valued parameter, we need to use different query for Available Values and Default Values. In this case, please refer to Patrick’s solution.
    For more information about Adding Cascading Parameters, please refer to the following document:
    http://technet.microsoft.com/en-us/library/aa337498(v=sql.105).aspx
    If you have any questions, please feel free to let me know.
    Best Regards,
    Wendy Fu

  • How to dynamically get default value from a table column

    Hi all,
    Here's my problem: Our front end application sends insert and update queries to a pl/sql package. I've got a procedure that gets a PL/SQL table with all the column names an values, a table-name and a primary key name and value. That procedure creates an insert or update statement. So far, so good.
    Now the problem: our front end doesn't know what the default value for a column is. So when a number field doesn't get a value in the front-end, it's inserted with a value '0' though is should ben NULL. My sollution for this is to know the default value of a column: when there's a default of '0', then the value that will be inserted is '0'. When there's no default value and the column can ben NULL, it'll be inserted as NULL. if the column has a not null constraint, a '0' will be inserted.
    Ofcourse I can get the default value from the system-views all_tab_columns or user_tab_columns, but our application is installed at some 100 clients, and has various database installations. Most of the times, the tables are in the same schema as our procedure that performs the insert or update, but sometimes some of the tables are in another schema (in the same database) and also sometimes some tables are stored in another database. In all these situations, a synonym for that table exists in the schema.
    Is there a api function or procedure that I can call to get the default value of a column? I looked at dbms_sql and dbms_metadata, but those packages don't give me that perticular information. if not, I'll stuck with the 'does table exists in schema' yes->use table, no query user_synonyms to look for the owner of the table (and database link) and query all_tab_columns to get the default value. Only this seems a bit overkill to me.
    I hope I'm clear enough? And please don't reply with "don't do inserts this way"! I know, this is not the most optimal sollution, but it does gives us a couple of advantages in our application...

    there is no way that I can think of, apart from what you have already discovered (i.e. views), where you can determine if a column has a defuault value defined against it.
    The other option is triggers, but I guess doing that across 600 tables would not be an option, and besides I stay clear of triggers.
    A different approach therefore, if you cannot pre-determine the data, is to consider a post problem handler, hence I suggested the use of an exception handler.
    The exception handler works regardless of whether the statement is dynamic or not.
    SQL> truncate table abc;
    Table truncated.
    SQL>
    SQL> declare
      2    NULLVAL exception;
      3    pragma exception_init(NULLVAL, -01400);
      4 
      5  begin
      6 
      7    begin
      8 
      9      execute immediate 'insert into abc (y) values (1)';
    10 
    11      exception
    12        when NULLVAL then
    13          -- handle the error
    14          execute immediate 'insert into abc (x,y) values (0,1)';
    15 
    16    end;
    17 
    18    commit;
    19   
    20  end;
    21  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from abc;
             X          Y
             0          1

  • Extracting values from drop down buttons html forms

    Hello,
    I would like to know how to obtain the values which is selected through the drop down box. Iam using Java Script as a client side scripting lang..
    Here is my code so far..do let me know what to do further. Iam not getting the alert mesg which is sitting in the put() so let me know how the put method should work
    Thanks a lot
    avis
    <HTML>
    <HEAD>
    <script language="javascript" type="text/javascript">
    <!-- hide
    function put()
    choice = document.forms.Pri.list.optionsdocument.forms.Pri.list.selectedIndex]
    if (choice ="0")
    alert("enter state"+choice);
    function goto()
    Pri.list.options.value=" "
    //end -->
    </script>
    </HEAD>
    <BODY>
    <form name="Pri" method = "get" action="">
    State<SELECT NAME="list" onChange="put()">
              <OPTION>
    <OPTION>Alabama
    <OPTION>California
              </SELECT>
    <input type="submit" Value="Submit">
    <input type=button name="Reset" value=Reset onClick=goto()>
    </form>
    </BODY>
    </HTML>

    I'm not sure what you're talking about... if you don't select an option from the list, the onchange function isn't going to be called, so of course the the alert isn't working.
    You sound like you are complaining that when the form submits, the value for the select list is the first option (""). I fail to see why this is a problem. If the value is "", then you handle it like nothing was selected. In a single select list like that, an option is always selected. The whole point of having a blank option is to allow the user to pick it. Otherwise don't put a blank option.
    In general, you don't need to use a button to do reset, you use a reset button: input type="reset". And it'll reset on it's own.

  • Changing Values of Drop Down Box??

    I have created a form that has 100 drop down boxes, each drop down box has the same values for the user to choose. I would like to know if it is possible to remove the selected value from the remaining drop downs once it has been selected?
    Example:
    Drop Down Box 1: user selects "A" when the user moves to Drop Down Box 2 "A" is not available for selection but the remaining values are. User Selects "B", moves to Drop Down 3 and both "A and B" are not available for selection.
    I hope this makes sense and can't figure out how to make this happen, I am a fairly new user to LC and would appreciate any help. Thank you for your time!!

    Hi,
    While technically you can do this, I think that it would be a poor performance because the script would need to loop through the 100 dropdowns.
    You would need to place script in the preOpen event of the dropdowns, that loops through and looks at previous selections.
    I worked this up over the weekend, but it is not 100%. http://assure.ly/KXAUg5.
    The script in the preOpen event calls a function in the AssureDynamics script object (see the Hierarchy).
    Hopefully someone can pick up the running on this, as I wont be able to for the week.
    Good luck,
    Niall

Maybe you are looking for

  • Open interface error ...Preventing us from closing May-11

    Hi All we are running ERP 12.0.6 on solaris machines. IT was not allowing us to close MAY-11. Reason was there were some 22 error records in TRANSACTION OPEN INTERFACE. I cloned the PRODUCTION INSTANCE to TES to reproduce the problem and deleted all

  • How do you send photos from a Windows 7 64 bit desktop computer to a 2nd gen Apple TV.

    I've gone through the other posts and tried every suggestion. Both the Apple TV and Itunes are up to date. Ive tried disabling the firewall, unchecked Internet Protocol Version 6 (TCP/IPv6), stopping and starting Bonjour, stopping and starting the Ap

  • Forgot to answer security questions

    Hi Hi, I forgot to answer a security question What Will do. Can you please help me or if I create an Apple ID and credit I transfer it to the new Apple ID and play pure again or active rescue email . I'm grateful if you help

  • My list of songs not displaying

    When I bring up itunes it not listing my purchased songs.  With this new itunes software apple changed the format and I can't seem to figure it out.  I know it has to be easy but I'm at a loss.  Thanks for your help.

  • Crashes every few minutes - no consistent trigger

    i uninstalled and re-installed. Clean out my fonts. but it's still crashing every few minutes and there seems to be no consistent trigger. Here is a copy of the problem report: Process:         Adobe InDesign CS6 [2489] Path:            /Applications