WebDynpro Drop Down

Hi guys,
I want to conver an Input File in Drop Down, but i have the next error. 
com.sap.tc.webdynpro.progmodel.context.ContextException: MappedAttributeInfo(Detail.test): must not modify the datatype of a mapped attribute
I use the next code: 
     IWDAttributeInfo  attInfo = wdContext.getNodeInfo().getAttribute(IPrivateDetail.IContextElement.TEST);
     ISimpleTypeModifiable fundCType = attInfo.getModifiableSimpleType();
     fundCType.setFieldLabel("Fiscal Year");
     IModifiableSimpleValueSet valueSet1 = fundCType.getSVServices().getModifiableSimpleValueSet();
     for (int i = 0; i < wdContext.nodeWa_Plants1().size(); i++) {
          wer = wdContext.nodeWa_Plants1().getWa_Plants1ElementAt(i).getWerks();
          na = wdContext.nodeWa_Plants1().getWa_Plants1ElementAt(i).getName1();
          valueSet1.put(wer, na);
     wdContext.currentContextElement().setTest("");
What should i do?

Hi Freddy,
I still think you did not understand what Armin was trying to say. The basic point is that if there is some context in your view controller which is mapped to a context in your component controller, then you cannot modify this context's data type in your view controller. If you try to do this, then you will get the error message saying "must not modify the datatype of a mapped attribute". You will have to do this in your component controller. If you want to modify a context's data type in view controller implementation, then you will have to remove the mapping.
The code snippet which you have given, what I can understand is the context "Test" is of type string in your application. And in you code you are making this context as a simple type for the purpose of populating a drop down. So this eventually means you are modifying the data type of this context from string to a simple type. So just do this coding in your component controller.
I hope it helps...
Bye
Ankur
Message was edited by:
        Armin Reichert

Similar Messages

  • WebDynPro: Drop-Down Box

    Hi there,
    I'm making a web dyn pro application which has a drop-down box in the initial screen.
    I have populated the drop-down box with values and corresponding texts. When I click on the button that allows me to select a line, it shows me the texts but after the selection is made, it shows me the value in the drop-down box instead of the text.
    Can anyone help on this issue?
    Thanks.
    Regards,
    Edited by: Tabrez Hanif on Jun 22, 2009 1:01 PM

    I think you need to put your text in the label right?   Good Luck!

  • OnSelect event for a Drop down UI Element in Webdynpro ABAP Select Options

    Hi Experts
    We have built our UI based on the webdynpro ABAP Select Options. We have a requirement that, when we change the value of a drop down box in the UI, I need to hide some fields. Can anybody help me out in handling of OnSelect event of a drop down box built using webdynpro ABAP Select Options. We are on SAP Netweaver 7.0 EHP1.
    Rrgards,
    Srikanth.
    Edited by: Srikanth Kancherla on Apr 29, 2010 10:43 PM

    Hi Srikanth,
    as you seem to be already aware, the component is dynamically built.
    so you would have to enhance the code that builds the element and insert a reference to a new action (enhancement) that could handle the onSelect event.
    What is it about this that you particularly want help with?
    Cheers,
    Chris

  • 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 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

  • 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

  • DROP Down By Index in Webdynpro ABAP

    Hi,
    I 've a small doubt in Drop down by Index in ABAP-Webdynpro
    I have two Dropdown, In first dropdown i have few Departmnet name for EX:- Dept1 , dept2 etc..
    based upon DEPT from first drop down i need to get  the employee deails in second dropdown.
    scenario:-
                          if i will chosse dept1 in first dropdown in second dropdown dept1 employee should populate
                         iif i will chosse dept2  in first dropdown in second dropdown dept2 employee should populate
    Thanks...
    Edited by: Rakshar on Sep 12, 2011 7:30 AM

    Hi Rakshar,
    1.  Add an onSelect event to the Dropdown 1.
    2.  In the event handler get the the selected value of Dropdown 1 from the context of the same. Based on the selected value, retrieve the data to be displayed in Dropdown 2 ( for example data from a table)
    3.  Invalidate the context for Dropdown 2
    4.  Bind the data retrieved from table to the context for Dropdown 2 by using method BIND_TABLE
    Let me know if you face any difficulty.
    Regards,
    Arpan

  • Drop down by index in webdynpro

    I am using a drop down by index element in my webdynpro ABAP screen.
    I populate this drop down by fetching values through a remote-enabled function module. How do i set one particular value as default after fetching these values. ?
    I am getting the currency keys as the list of values and want to show a particular value when the view is first shown. How is this possible?
    regards,
    Priyank

    Hi Priyank,
        I have the sample code where index is used.
        This code is used for radiobutton group by index.
        You can use same logic in your requirement.
    data:
        text    type string,
        element type ref to if_wd_context_element,
        index   type string.
      DATA:
        node_check                          TYPE REF TO if_wd_context_node,
        elem_check                          TYPE REF TO if_wd_context_element,
        stru_check                          TYPE if_start_ior=>element_check ,
        item_check_attribute                LIKE stru_check-check_attribute.
      element = wd_context->get_lead_selection( ).
      index = wdevent->get_string( 'INDEX' ).
    Case when Overhead option is selected
    navigate from <CONTEXT> to <CHECK> via lead selection
      node_check = wd_context->get_child_node( name = if_start_ior=>wdctx_check ).
    get element via lead selection
      elem_check = node_check->get_element(  ).
    get single attribute
      elem_check->get_attribute(
        EXPORTING
          name =  `CHECK_ATTRIBUTE`
        IMPORTING
          value = item_check_attribute ).
    if index EQ 2.
    elem_check->set_attribute( name = 'CHECK_ATTRIBUTE' value = Abap_true ).
    endif.
    if index EQ 1.
    elem_check->set_attribute( name = 'CHECK_ATTRIBUTE' value = Abap_false ).
    endif.
    Hope this answer will help you.
    Cheers,
    Darshna.

  • Filling dynamic drop down in adobe interactive form( webdynpro ABAP)

    HI all,
    Im new in Webdynpro ABAP, my requirement is to fill drop down list in adobe interactive form. i created adobe form and its working fine.
    I Created context like ROOT(cardinality 1:1)->DATANODE cardinality 0:n. This context is for drop down and in wddoinit i did  like this.
      IN WDDOINIT ,
    DATA lo_nd_root TYPE REF TO if_wd_context_node.
      DATA lo_nd_datanode TYPE REF TO if_wd_context_node.
      DATA lo_el_datanode TYPE REF TO if_wd_context_element.
      DATA ls_datanode TYPE wd_this->elements_datanode.
    navigate from <CONTEXT> to <ROOT> via lead selection
      lo_nd_root = wd_context->get_child_node( name = wd_this->wdctx_root ).
    navigate from <ROOT> to <DATANODE> via lead selection
      lo_nd_datanode = lo_nd_root->get_child_node( name = wd_this->wdctx_datanode ).
    get element via lead selection
      lo_el_datanode = lo_nd_datanode->get_element(  ).
    ls_datanode[] = lt_dna_value[].
    CALL METHOD lo_nd_datanode->bind_table
      EXPORTING
        new_items            =  ls_datanode
        set_initial_elements = ABAP_TRUE.
       index                =
    while executing  i'm getting this error ": WebDynpro Exception: ADS: com.adobe.ProcessingException: No output was generated while rendering: Stream for: PDFOut.(200,101). " . can u please tell me how to bind value for drop down.
    I created sample table in same form and i binded same value to table, that time its executing fine.
    can u please tell me solution for this Scenario.
    Thanks
    Hemachandran.
    Edited by: hemachandran R on Sep 12, 2008 2:27 PM

    hi,
    My requirement, is to use dynamic drop down in dynamic table. I am using webdynpro abap.
    i populated the value in drop down.
    Its working fine but the problem is how to fill the default value in drop down. because i want to bind the default value which im getting specify value from the table.because each row
    im getting different values, like first row
    CAR
    , that CAR want to fill as a default value in drop down  and second row  as
    BIKE
    that BIKE  want to fill as default value in drop down  ( example drop down contain   car , bike , cycle).
    In adobe form i binded like this
      $record.DATANODE.DATA[*].DNA_RATING
    i dont know whether this one is correct or wrong  .
    im getting default value as empty.
    please give me some solution how to do this.its very urgent
    thanks
    hemachandran.

  • Webdynpro for ABAP - interactive Adobe form - drop down lists not working

    Hi all,
    I'm trying to create an interactive form for a client using webdynpro for ABAP and I've viewed the demo "Create SAP Interactive Forms by Adobe with Web Dynpro for ABAP" by Thomas Jung, but when I implement it the form following similar steps the form is not interactive.
    In the properties of the "InterativeForm", I've tried clicking the "enabled" flag both on and off.  I've also tried setting the "displayType" property to both "ActiveX" and "Native".  But none of this worked.
    I though my problem might be with Adobe reader so I switched from 8.0 back to 7.0 but this didn't make any difference either.
    The system we are using is NW04s WAS 700.  Any hints would be greatly appreciated!
    Thanks,
    -tom

    Thanks for the suggestion Dezso.  I've downloaded a newer version of ACF as indicated by the OSS note and installed it.  I'm still having the same issue.
    My basic question is what options should I be using in the form and on the InteractiveForm component?  It looks like because of the evolution of the product there are multiple options available.  I recall reading somewhere that as of a certain SP level we should have ZCI (zero client install) available.  The would be our preference.  It will be a support nightmare if each user needed a manual download of ACF.exe installed.
    Should I click the "enabled" flag on the InteractiveForm object?  When I create the form should I use the "Native" drop down list or the one from the "Active X" tab?  I would like to use the "List Box" control on the form as well but it is only available in the "Standard" tab.  So does that mean I can't get the selections from a "List Box"?
    Thanks,-tom

  • ABAP WebDynPro tutorials for Roadmaps and drop-down list box

    Hi Experts,
        I need some tutorials on Roadmaps and drop-down list box in ABAP WebDynPro which will show me step by step process how to create application using this. 'help.sdn' pages do show the procedures for implementing those ui elements.
    And also the previous threads refer to some expired documents.
    Thanks in advance.....
    Plz help....
    Edited by: Akashdeep Basu on Aug 9, 2008 9:30 AM

    Hi
    [SAP BLOG on ABAP-WEBDYNPRO|https://www.sdn.sap.com/irj/sdn/nw-development?rid=/webcontent/uuid/512040e1-0901-0010-769c-c238c6ca35d9]
    [Step-By-Step Approach|http://help.sap.com/saphelp_nw04s/helpdata/en/79/002c2a0d43e645a39a89dd662b5f68/content.htm]
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a282c952-0801-0010-1eb5-87953e036712
    Regards
    Pavan

  • Drop Down in webDynpro.

    Hi experts ,
    I wana get help on drop down. I have got an internal table which has all the company code related to the user who has loged in UI. I want to display that internal table as drop down. Please provide me a solution .

    Hi Madhvi,
    I understand that you have an internal table which has the company codes. There are two scenarios here.
    Scenario 1
    You have only one field in the internal table, i.e., company code.
    Here you can make use of the WebDynpro UI element DropDownByIndex. Here you will have to define a node in the context of cardinality 0:n, and an attribute of the type similar to the company code.
    Once you have done that, insert the DropDownByIndex element in the Layout, then bind the texts property of the same to the attribute (company code).
    Now the coding.
    Declare a supply function for the node. Write the code for binding the value in the internal table into the node.
    Here, you will get the company codes as a drop down.
    Scenario 2
    You have only two fields in the internal table, i.e., company code and company code description
    And you want to display the description in the dropdown but use the code for processing in the background.
    In this particular scenario, you can make use of the DropDownByKey UI element. The dropdown node will have two attributes, one for the company code and the other for the description.
    The company code attribute will be bound to the key property of the UI element. Here again, its advisable to use a supply funciton.
    Coding:
    Declare a workarea of type wdy_key_value, say, wa_key_value and an internal table of type wdy_key_value_table, say, lt_key_value_table.
    Assuming the internal table of the company code is lt_company_code, <fs_compay_code> the workarea and the fields are  comp_code and comp_desc, comp_code being the company code and comp_desc being the company code description.
    node is the reference of the drop down node.
    DATA: lt_key_value_table TYPE wdy_key_value_table,
              lt_company_code TYPE (table_type of comany code with the above mentioned fields).
    DATA: wa_key_value TYPE wdy_key_value.
    FIELD-SYMBOLS: <fs_compay_code> TYPE (structure of company code with the above mentioned fields).
    LOOP AT lt_company_code ASSIGNING <fs_compay_code>.
             wa_key_value-key = <fs_compay_code>-comp_code.
             wa_key_value = <fs_compay_code>-comp_desc.
             APPEND wa_key_value to lt_key_value_table .
             CLEAR wa_key_value.
    ENDLOOP.
    node->set_attribute_value_set( name = 'KEY'
                                                  value_set = lt_key_value_table ).

  • How to get prefilled drop down list in Adobe form from WebDynpro context

    Hi All,
    We all know that we can have dropdown list in webdynpro which can be automatically populated by the context node collection.
    How can we have the same functionality in Adobe form drop down list. I tried to bind the node attribute to drop down list in Adobe form but it shows me only first element. I am not able to see all the elements in the dropdown but if I am doing same thing for WebDynpro DropDown list I can see the complete List.
    Anybody with Solution?

    Hi Ricky
    I have started a thread for this problem and got an answer for it already. Unfortunately I did not have the time to check it out yet; have a look over there:
    https://mail.cirrus.ch/exchweb/bin/redir.asp?URL=https:///community [original link is broken]
    I appreciate if you tell me whether it worked for you.
    Andreas

  • How to fill a  drop down box  in a  webdynpro application

    Hi friends ,
                   i am facing one problem while  filling a   dropdown box with  some  hot  coded values :  " High","Medium","low"..etc..
    drop down box  having  fixed  elements   always.....
    means  all values  should be  static and i  have to fill it  at design time  only..
    can  any body  pls  reply  for the   above same......
    Thanks and  Regards
    Ratnakar reddy

    Hi Ratnakar,
    If u r using Dropdown By Key, u can use the method that Armin suggested.
    If u r using Dropdown By Index, then do the following
    Let ur View Name be 'MyView'
    1. In ur View Context,Create a Node(Say Root) of Cardinality 0..N
    2. Create a value attribute(Say Name) in 'Root'.
    3. In wdDoInit(), add the following code
    IPrivateMyView.IRootNode rNode=wdContext.nodeRoot();
    IPrivateMyView.IRootElement rEl=rNode.createRootElement();     
    rNode.addElement(rEl);
    rEl.setName("HIGH");
    rEl=rNode.createRootElement();
    rNode.addElement(rEl);
    rEl.setName("MEDIUM");     
    rEl=rNode.createRootElement();
    rNode.addElement(rEl);
    rEl.setName("LOW");     
    Hope this be Helpful
    Fahad Hamsa

  • How to get the selected value/key of a drop down list box in webdynpro Java

    Dear SDN Members,
    I have added some static data into a drop down list box by key UI element using the procedure specified in value help tutorial.
    Now i want to display the value selected in a dropdown list box on view whenever i select an item in a dropdown list box.
    Can any one put here the code part relating to this.
    Your help will be awarded.
    Thanks in advance,
    Regards,
    Sireesha.B

    Hi Sireesha,
        You want to display value based on the key selected in dropdown list. If you want to do like that
    1) Create a context attribute for ex: key_value
    2)In the properties of the attribute select the calculated as true.
    3)It will create getter and setter methods for your attribute.
    4)Go to implementation add the following code in getter method of your attribute
    String attributeName = IPrivateCreate.IContextElement.KEY;
    //KEY is your dropdown key attribute not the value attribute.
    IWDAttributeInfo attributeInfo = element.node().getNodeInfo().getAttribute(attributeName);
    ISimpleTypeModifiable simpleType = attributeInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet valueset = simpleType.getSVServices().getModifiableSimpleValueSet();
    Object key = element.getAttributeAsText(attributeName);
    return valueset.getText(key);
    Regards
    Suresh

