Webdynpro " How to add values in Drop down list By Key"

Hi experts ,
i want to create a drop down list by key, i don't know how to assign values to it ( i.e. add list entries ) . Please help me on this ..
With regards ,
James..
Valuable answers will be rewarded ....

Hi,
To fix values to the drop down key at runtime in the webdynpro application you can use the following code:
DATA:
lr_node_flightinfo TYPE REF TO if_wd_context_node,
lr_nodeinfo_flightinfo TYPE REF TO if_wd_context_node_info,
l_scarr type scarr,
lt_value_set TYPE TABLE OF wdr_context_attr_value,
lw_value_set like line of lt_value_set.
get nodeinfo of node flightinfo
lr_node_flightinfo = wd_context->get_child_node( name = 'FLIGHTINFO' ).
lr_nodeinfo_flightinfo = lr_node_flightinfo->get_node_info( ).
get value set (VALUE = CARRID , TEXT = CARRNAME)
select carrid carrname from scarr into table lt_value_set.
clear lw_value_set.
lw_value_set-value = 'AI'.
lw_value_set-text = 'Air India'.
append lw_value_set to lt_value_set.
sort the value set by the describing TEXT
SORT lt_value_set BY text.
set value to context attribute
lr_nodeinfo_flightinfo->set_attribute_value_set(
name = 'CARRID' value_set = lt_value_set ).
Here CARRID is a drop down by key field on the screen.
in The context it is an attribute in the node FLIGHTINFO.
Please give Reward Points if this piece of code helps
Regards,
Manish

