How can I add values on a Drop Down by Index Webdynpro Element by a Model?

How can I add values on a Drop Down by Index Webdynpro Element with a Model RFC?

Hi Jesus,
Please use the below code for DropDownByIndex Elements :-
Suppose you have model node ABC and attribute xyz. Now you have created custom node CustNode and attribute CustAtt.
ICustNodeElement  ele = null;
if(wdContext.nodeABC().size > 0)
              for(int i=0; i< CustNode< wdContext.nodeABC().size; i++
     ele = wdContext. createCustNode();
                      ele.setCustAtt(wdContext.nodeABC().getABCElementAt(i).getXYZ)
     wdContext.nodeCustNode.add(ele);
Refer to http://help.sap.com/saphelp_nw70/helpdata/en/3b/f1754276e4c153e10000000a1550b0/frameset.htm
Best Regards
Arun Jaiswal

Similar Messages

  • How can I add values on a Drop Down by Index Webdynpro Element?

    Hi every body
    Can anybody help me?
    How can I add values on a Drop Down by Index Webdynpro Element?
    How can I invoque my element on the Implementation Webdynpro?

    Hi Jesus,
    You can add elements to your DDbyIndex like this:
    //Example: Popular un Dropdown by Index usando Nodos de contexto  
    // NODE[Card: 1..n, Sele:1..1]  Si es obligatorio;            ||    NODE[Card: 0..n, Sele:0..1]  Si no es obligatorio y se puede dejar en blanco
    //Assuming we created a node called "Source", with a string attribute called "Texto" binded to the dropdownbyindex
    for (int i = 1; i <= 101; i++)
         ISourceElement sourceElement = wdContext.createSourceElement();
           sourceElement.setTexto("Text number "+i);
           wdContext.nodeSource().addElement(sourceElement);
    Regards.
    Julio Herrera

  • How can we add a field with drop down in a custom table

    Hello,
    I have a requirment in which I have to add a extra field in a custom table.
    Secondly I need to have a drop down with some values in it.
    Can you let me know how can we go about this.

    hi..
    your requirement is not very clear..
    but if you are adding a  field and want drop down with values....... it is possible by providing search help for that field.
    Hope the requirement is same.

  • How can I get rid of the drop down suggestion box that appears as soon as I type the first letter in the address box?  Runnung 7.1.2

    How can I get rid of the drop down suggestion box that appears as soon as I type the first letter in the address box?  Runnung 7.1.2

    Writelady,
    I do not know of any such option. I don't think that it is even possible at this time, however it doesn't mean that maybe sometime in the future Apple or someone else will make a way to do such as your request.
    I do however think that you should let Apple know your opinion if you have not done such yet. You can give them product feedback at the following link. https://www.apple.com/feedback/safari.html
    I hope that this helps,
    -Weston

  • 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 set default value for a drop down in Mobile Application Studio

    Hi,
    We have a requirement in which for a drop down - Transaction type (Activities), the value should be defaulted to 'Visit' and the Activity Category should be 'Sales Visit'. I tried debugging the code and got the piece of code where this value is referred, but i'm unable to find out the location where this value is picked from. Also while opening up the properties corresponding to this, there is a default value tab in the properties pane. I tried by giving this default value, but didn't work. When I'm trying to revert the changes i've made in the property, it is showing up an error.
    Any pointers on this would be of great help.
    Thanks in advance,
    Rasmi.

    Hi Rasmi,
    You can default the process type field of BOACTIVITY by different ways-
    1.In BOL, business object BOACTIVITY loaded event, check the parameter bIsNew and then default the value of process type if you want it only for new activities.
    Other attributes currently get defaulted in the attributechanged event of BOACTIVITY where field is processtype.So if processtype is defaulted it will try to default other attributes based on that.It will pick values from the customizing maintained in SPRO->CRM->Transactions->Basic Settings->Define Transaction Type->Customizing Header.
    2.You can also do defaulting in the UI.If you want to default one field based on a value selected for drop down, then write the code in the onselected2 event of the drop down.
    In your specific case, best way is to use option 1.
    Regards
    Vivek

  • How to get selected value of a drop down list in CO?

    Hi All,
    Could you plz provide me the code for getting the selected value from the drop down list in CO?
    Thanks
    Debashree

    use pageContext.getParameter("paramName");
    Regards
    Srini

  • Default value in the drop down by index

    Hi Experts,
    I have a drop down by index to which i binded one internal table,but m not able to get the default value
    i want the first value to be selected in the drop down by default,Pls give me suggestion for solving this problem

    Hi Shan,
    As per your requirement,When ur binding the internal table to the  drop down by index ,but your are not able to get the default value.
    For this please check this code.
    In this I hv taken a node - dropdown1 and within this attribute of type Land1 and I hv set the cardinality to 0..n.
    Then I hv bind the text property of the dropdownbyidx ui element to the node attribute.
    then i hv call this code in the init method of view.
    DATA lo_nd_dropdown1 TYPE REF TO if_wd_context_node.
      DATA lo_el_dropdown1 TYPE REF TO if_wd_context_element.
      DATA lt_dropdown1 TYPE wd_this->elements_dropdown1.
      DATA ls_dropdown1 LIKE LINE OF lt_dropdown1.
      navigate from <CONTEXT> to <DROPDOWN1> via lead selection
      lo_nd_dropdown1 = wd_context->get_child_node( name = wd_this->wdctx_dropdown1 ).
      @TODO handle not set lead selection
      IF lo_nd_dropdown1 IS INITIAL.
      ENDIF.
      get all declared attributes
      lo_nd_dropdown1->get_static_attributes_table(
        IMPORTING
          table = lt_dropdown1 ).
      SELECT land1 FROM t005 INTO CORRESPONDING FIELDS OF TABLE lt_dropdown1.
      CALL METHOD lo_nd_dropdown1->bind_table
        EXPORTING
          new_items            = lt_dropdown1
          set_initial_elements = abap_true .
    Regards
    Manoj Kumar

  • Unable to expand drop down by index UI element

    Hi,
    I have got one Drop down by index in my webdynpro form and I want to bind this to backend data. For this purpose, I created one adaptive rfc model  and also did all this model binding, context mapping etc.
    Now my context in view  looks like this :- GetDropDown_Mn (parent node) , this has got child Output_DropDown which again has two value attributes Name and Text.
    This is component controller code where you bind and invalidate
    __Shell__Ca_Read_Cr_Drbox_Val_Input dropdown = new __Shell__Ca_Read_Cr_Drbox_Val_Input();
            wdContext.nodeGetDropDown_Mn().bind(dropdown);
            wdContext.currentGetDropDown_MnElement().modelObject().execute();
            wdContext.nodeOutput_DropDown().invalidate();
    I then tried to bind my UI element in view with Name attribute , but when I try to run my application , the field appears as read only, kind of non editable (blocked) and I am unable to expand my dropdown.
    The readonly property of UI element is false. I have hard coded one value like " Please select from drop down list " and I want the backend values to come below this. For this, I have written code to append the backend values with the hardcoded value. Now the problem is my dropdown is blocked  and not able to expand ( unable to click the arrow button), and I cannot see the other values in dropdown except the hard coded value.
    Can someone please help me on this. 
    The cardinality of context node is 1..n, selection = 0..1 and I have set Leadselection = -1.
    Thanks and regards,
    Sai

    Hi Sai,
    You can use the below code to add the please select in ur drop down in wdInit() method
    wdContext.nodeVn_Node().currentVn_NodeElement().setVa_Attribute("-Please Select-");
    please use the name of node as u have created in the context.
    and after that please check if yoy are getting values from RFC call or not.
    if you are getting the values then try to change the selection property of that node to 1..n and comment the lead selection line that you have written.
    hope this will help.
    Regards
    Narendra

  • How can I add value to asset without extending life?  Help!

    My team and I are working on a new straight-line depreciation key.  During testing we've found that if we add value to an asset in the year after acquisition, there is a depreciation adjustment in the month after the asset becomes fully depreciated.  We can't have this happen becuase it has already been identified as a Sarbanes-Oxley remediation item.  How do we eliminate this adjustment after the asset becomes fully depreciated?

    Thank you so much for your response Bernhard!  Forgive me if I sound obtuse, I am an accountant and not a techincal expert.  What you described sounds like the method we are moving away from.  The method calculates based on remaining value over remaining life, but we've seen huge adjustments made at the end of the placed-in-service year, followed by a sharp decrease in depreciation amounts in subsequent years.  This is not acceptable because our corporate policy requires straight-line depreciation.
    If I am not interpreting your response correctly, please let me know.
    I'm wondering if "smoothing" would eliminate the adjustment in the period after the asset fully depreciates. Your thoughts on this are welcome!
    Regards,
    Laurie

  • How to grab the value from a drop down list inside a table cell

    Hello,
    My situation is I have a few columns displayed in a table format using repeater tag. Some cells is a dropdown list(<netui:select /> tag). My question is how can I grab the value when user made a selection.
    I believe I can get the row index but I can't use the datasource attribute to get the user selection since it is in a repeater. All the cell use the same datasource and workshop will give "NULL" value when there are more than one tag bind to the same form valiable.
    Any suggestion are very much appreciated! Thanks a lot in advance.
    My snippet code are:
    <netui-data:repeater dataSource="{pageFlow.ownedTask}"><netui-data:repeaterHeader></netui-data:repeaterHeader>
    <tr valign="top">
    <td><netui:select dataSource="{actionForm.userName}" optionsDataSource="{pageFlow.nameList}" onChange="getUser()" ></netui:select>
    </td>
    <td><netui:select dataSource="{actionForm.empDept}" optionsDataSource="{pageFlow.deptList}" onChange="getSelectedDept()" ></netui:select>
    </td>
    <td><netui:label value="{container.item.status}" />
    </td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter></netui-data:repeaterFooter>
    </netui-data:repeater>

    1) let drop down box be g_dd.
      if g_dd is initial.
      g_dd = option2.
      endif.
    2)
    by default same pf-status is used by all the screens in the same program
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status 'abc' excluding 'fcode_of_button'
    endif.
    or
    data: git_fcode type sy-ucomm with header line.
    git_fcode = 'fcode_of_button'.
    append git_fcode.
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status excluding git_fcode
    endif.
    Edited by: Amit Gupta on Oct 11, 2008 11:36 AM

  • How to Pre-select Value in auto drop down list

    Hi,
    I have an automatically populated drop down list, and I'm trying to have it display with a pre-selected value (in the example 5). I didn't know where to start, so I modified the Dreamweaver code for "Set value equal to" from the Dynamic list function.The list displays, but the value defaults to 0. What am I missing?
    <?php
    echo '<select name="firstnumber" id="number">';
    for ($j=0; $j<11; $j+=1)
    echo  "<option value=\"$j\" <?php if (!(strcmp(\"$j\",5))) {echo \"selected=\"selected\"\";} ?>$j</option>\n";
    echo '</select>';
    ?>
    Thanks,
    Tim

    The problem is that you have nested PHP tags inside a PHP block. You can't do that. In fact, it's surprising that the code works at all. Normally, nesting PHP tags inside a PHP code block will trigger a syntax error.
    Also, your code is very difficult to read because of the way you use double quotes all the time. It's best to use single quotes for strings, except when you need to display the value of a variable inside a string. You can also nest double quotes inside a single-quoted string and vice versa, making for code that's much easier to read without all the backslashes.
    This is how I have rewritten your code:
    <select name="firstnumber" id="number">
    <?php
    for ($j=0; $j<11; $j+=1) {
      echo  "<option value='$j'";
      if (!(strcmp($j,5))) {
         echo 'selected="selected"';
      echo ">$j</option>\n";
    ?>
    </select>

  • Information Broadcaster --can't add recipient from the drop-down menu

    Hi,
    When I create the setting in the information broadcaster, on Recipient tab I can type in the users separated by semi colon, but when I select user(s) from the drop-down menu the recipient field is filled with 'on' 'on' and when I click check the error message says 'on' is not a valid user.
    The same happens when I select a role from dropdown menu.
    In short I can schedule the reports with manually entered recipients but can't select recipient from dropdown menu.
    Have you guys run into this situation and got solution?
    it's BW3.5 SPK16, mail server is configured, users are maintained in SU01 with valid email addresses.
    Your helpful answers will be rewarded.
    Thanks again,
    Fred

    Hey Gopi,
    Nice to meet you here!
    I did try to add my own user id which is a valid user from dropdown menu but got an 'on' on the field. When I typed my user id on the field, it accepted it. Basically the pop-up selection screen from the drop down menu is not transfering the correct values to the field. Very wierd?
    Help me out Gopi if you are the Gopi I know.
    Fred

  • How to populate values in to drop down by index

    Hi in my application  i have dropdownby index with label State.In that dropdown i need to populate all the states of our country like..Tamilnadu,andhraprdesh,Gujrath,Maharastra,Delhi....,and by default it should be populated with Select State ,can u please tell me the code..
    Thanks
    Kishore

    hi,
    1.in ur context create a context value node----eg: MyStates
    2.under that value node create a value attribute--eg: values.
    3.set the cardinality of "MyStates" value node to 0:n
    4.texts property of ur dropdown by index ui element shld be bound to the value attr (values).
    5.in the wdDoInit() method of ur view that has this dropdownbyindex ui element use the follwoing code,
    String    [  ]    states_array    =        new String [  ]   {"tn", "mp", "ap", "karnataka"};
    List list_for_node_elem = new ArrayList();
       for (int i =  0; i <states_array.length; ++i)
          IPrivateMyView.IMyStatesElement elem = wdContext.createMyStatesElement();
          MyStatesElement.setValues(states_array   [i ]   );
          list_for_node_elem.add(MyStatesElement);
       wdContext.nodeMyStates().bind(list_fornode_elem);
       wdContext.nodeMyStates().setLeadSelection(1);
    Regards
    Jayapriya

  • How to make default value in a drop down list

    Hi,
          I have created a drop down list using Selection-Screen code. I have three values in it. I would like to make one of the option as a default value. How to achieve it?
    I am working on module pool program. I have few screens as a part of my program. I have created print button on tool bar of one screen but that print button is appearing on the other screens too. How to avoid it?
    Help would be appreciated...
    Thanks
    Edited by: mohammed ibrahim on Oct 10, 2008 8:43 PM

    1) let drop down box be g_dd.
      if g_dd is initial.
      g_dd = option2.
      endif.
    2)
    by default same pf-status is used by all the screens in the same program
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status 'abc' excluding 'fcode_of_button'
    endif.
    or
    data: git_fcode type sy-ucomm with header line.
    git_fcode = 'fcode_of_button'.
    append git_fcode.
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status excluding git_fcode
    endif.
    Edited by: Amit Gupta on Oct 11, 2008 11:36 AM

Maybe you are looking for

  • Dreamweaver as custom editor for other file extensions

    So, I'm working on a project that requires me to work on some files with non-standard extensions. Namely, I have some text files that have a .cm extension, and I have some code files which have no extension at all. I am connecting to my file store vi

  • Putaway Strategy Configuration: Near Picking bin

    Hi,    I have to prototype a basic scenario for the putaway strategy: Near picking bin(K) in WM. I am unable to find any material,links that would help me with the step by step config to implement the same with an example to understand the process..

  • BSEG table : Runtime error

    Dear Experts,                          Table BSEG is  throws time-out error, how to solve this error. regards rajakarthik

  • How do I activate the "last played" function on my Touch 4G

    How do I Activate the "last played" function on my ipod touch 4G?

  • Problema con Building Projects

    Hola amigos. Soy estudiante de Ingeniería mecatrónica, y hace un tiempo que trabajo con LabVIEW. El problema que me ha surgido es cuando trato de abrir el Building Projects se me cierra enseguida el MAX y ya deja de todo de funcionar; luego toca cerr