How to implement Dynamic Context Node Mapping between Components

Hey genuis:
           I am looking for how to implement context mapping bwteen two components. I read some threads, and try to use external context mapping. The example works fine. However, my requirement is more than that.
I have a context node in Component B, and the attributes in it are dynamically generated. Component A is the main component which use Component B's function. Both A and B work fine by theirselves. 
When I assemble A and B (external mapping), the system gives me a exception:com.sap.tc.webdynpro.progmodel.context.ContextException: MappedNodeInfo(T8UploadCompInterface.data): cannot create nodes, no mapping defined yet.
Please give me some suggestion?
Any responses are appreciated.

I miss this thread.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6fdae690-0201-0010-a580-d104b459cb44
This is almost the right solution for my problem.

Similar Messages

  • How to implement dynamic language change in all Components

    Hi all,
    I`m quite confused because i have app in wich i create Language object it is singleton made using abstract factory used for querying text to be shown in components. I has simple method:
    public String getText(String fieldName) {}
    Wich returns text. I have also config object to know what desired language i want to have on startup. But problem occurs when i want to set dynamic language change during app run so all containers gets its texts again using language object (which is another type now). Do You have some ideas ??
    I thought about extending all JButtons,Frames,Labels etc... and adding method:
    void setYourText(Language l) { this.setText(l.getText(// and here we have problem because all fields have unique arguments for getText
    }

    I miss this thread.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6fdae690-0201-0010-a580-d104b459cb44
    This is almost the right solution for my problem.

  • How to implement a simple node-edge graph?

    Can any one give me some advice on how to implement a simple node-edge graph in a frame? Every node is a rectangle which can be moved by mouse, and every edge is a arc between two nodes.
    Should the node class extend JPanel, and the edge class extend Graphics? and so on?

    It is impossible to generate similar update from OWB.
    Does your table1 contain primary key columns? What is the number of rows in this table?
    The only working solution in this case - use table1 twice in mapping - as source and as target (with UPDATE operation),
    link these operators with primary key columns and specify matching by PK columns.
    Updated column link to Constant operator attribute.
    In this case OWB generate SQL like
    merge table1 a
    using table1 b
    on (a.pk_column=b.pk_column)
    when matched then update set column1=1
    Regards,
    Oleg

  • To access a dynamic context node defined in a Used Component

    Hi Gurus,
    I need your help with something.
    I have a dynamic context node in ComponentA. I want it in Component B too.
    Component B uses Component A, but I am not able to get access to the context node.
    Is it possible to do this? Any suggestions how to proceed.
    PS: I am trying to do a dynamic mapping. The initial scenario was here, Set data into Model Node on Navigating from a View
    Thanks in advance,
    Anjana R.
    Message was edited by:
            Anjana Raghav

    Hi Gurus,
    Its working now. Earlier, the code was something like this....
    IWDNodeInfo compNode = wdThis.wdGet<i>Comp</i>Interface().wdGetAPI().getContext().getRootNodeInfo().getChild(nodeNm);
    viewNodeInfo.setMapping(compNode,true);
    and was trying to map it using
    iewNodeInfo.addMappedAttribute("order",".<i>Comp</i>."+ nodeNm + ".order");     
    Now, I am mapping like this.
    viewNodeInfo.addMappedAttribute("order","order");
    Thanks,
    Anjana R.

  • How to create dynamic context based on a structure defined in the program?

    Hi Experts,
             I need to create a dynamic context based on a structure wa_struc which i have define programatically.
    When I pass wa_struc to structure_name parameter of create_nodeinfo_from_struc, i get a runtime error:
    "Parameter STRUCTURE_NAME contains an invalid value wa_struc."
    How to create dynamic context based on a structure defined in the program?
    I have written the code like this:
    TYPES: BEGIN OF t_type,
                v_carrid TYPE sflight-carrid,
                v_connid TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
             wa_struc type t_type.
      data: dyn_node   type ref to if_wd_context_node.
      data: rootnode_info   type ref to if_wd_context_node_info.
      rootnode_info = wd_context->get_node_info( ).
      clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
      parent_info = rootnode_info
      node_name = 'dynflight'
      structure_name = 'wa_struc'
      is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( name = 'dynflight' ).
    dyn_node->bind_table( i_struc ).
    Thanks
    Gopal
    Message was edited by: gopalkrishna baliga

    Hi Michelle,
              First of all Special thanks for your informative answers to my other forum questions. I really appreciate your help.
    Coming back to this question I am still waiting for an answer. Please help. Note that my structure is not in a dictionary.
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition
    I have updated my code like the following and I am getting error:
    TYPES: BEGIN OF t_type,
    CARRID TYPE sflight-carrid,
    CONNID TYPE sflight-connid,
    END OF t_type.
    Data: i_struc type table of t_type,
    dyn_node type ref to if_wd_context_node,
    rootnode_info type ref to if_wd_context_node_info,
    i_node_att type wdr_context_attr_info_map,
    wa_node_att type line of wdr_context_attr_info_map.
    wa_node_att-name = 'CARRID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
    insert wa_node_att into table i_node_att.
    wa_node_att-name = 'CONNID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
    insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
    select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
    attributes = i_node_att
    is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    But now I am getting the following error :
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    -Gopal
    Message was edited by: gopalkrishna baliga

  • Adding dynamic context node

    Hello,
    I having problems with creating a dynamic context node.
    How can i add a new node to the context on runtime and not on design time.
    Best Regards,
    Smadar.

    Hi,
    IWDNodeInfo nodeinfo=wdContext.getNodeInfo();
    /* This will add a ValueNode */
    IWDNodeInfo customerNode=nodeinfo.addChild("Customer",null,true,true,true,false,false,true,null,null,null);
    /* This will add  a Attribute to the above Node */
    IWDAttributeInfo custAttr=customerNode.addAttribute("AttribName","com.sap.dictionary.string");
    Regards, Anilkumar

  • Create dynamic context node

    Hi Experts,
    I have tried the given example for Dynamic Context Node in Webdynpro ABAP
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783
    But getting the Error when executing this application
    Note
    The following error text was processed in the system ISP : Adapter error in &VIEW_ELEMENT_TYPE& "TABLENAME" of view "ZWD_SACHIN_DYN_ALV.MAIN_VIEW": Context binding of property VALUE cannot be resolved: Node MAIN_VIEW.1.INPUT does not contain any elements
    The error occurred on the application server usirs254_ISP_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE_FOR of program CX_WDR_ADAPTER_EXCEPTION======CP
    Method: RAISE_BINDING_EXCEPTION of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
    Method: GET_BOUND_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
    Please resolve this issue because when I am mapping the Attribute TableName in the InputGroup, it is throwing above Error.
    Thanks in advance
    Regards
    Sachin

    Hi Sachin,
    I am unable to understand why you are getting an error. I have tried the same tutorial myself and it works fine for me. Make sure that the TABLENAME attribute (which is of string type) is properly binded to the value property of the input field.
    Regards
    Arjun
    Edited by: Arjun Thakur on Mar 17, 2009 1:46 PM

  • Error creating dynamic context node in Webdynpro for ABAP. Plesae help!

    Hi
       I am getting the following error while creating a dynamic context node with 2 attributes. Please help me resolve this problem.
    Note
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    My code is like the following:
    TYPES: BEGIN OF t_type,
                CARRID TYPE sflight-carrid,
                CONNID TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
      dyn_node   type ref to if_wd_context_node,
      rootnode_info   type ref to if_wd_context_node_info,
      i_node_att type wdr_context_attr_info_map,
      wa_node_att type line of wdr_context_attr_info_map.
          wa_node_att-name = 'CARRID'.
          wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
          insert wa_node_att into table i_node_att.
          wa_node_att-name = 'CONNID'.
          wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
          insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
                                       attributes = i_node_att
                                       is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition

    Ok, I think I found a bug... It seems for adobe forms in WD4A, the root context node must be 1-1 and you must nest the 1-n node within that... Not sure why, but it worked. So in my case my context would look like this:
    FOO_NODE (1-1)
         Widget (1-N)
              -Widget_info (1-1)
                   *Name
                   *Sku
                   *Description
              -Widget_plant (1-M)
                   *Plant_Code
                   *Plant_State
                   *Plant_City
              -Widget_pic (1-1)
                   *Picture

  • Dynamic reverse context node mapping at runtime

    Hi!
    I have an application which uses another embedded component containing a ALV table which shows the data of a transparent table.
    Everything works fine if i'm working with a static table with static attributes and map the context node of the application to the node in the embedded component. The context node in the embedded component is reversed mapped and gets its data from the application's context node.
    Now i want to do it dynamically. Inside the application the user should choose the name of a table and I'm using RTTI functions to get it's technical informations. At runtime i'm adding dynamically attributes (i.e. fieldname, type, length) to a static context node called 'DATA'.
    The ALV component of the embedded component is mapped to an interface context node named 'DATA' which uses reverse mapping to receive data from the applications context node 'DATA'.
    What I need to know is how to create the mapping between application context node and interface context node of the embedded component at runtime after i have created the attributes of the node dynamically. Is that basically possible?
    I've already tried to map the both nodes statically to see if the dynamically created attributes are mapped automatically then. The mapping seems to be fine at node level, but doesn't work for the later dynamically added attributes.
    Could someone point me to informations if dynamic mapping context nodes is basically possible and how to do it?
    Regards
    Ralf-J.

    Hi Lars!
    Thanks for the link! The problem isn't to fill the context node dynamically. That's already working using RTTI etc.
    It seems to me that the interface context node of the ALV in the embedded component doesn't recognize the dynamically added attributes. As i wrote the binding on node level (DATA->DATA), which i'm doing at design time, is working as expected, but the added attributes are only shown in the context node of the using component but not in the embedded.
    I'm still thinking there must be a way to do a binding at runtime. On the other hand the comment of Glenn in the thread you've pointed me to, seems to suggest that the ALV itself might have problems with dynamically appended attributes.
    Regards
    Ralf-J.

  • How to delete dynamically created nodes?

    Hello Colleagues,
    In our screen we have a push button which adds one node to the context when used. The node is having a few fields which are shown in the UI.
    So as you keep on pressing the button, additional rows will be appended on the screen.
    Now, I have added another button on each of these rows. On clicking of which it should remove the row (the node). So each time you press the button 'Add element', additional rows will be appended, and each row will have a button 'Remove Element'.
    But, the problem I am facing is in the implementation of 'Remove Element'.
    The button 'Remove Element' is mapped to an action. But since there are as many 'Remove Element' buttons as there are rows, how do I identify which node is to be deleted ?
    I have tried with get lead selection etc. but it didnt work.
    Is there any way we can find out which UI element has trigerred the deletion, in the code of 'onactionSOMETHING' ?
    Thanks
    Gagan

    Hi,
    In the WDEVENT parameter of the action handler you can find the event id.
    ***Variables
      DATA:
        lv_selected  type string.          "Selected tab value
    ***Structure and internal table for the Events and messages
      DATA:
        lt_events type WDR_EVENT_PARAMETER_LIST,
        ls_events type WDR_EVENT_PARAMETER.
    ***Field symbols
      field-symbols: <fs_value> type any.   "Attribute value in events table
    ***Move the event table to lt_events
      lt_events = wdevent->parameters.
      read table  lt_events into ls_events with key name = 'SAVE'.  "Button Id
      if sy-subrc eq 0.
        assign ls_events-value->* to <fs_value>.
        if sy-subrc eq 0.
          lv_selected  = <fs_value>.
        endif.                 "IF sy-subrc eq 0.
      endif.                 "IF sy-subrc eq 0.
    Regards,
    Lekha.

  • Dynamic Context Node Copying question

    I am trying to dynamically copy some context nodes from my component controller to the view controller.  In the source context, I have a node whose "Multiple" property is set to true.
    I use the function addMappedChild to copy the attribute info, but the copied node always has "Multiple" set to false!! In the definition of addMappedChild there is no paramter for "Multiple".  How do I do this?
    Thanks
    Walter
    public IWDNodeInfo addMappedChild(java.lang.String name,
                                      java.lang.Class elementClass,
                                      boolean singleton,
                                      boolean mandatorySelection,
                                      boolean multipleSelection,
                                      java.lang.String mappedPath,
                                      boolean selectionMapped,
                                      boolean initializeLeadSelection)

    Are you making like dscribed here
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/dynamically creating, building, and mapping a context in web dynpro.pdf 
    page 14?
    Best Regards, Maxim r.

  • How to populate a context node on the basis of the values in another node?

    Hi,
    I have a Webdynpro application which has to run on Portal as well as BlackBerry.
    In this application I have a scenario where I need to have a sub node inside a node but as Blackberry doesn't support sub nodes with Singleton value false, I have to use another node for storing the values which earlier wre present in the sub node.
    The actual scenario here is that we have two tables A & B. For each row of table A we have a no of rows in table B. This can be easily accomplished for Web Browser but we need to do this for Blackberry.
    My question here is that how can i populate the data in table B at runtime using the concept of onLeadSelect. I am not able to fully undersans this concept.
    According to my approach I have two a while loop which generates data for  table A and inside this while loop I have another while which generates data for table B corresponding to each iteration of the outer while loop. I create the node elements for the rows of the table B and store them in a list and then store this list in a HashMap corresponding to a key formed by combining the values of all the elements of the row of table A.
    Now I am not able to understand how can I display this data into table on user slecting a particular row.
    Please guide ASAP.
    It wille quite useful if you can provide me with some code snippets for the same.
    Thanks in advance!
    Manish

    Hi Manish,
             In WebDynpro u can use the onLeadSelect event of table A and do all the processing in that method.Like u can use this method to fill ur context node,which will be the source node for table B. So this way u need not to use any hash map.Fill the source node of table B with data corresponding to ur selected data of table A.
      I hope this solution wud help u in solving ur problem.
    Reena

  • Using Search Help with ALV and Dynamic context node

    The topic subject already describes my situation.
    I have to create, populate and remove context nodes at runtime, and bind them to an ALV, to let user display the data or modify the data. The nodes I create are always typed with a table name, but the table name is of course, dynamic.
    This is all working: what's not working is help for entries inside the ALV; since the table has foreign keys and domains with check tables or fixed values, I expected that search helps were detected and managed by the framework.
    Instead, no help search is displayed except the input help based on data-type of the one "Date" input fields.
    I think I have to work on the dynamic node creation, and not on the ALV itself, since the latter only takes the node/attributes information, but i could be wrong. I tried with both the two following codings:
      CALL METHOD lo_nd_info_root->add_new_child_node
        EXPORTING
          static_element_type          = vs_tabname
          name                         = 'SAMPLE_NODE_NAME'
    *    is_mandatory                 = abap_false
    *    is_mandatory_selection       = abap_false
         is_multiple                  = abap_true
         is_multiple_selection        = abap_false
    *    is_singleton                 = abap_false
          is_initialize_lead_selection = abap_false
          is_static                    = abap_false
        RECEIVING
          child_node_info              = lo_nd_info_data .
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
          parent_info = lo_nd_info_root
          node_name = 'SAMPLE_NODE_NAME'
          structure_name = vs_tabname
          is_multiple = abap_true ).
    The result is the same...is there any way to let the ALV know what search helps it has to use, and doesn't force me to manually build a VALUE_SET to be bound on the single attributes? There are many tables, with many fields, and maintaining this solution would be very costly.

    I have checked with method GET_ATTRIBUTE_VALUEHELP_TYPE of interface IF_WD_CONTEXT_NODE_INFO, on an attribute which i know to have a search help (Foreign key of a check table).
    The method returns 'N', that is the constant IF_WD_VALUE_HELP_HANDLER~CO_VH_TYPE_NO_HELP. So, the framework was not able to find a suitable search help.
    Using method GET_ATTRIBUTE_VALUE_HELP of the same interface, on the same attribute, returns me '111', which is constant C_VALUE_HELP_MODE-AUTOMATIC.
    Therefore, the WD framework knows it has to automatically detect a value help, but fails to find one.
    Also, this means in my opinion that the ALV and the dynamic external mapping are not the culprits: since node creation, no help is detected for any attribute but the date. Honestly, I don't have a clue on what's happening.

  • How to populate the context nodes based on an event

    Hi All,
    I am having a basic problem. I have created a new Webdynpro Abap application. Here, in the main view, i have define a text view as well as a table. I have created context nodes A and B in component controller. The attributes under A are A1 and the attributes of B are B1,B2, and B3. I have also created an action button C in the same view. These have been mapped to the context nodes in the main view. A1 is mapped to the text view and B1, B2 and B3 are mapped to the table.
    My requirement is as follows. When user Clicks on execute, i want to use the value A1 from the text view in a function module and return the values to B1, B2 and B3. B1, B2 and B3 are multiple values mind you.
    I have successfully executed the function module within the WDONACTIONC method. How to i accomplish this Basic Task. Please Help
    Best Regards
    Mazin

    Hi Mazin,
    Step 3 is as follows...
    Say you have a context node, you have to bind this node with table UI element, now this node must contain some context attribute which you have to bind with your columns of table. now say name of context node is cn_table. now what you have to do is get data from FM in the internal table..........
    now move data by using move corresponding or by looping depending on requirement to an internal table which has fields with the same name as that of name of your attributes... this is imp to display the data...... now you can bind this internal table with context node using code below.......
    data lo_nd_cn_table type ref to if_wd_context_node.
      data lo_el_cn_table type ref to if_wd_context_element.
      data ls_cn_table type wd_this->element_cn_table.
      data it_table type wd_this->elements_cn_table.
      data wa_table type wd_this->element_cn_table.
      data it type standard table of t005t.
      data wa type t005t.
    **   navigate from <CONTEXT> to <CN_TABLE> via lead selection
    select * from t005t into TABLE it.
      loop at it into wa.
        wa_table-ca_one = wa-land1.
        wa_table-ca_two = wa-landx.
        wa_table-ca_three = wa-natio.
        wa_table-ca_enable = abap_true.
       append wa_table to it_table.
        endloop.
    lo_nd_cn_table = wd_context->get_child_node( name =
    wd_this->wdctx_cn_table ).
    *   get element via lead selection
        lo_el_cn_table = lo_nd_cn_table->get_element(  ).
    lo_nd_cn_table->bind_table( it_table ).
    ca-one, ca_two, ca_three and ca_enable are name of my context attribute......
    regards
    Pranav
    Edited by: Pranav Nagpal on Dec 22, 2008 10:08 AM

  • ABAP: dynamic context node + attribute for DROP_DOWN_BY_KEY

    Hello,
    I need to create a Node with attributes dynamically and than assign it to a DROP_DOW_BY_KEY element in ABAP.
    I create drop down this way:
    drop_down_figure = cl_wd_dropdown_by_key=>new_dropdown_by_key( bind_selected_key = 'REPOSITORY.FIGURES' on_select = 'GET_OPERATOR' ).
      cl_wd_grid_data=>new_grid_data( element = drop_down_figure ).
      ui_container->add_child( drop_down_figure ).
    However, here I bind to REPOSITORY.FIGURES. Instead of doing this I need to bind it to an attribute that I create.
    I can access wd_context but I am not sure how to create a node in wd_context, then attribute for that node that will contain items for drop down.
    bind_selected_key is type of String. If I create a node with attribute how do I cast it to a String so I can pass it to a constructor of a drop down?
    Thank you.

    Hi Georgy,
    There is a 3 - series weblog for this.
    The first one is:
    /people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements
    The following are the the general steps for creating a node and table where table name is input by the user:
    DATA:
      UI Elements
        group_1       TYPE REF TO cl_wd_uielement_container,
        new_tab       TYPE REF TO cl_wd_table,
      Context Nodes
        dyn_node      TYPE REF TO if_wd_context_node,
        tabname_node  TYPE REF TO if_wd_context_node,
      Node Info
        rootnode_info TYPE REF TO if_wd_context_node_info,
      Data Reference (for internal table)
        stru_tab      TYPE REF TO data,
      String (for table name)
        tablename     TYPE string.
      FIELD-SYMBOLS:
        <tab> TYPE table.
    1) * get node info of context root node
      rootnode_info = wd_context->get_node_info( ).
    2) * create sub node named TEST1 of structure (tablename)
      cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
        parent_info = rootnode_info
        node_name = tablename
        structure_name = tablename
        is_multiple = abap_true ).
    3) * get instance of new node
      dyn_node = wd_context->get_child_node( name = tablename ).
    4) ***** create new UI element table *******************************************************
      new_tab = cl_wd_dynamic_tool=>create_table_from_node(
    ui_parent = group_1
    table_id  = 'TESTTAB'
    node      = dyn_node ).
    5) ***** fill context node with data *******************************************************
    create internal table of (tabletype)
      CREATE DATA stru_tab TYPE TABLE OF (tablename).
      ASSIGN stru_tab->* TO <tab>.
    Get table content
      SELECT * FROM (tablename) INTO CORRESPONDING FIELDS OF TABLE <tab>.
    Bind internal table to context node.
      dyn_node->bind_table( <tab> ).
    Regards,
    Srini.

Maybe you are looking for