Maybe you are looking for

  • ITunes wants me to set up iPod Touch again or restore it or eject it???

    I bought this iPod Touch only two months ago. And since this is my second iPod (the first was a 5 gen that I had had for a couple years), I only did the initial iTunes 8 update I had to do when I bought it. Since it had been working fine, I didn't do

  • No Sound - Adobe Media Encoder CS4

    Hello, I have been trying to convert an MPEG file to F4V using Adobe Media Encoder CS4. However, no matter what parameters i choose on the encoding, it will always generate a F4V file with no sound. I also updated all the CS4 package to the latest ve

  • Public/Private Sequences

    Is there a way to specify a subsequence to be private or public? Let's say, we have a Verify Temperature Sequence Module. The module has Test Temperature and a Get Temperature subsequences. I want to call the module from my UUT Test but don't want to

  • Transaction I view for WebGui(Html)  creation problem

    Hi All, I am creating a transaction Iview for WebGui, I am done with I view creation part but when I open the I view its giving  <b>No switch made to HTTPS; so it is unsafe to send your password</b>. SSO between was and ecc is working fine. I read po

  • Mass Allocation Generate Accounting Error

    when Trying to Generate Accounting For Mass Allocation after validating the formula the request results in the following Error ORA-00942: table or view does not exist Any one Can help Regards, Mohammed Badry