Similar Messages

  • How to add values to drop down list in adobe forms

    how to add values to drop down list in adobe forms

    Hi,
    If you are using WD Java following are steps of filling values in DD Box:
    1 Create a simple type in the Dictionary.
    2 Create an attribute "CountryNew" in the Context of type created by you.
    3 Write following code in the init method of the form:
    IWDAttributeInfo countryinfo =
                   wdContext.nodeEmployee().getNodeInfo().getAttribute("CountryNew");
    ISimpleTypeModifiable Country = countryinfo.getModifiableSimpleType();
    IModifiableSimpleValueSet countryValueSet =
                   Country.getSVServices().getModifiableSimpleValueSet();
    countryValueSet.put("IN", "INDIA");
    countryValueSet.put("US "USA");
    4 Add a Enumrated DD box in the form and bind it to the attribute "CountryNew"
    Hope this helps
    Amit

  • External XML data files to add values to drop down lists

    I would like to have external XML data files to add values to drop down lists in my form.. But when i create a data connection it is working properly only in the Preview in Livecycle Designer.. but not in the PDF form(Adobe Reader). Moreover im not sure whether it will work in the form manager..!plzz help me!
    Raghava Kumar V.S.S.

    Hi,
    For the case of raghavakumar, Is it really that I need to have LiveCycle Reader Extensions? Is there any other way that could do the same?
    Thank you

  • Does anyone know how to Add a date drop down list to a pdf file?

    Can someone tell me how to add a Date drop down list in a form

    There's no built-in function that does that in Acrobat, but there are some third-party tools that do.
    The two most known ones are by FormRouter, which is free and based on form fields (but also a bit buggy), and a non-free version created by Max Wyss, which is based on a dialog object.

  • How to add a interactive drop-down list

    I want a drop-down list that will add a set of required fields based on the choice from the list.
    In this case, we want users to fill in their job title, and based on that title selected we need them to fill in specific licensing information. I haven't found a javascript (or I don't have the expertise) to make this happen. I have done forms in the past that would just hide unneeded fields, but is there a way to actually have the fields become active, or appear based on the list selections? 

    Yes, it's possible. The general code would be something like this (as the drop-down field's custom validation script):
    var field1 = this.getField("FieldName1");
    var field2 = this.getField("FieldName2");
    var field3 = this.getField("FieldName3");
    if (event.value=="Value1") { // Show field1, hide the rest
         field1.display = display.visible;
         field2.display = display.hidden;
         field3.display = display.hidden;
    } else if (event.value=="Value2") { // Show field1 and field2, hide the rest
         field1.display = display.visible;
         field2.display = display.visible;
         field3.display = display.hidden;
    } else if (event.value=="Value3") { // Show all fields
         field1.display = display.visible;
         field2.display = display.visible;
         field3.display = display.visible;
    } else { // hide all fields
         field1.display = display.hidden;
         field2.display = display.hidden;
         field3.display = display.hidden;
    PS. Make sure you tick the option to commit the selected value of the drop-down field immediately (under the field's Properties - Options).

  • How to add a dynamic drop down list in RDLC reports in WPF

    I have to Load an RDLC report in WPF application and need to include a drop down list in report.Based on the selection of drop down list different reports to be generated.I am using C# and WPF.
    Eg: I have to list the details of employees in in RDLC report.There is a country drop down list, Based on the selection of country drop down list we need to display details of employees in the selected country.

    Looking good.
    With rdlc I think you will have to use the windows report viewer control.
    If this was SAP crystal reports there's a wpf report viewer.
    I never actually tried that with rdlc and I suppose there is a small chance they turn out to be compatible.  
    If you have questions on rdlc specifically then you're probably better finding a forum specialises in that. Not sure where that would be but maybe in the sql server forums.  It's a business intelligence thing and people who do the likes of ssis are
    what you want really.
    I do reporting myself but I think you'll find few others who do so here.
    Good luck.
    Hope that helps.
    Recent Technet articles:
    Property List Editing;  
    Dynamic XAML

  • How do I make a drop down list of text in numbers as it is made in the example spreadsheet for comparing cars for buying where you can choose a value from a dropdown list for each car?

    how do I make a drop down list of text in numbers as it is made in the example spreadsheet for comparing cars for buying where you can choose a value from a dropdown list for each car?

    Where is this example spreadsheet? Without seeing it I can only guess at what you are asking.
    To make a drop-down list (a pop-up menu in Numbers-speak), format the cell as a pop-up then edit and add to the list of items.
    If the example spreadsheet is pulling in a dollar value based on what car you chose in the pop-up, it is probably using LOOKUP or one of the other lookup functions, getting the information from another table (a lookup table). If, instead, these dollar values are what you are choosing in the pop-up, then you need to create a pop-up with these values in it.
    The Help menu includes a link to a page where you can download the Numbers Users Manual. It also has a link to the Formulas and Functions guide. Both are useful to new users.

  • How to set a default value in a Value Help Drop Down List

    Hi,
    I used an age Range field in my adobe form, the control  is a Value Help Drop Down List. i am populating the drop down using following code.
    IWDAttributeInfo ageInfo = wdContext.nodePersonalData().getNodeInfo().getAttribute("CTAgeRange");
         ISimpleTypeModifiable ageType = ageInfo.getModifiableSimpleType();     
         IModifiableSimpleValueSet ageValueSet =  ageType.getSVServices().getModifiableSimpleValueSet();
         ageValueSet.put("1","21-29");
         ageValueSet.put("2","30-34");
         ageValueSet.put("3","35 or Above");
    My requirement is to set a default value e.g. 30-34 in the age range field.
    I want to give input to iform from my Implementation code only.
    Please help.
    Thanks in advance

    hi Ranjan,
    that means you have to set at design time,
    to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element) in the context
    like
    wdContext.currentContext<nodeName>Element.set<FieldName>(<default value>)
    This generally done in Initialization method of the controller.

  • Populating values to drop down list in Adobe Forms

    Hi,
    We have added a drop down list in our adobe form. Our requirement is Payment Terms should be displayed in this drop down list. We tried by adding values to drop down list in object palette window by using '+' sign. But now we want to display values dynamically from table T052U. We need to bring two fields ZTERM and TEXT1. We don't want to use database connection, just from a table as an importing parameter it should be appended to this list.
    Atpresent, we don't want to use webdynpro or java for getting values.
    Please provide suitable answers.

    hi,
    cretae simple type in data dictionary i don't have any idea to create simple type in adobe forms.
    For creating Simple Type------in Dictionary->Local Dictionary->Data Type->Simple Type(here right click u get  create simple type).and after that choose Enumaration Here u can add values
    and create a node WITH one attribute and this attribute is off Type of that simple type u created in local dictionary and bind that node with interactive form data source property ,now in interactive form drag and drop that attribte from your dataView Run your application  these values will populate in your Interactive form.
    Regards
    Trilochan

  • How to display a static drop down list for af:query

    Hi
    can anyone tell how to display a static drop down list in af:query panel. JDeveloper version 11.1.1.5.0
    Thanks in advance

    Here is my Usecase
    My View Object consists of (Student ID, Name,Roll No) now i want to include one more attribute say No.of Rooms(i added it as a Transient attribute).
    Now i want to display the transient attribute values in the form of LOV.
    Thanks

  • How can I get a drop-down list selection also be selected in another field with the same list but a different name?

    I have a street address and a billing address. A question is posed with a checkbox — "Is the billing address the same as the street address?" If Yes is checked, the street address automatically fills the billing fields. If No is checked, the user must fill in new information. In both the street address and billing addres, the State field is a drop-down list. How can I get the drop-down list selection in the street address State also be selected in drop-down list for the billing address State?

    Has anyone done this?

  • How can I print a drop down list of favorites I have on the favorites bar?

    How can I print a drop down list of favorites i have on the favorites bar?

    Make a screen shot and print that.

  • How can I use two drop down lists for one time value?

    I want to enter the length of time that someone does an activity in hours and minutes using two drop down lists, then enter them as a single time value (H:i:s) in Mysql.
    I've used the basic drop down lists, and a few different variations of the following with no success (seconds is a hidden field with a value of "00"):
                           GetSQLValueString(strftime('%H:%i:%s', strtotime($_POST["sleeptimemin"]." ".$_POST["sleeptimehr"]." ".$_POST["seconds"])), "date"),
    This returns 00:00:16, no matter what is selected on the drop down list.
    Any help would be appreciated.

    MySQL stores times in human-understandable format, using the 24-hour clock.
    GetSQLValueString($_POST['sleeptimehr'] . ':' . $_POST['sleeptimemin'] . ':00', "date"),

  • 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 can I add categories to drop-down lists or check-boxes?

    hello can I use sub categories or group items by labels when using drop-down lists or check-boxes?

    You can't include sub-menus in a drop-down. What is possible, though, is to populate another drop-down based on the selection made in the first one, or use a pop-up menu. Both things require a script, though.

Maybe you are looking for