Webdynpro Dynamic Nodes

Hi Experts,
I am creating Dynamic nodes from Model's Node, each time I execute in the application a function module, the Dynamic nodes must be realeased from session and created again and then the application must also create the user interface elements dynamically as well, from those dynamic nodes. The problem is: When I come back to the initial view and navigates to the report's view, I mean, when there is a new execution of the function's module, The application throws the following error:
com.sap.tc.webdynpro.progmodel.context.ContextException: DataNodeInfo(EdoCtaDetView): duplicate name for child node Nodo0
Can I somehow eliminate the instances of the nodes in order to create new dynamic nodes in each execution of the function's module?
Regards,
Briger

Hi Briger,
Well it's very easy... only you have to put in your source code the following lines, after you invalidate all the elements of your context:
IWDContext ctx = wdContext.getContext();
ctx.reset(false);
There is two kind of reset method. the reset() reset all the metadata and destroy dynamics node. reset(false), reset all metadata destroy dynamics node but keeps the nodes build at design time.
Regards,
MC

Similar Messages

  • How to deal with the dynamic nodes ...in webdynpro abap

    Hi Guys,
    How to insert the dynamic nodes in the context controller...
    Thanks
    Chandra

    You can use node_info to create a dynamic node or use CL_WD_DYNAMIC_TOOL to create dynamic nodes under a node
    For Eg Struc_Node
    fields A type char20,
    fields B type char 20
    For Eg : To Create Node under Context Node( Root Node).
    data lv_node_info type ref to if_wd_context_node_info.
    lv_node_info = wd_context->get_node_info( ).
    CALL METHOD lv_node_info->add_new_child_node
    EXPORTING
    static_element_type = 'Struc_node
    name = lv_node_name
    is_static = abap_false
    is_multiple_selection = abap_true
    RECEIVING
    child_node_info = lv_child_node_info.
    or
    CL_WD_DYNAMIC_TOOL=>CREATE_NODEINFO_FROM_STRUCT

  • Reading XML file into Dynamic Node and Display its output as Table.

    Hi All,
    Following is the output of XML file:
       <Company>
         <Employee>
              <Name>John</Name>
              <Age>23</Age>
              <***>Male</***>
              <Location>Frankfurt</Location>
         </Employee>
         <Employee>
              <Name>Tina</Name>
              <Age>21</Age>
              <***>Female</***>
              <Location>Boston</Location>
         </Employee>
         <Department>
              <Name>Sales</Name>
              <HQ>Chicago</HQ>
              <Emplyoees>2300</Employees>
         </Department>     
    I'm able to read the output through DOM parser. But How do I convert this into dynamic node and display this in Web dynpro as Table?
    Any pointers in this regard will be great help?
    Thanks
    Srikant

    Hi Maksim,
    I've used your example and its now helping as there is kind of agreement on that I'll be knowing the structure of Xml and I can fill the nodes.
    But suppose if you have Xml has following structure :
    <?xml version="1.0" encoding="utf-8"?><DATA>
    <item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">CONTRACT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
    <item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">CREDIT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
    <item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">EMPRESS</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
    <item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">PAYMENT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
    <item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">PRICE</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
    </DATA>
    How we will do in this case?
    Can we have something similar using DOM? Also what is the best method for displaying data being sent in form of XML. And generalize it for cases like this.
    Thanks
    Srikant

  • Problem with Dynamic Node & UI Elements

    Hi,
                                            The scenario is to create an Questioaire.Since the number questions which I get from R/3 may vary, I have created the Dynamic Node which is mapped with Dynamic set of Radio button Group by index for options & Dynamic text view for displaying Questions..  A New Dynamic Node will be created for each set of Questions .The Number of questions displayed per page is controlled by the Static Counter Variable....
                                              Now the issue is ,if i click back button the count will be initialized so again it needs to trigger the DoModifyView(). at that time It is arising an exception "Duplicate ID for view & Radio button ..." because while creating Dynamic node i used to have "i" value along the Creation of node name...
    for(i=Count;i<i<wdContext.nodeQuestions().size();i++)
                   customnod=<b>nodeinfo.getChild("Questionaire"+i);</b>
                        if(customnod==null)
    Its not possible to create a new node whenever i click the Back button.
    At the same time i am not able to fetch the elements which had already created Dynamically...
    How do i make the Next & back button work?
    If anyone  bring me the solution It would be more helpful to me.
    Thanks in advance..
    Regards,
    Malar

    Hi,
          We can Loop through the Node Elements but how can we do Option Button Creation for each set of question Options?. At design time we can not have the radio buttons,because we do not know how many set of questions are available at the Backend.

  • How to create a dynamic radiobutton in webdynpro dynamically

    HI,
    I want to create radiobutton in webdynpro dynamically.But this button in not enabled.Code:-
         IWDNodeInfo info =wdContext.getNodeInfo().addChild("RadioBUttonDymanicNode",null,true,false,true,false,false,true,null,null,null);
         IWDRadioButton rb = (IWDRadioButton)view.createElement(IWDRadioButton.class,null);
         String testAtt = "testAtt";
         info.addAttribute ("testAtt","ddic:com.sap.dictionary.string");
         rb.bindSelectedKey("RadioBUttonDymanicNode." + testAtt);
         rb.bindKeyToSelect("aa");
         rb.setEnabled(true);
         theTransContainer1.addChild(rb);
    Please suggest me how to make it enable.
    Regards
    -Sandip

    Hi Sandip,
    Try this code inside the wdModifyView(),
    if (firstTime)
            IWDRadioButtonGroupByKey radioButtonGroup =(IWDRadioButtonGroupByKey)
            view.createElement(IWDRadioButtonGroupByKey.class, "MyRadioButtonGroupByKey");
            radioButtonGroup.bindSelectedKey(<attributeName>);
            radioButtonGroup.setEnabled(true);
            IWDTransparentContainer container=(IWDTransparentContainer)
            view.getElement("RootUIElementContainer");
            container.addChild(radioButtonGroup);
    Regards
    Kishan

  • Dynamic node creation from RTTI structure and dynamic mapping

    Hi,
    I'd like to create a dynamic node in my component controller then map this node to a node in my view and bind it to a dynamic table.
    I create the dynamic node in my component controller using the add_new_child_node method :
    CALL METHOD root_node_info->add_new_child_node
        EXPORTING
          name                    = 'MY_TABLE'
          static_element_rtti     = struct_type
          is_static               = ABAP_true
        RECEIVING
          child_node_info              = node_info
    Then I use the add_new_mapped_child_node method to map the node in the view :
    * Map the context node dynamically
      wa_path = 'COMPONENTCONTROLLER.MY_TABLE'.
      insert wa_path into table tab_mapping_path.
      stru_mapping_info-controller = 'COMPONENTCONTROLLER'.
      stru_mapping_info-path = tab_mapping_path.
      lo_node_info = wd_context->get_node_info( ).
      CALL METHOD lo_node_info->add_new_mapped_child_node
        EXPORTING
          child_name      = 'MY_TABLE'
          mapping_info    = stru_mapping_info
        receiving
          child_node_info = lo_dyn_node_info
    The child node is created in my view context but it doesn't have any attribute or static element RTTI.
    Do I have to add each attribute with the add_attribute method and then the add_new_mapped_child_node method will copy them over?
    Regards,
    Pierre

    Problem solved, the path was not good :
    * Map the context node dynamically
    *  wa_path = 'COMPONENTCONTROLLER.MY_TABLE'.
    *  insert wa_path into table tab_mapping_path.
      stru_mapping_info-controller = 'COMPONENTCONTROLLER'.
    *  stru_mapping_info-path = tab_mapping_path.
      append 'COMPONENTCONTROLLER' to stru_mapping_info-path.
      append 'MY_TABLE' to stru_mapping_info-path.
      lo_node_info = wd_context->get_node_info( ).
      CALL METHOD lo_node_info->add_new_mapped_child_node
        EXPORTING
          child_name      = 'MY_TABLE'
          mapping_info    = stru_mapping_info
        receiving
          child_node_info = lo_dyn_node_info
    Regards,
    Pierre

  • Creating a Dynamic Node for a Dynamic Graphic - Tutorial

    Hi everyone,
    I'm sharing my first tutorial, hope it'll be helpful for you.
    In the Layout tab, it's possible to create an UI element "Business Graphic". It's a very simple tool that only requires a context node with a category attribute (that means, the values that will appear in the 'x' axis) and one or more series (each one with a color, generally a numerical value). It's possible to add a label for each series for better understanding of the Graphic.
    Although it's a very powerful tool, there are some problems when we must create a graphic with N series and different labels. If the graphic use an ALV or internal table to fetch data, during runtime we can have more or less series. The definition of a static node and generic series is not enough in this case. That's why I'd like to present you this little tutorial to create a dynamic node that fetchs a dynamic graph:
    In the WDDOINIT or Event Handler method that starts the application (once the data is available) we should create the dynamic node in the following way:
      DATA: lr_node_info    TYPE REF TO if_wd_context_node_info,             
                 lt_attributes      TYPE cl_abap_structdescr=>component_table,
                 attribute           LIKE LINE OF lt_attributes,
                 struct_type       TYPE REF TO cl_abap_structdescr,
                 lo_dyn_node    TYPE REF TO if_wd_context_node.
    * Let's suppouse we can LOOP at the data table, so we can fetch the
    * category data type (for example company name, month, year, ...)
    * and each series with a numeric type
      attribute-name = 'CATEGORY'.
      attribute-type ?= cl_abap_datadescr=>describe_by_name( 'STRING' ).
      INSERT attribute INTO TABLE lt_attributes.
      attribute-name = 'SERIE1'.
      attribute-type ?= cl_abap_datadescr=>describe_by_name( 'I' ).
      INSERT attribute INTO TABLE lt_attributes.
      attribute-name = 'SERIE2'.
      attribute-type ?= cl_abap_datadescr=>describe_by_name( 'I' ).
      INSERT attribute INTO TABLE lt_attributes.
    * Once we have all the attributs for the node, we create a formal structure
      struct_type = cl_abap_structdescr=>create( lt_attributes ).
    * Now we can get the context information to add a new node
      lr_node_info = wd_context->get_node_info( ).
    * Create the node
      lr_node_info = lr_node_info->add_new_child_node(
                        name = 'GRPH_DYN'
                        IS_MANDATORY = ABAP_false
                        IS_MULTIPLE = ABAP_true
                        STATIC_ELEMENT_RTTI = struct_type
                        IS_STATIC = ABAP_false ).
    * Now we should populates the node, I'll create a hardcoded table,
    * simulating the internal table that you should already have
      TYPES: BEGIN OF tw_alv,
                        category  TYPE string,
                       SERIE1    TYPE i,
                       SERIE2    TYPE i,
                    END OF tw_alv.
      TYPES: tt_alv TYPE STANDARD TABLE OF tw_alv.
      DATA: lw_alv  TYPE tw_alv,
                  lt_alv   TYPE tt_alv.
      lw_alv-category = 'Alfa'.
      lw_alv-serie1   = 3.
      lw_alv-serie2   = 8.
      APPEND lw_alv TO lt_alv.
      lw_alv-category = 'Beta'.
      lw_alv-serie1   = 4.
      lw_alv-serie2   = 4.
      APPEND lw_alv TO lt_alv.
      lw_alv-category = 'Gamma'.
      lw_alv-serie1   = 1.
      lw_alv-serie2   = 3.
      APPEND lw_alv TO lt_alv.
    * Now let's call the recently created node and bind the lt_alv table.
    * Get node from context
      lo_dyn_node = wd_context->get_child_node( name = 'GRPH_DYN' ).
    * Bind table with ALV Container
      CALL METHOD lo_dyn_node->bind_table
        EXPORTING
          new_items = lt_alv.
    * It's always good to check if the table was succesfully binded.
    * I refresh the lt_alv table and get the values from the node for controlling
      REFRESH lt_alv.
      lo_dyn_node->get_static_attributes_table( IMPORTING table = lt_alv ).
    There are other ways of adding a node structure in the method add_new_child_node, but it works for me only with STATIC_ELEMENT_RTTI. The node is now created and has the data required for the graphic. Now, we should go to WDDOONMODIFYVIEW, or save the target view as a parameter, to create the graphic, bind the category and series and show it on the screen.
      DATA: lr_graph       TYPE REF TO cl_wd_business_graphics,
                  lr_cat           TYPE REF TO cl_wd_category,
                  lr_series1    TYPE REF TO cl_wd_simple_series,
                  lr_series2    TYPE REF TO cl_wd_simple_series,
                  lr_container TYPE REF TO cl_wd_uielement_container,
                  lr_flow         TYPE REF TO cl_wd_flow_data.
    * Get the root element from the Layout or the specific
    * container you have created for the graphic
      lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    * Creates a line busniess graph
      lr_graph = cl_wd_business_graphics=>new_business_graphics(
            BIND_SERIES_SOURCE = 'GRPH_DYN'
            CHART_TYPE = cl_wd_business_graphics=>e_chart_type-lines
            HEIGHT = 340
            WIDTH = 750
            ID = 'GRAPH'  ).
    * Create the flow data for the new UI Element business graphic
      lr_flow = cl_wd_flow_data=>new_flow_data( element = lr_graph ).
    * Set graph in the root container from the Layout tab
      lr_container->add_child( lr_graph ).
    * Bind the category from the dynamic node to the dynamic graphic
      lr_cat = cl_wd_category=>new_category(
                      view = view
                      bind_description = 'GRPH_DYN.CATEGORY'
                      tooltip = 'Company Name' ).
      lr_graph->set_category( lr_cat ).
    * Bind the two series from the dynamic node to the dynamic graphic
      lr_series1 = cl_wd_simple_series=>new_simple_series(
                      bind_value = 'GRPH_DYN.SERIE1'
                      label = 'Sales'
                      view = view
                      tooltip = 'Average Sales' ).
      lr_graph->add_series( lr_series1 ).
      lr_series2 = cl_wd_simple_series=>new_simple_series(
                      bind_value = 'GRPH_DYN.SERIE2'
                      label = 'Purchases'
                      view = view
                      tooltip = 'Average Purchases' ).
      lr_graph->add_series( lr_series2 ).
    Finally we have created our business graphic. Test the application and you'll see something like the attached image.
    Hope you'll find it useful.
    Daniel Monteros.

    Hi,
    http://htmldb.oracle.com/pls/otn/f?p=26372
    then ApEx>Trees and pick a level.
    Use Help for more information.
    I you think that tree could help I will put more explanation into help page.
    Konstantin

  • Dynamic Node reset/clear

    Hi All,
    I have generated the context node dynamically and need to reset the node conditionally.  I have other nodes apart from dynamically created node in my context. All these nodes have data when I create my dynamic node. On certain condition, I regenerate this node and want the data in the other nodes to exist. Is there a way to clear the dynamic node only?
    I tried the following without success:
         wdContext.nodeDynamicNode().getContext().reset(false);
         IWDNodeInfo node = wdContext.getContext().getRootNode().getNodeInfo().getChild("DynamicNode");
         wdContext.nodeDynamicNode().bind(wdContext.nodeDynamicNode().createDynamicNodeElement());
    The "DynamicNode" is declared at the design time to which the node elements are added at the runtime. I just want to clear the nodes added before I regenerate the new ones.
    Any tips?
    Thanks in advance.
    Regards,
    Hemanth

    hi......
    As far as I know......
    U can not reset the 1 particular node... if u try whole dynamically created context will be deleted......
    try invalidate() function.......
    jaya

  • How to refer dynamic node?

    Hi All
    I create dynamic table with dynamic node.  Table has one row, and one of the column is Button, if i click on this button i want to add on more empty row of same structure as above row with some changes. If we declare node in context for adding row we follow this code...
    data: lr_node type ref to if_wd_context_node,
    ls_struc type if_main_view=>element_nomenclature.
    lr_node = wd_context->get_child_node( if_main_view=>wdctx_nomenclature ).
    lr_node->bind_element( new_item = ls_struc set_initial_elements = abap_false ).
    But here i  create node dynamycally.  how to refer dynamic node, and how to create row??
    Thanks,
    Madhan.

    Use
    data lr_element type ref to if_wd_context_element.
    lr_element = lr_node->create_element(  ).
    lr_node->bind_element( new_item = lr_element set_initial_elements = abap_false ).
    thanks
    sarbjeet singh

  • Create Multiple dynamic Node in Web Dynpro Abap

    Hi Friends,
          I need your help.My object is to create Multiple dynamic dropdown UI element.I am able to create this dynamic Dropdown element. But i need to assign default different values to this dropdown elements.So i created dynamic nodes for each dropdown and created attribute with same name as that of value table.
       My issue is its giving me error as : -
    Lower-Level Node with Name ZDCN_BRD_STATUS.ME Does Not Exist
    Help me to rectify this error..
    Regards,
    Santosh

    Hi,
    This information is not enough for anybody to help you. Write more in detail about your code and where exactly in the code this error is coming.
    One trial experiment can be that you split your problem into two or more level.
    Create several nodes in your context with attribute and sample data.
    Create Dynamic UI (DDBI) and Bind these attributes to your DDBI.
    When it works perfectly, then tryout how to create the Node and attribute dynamically. This way you are not making it too complex to solve this problem.

  • How to Export to Excel a Dynamic Node?

    Hi all,
    I would to know how it's possible to export in Excel a dynamic Node, created in the wdDoModify() method.
    I'd seen the tutorial TutWD_ExcelExport in wich the public method for exportation into Excel 2003 accepts in input a IWDNode attribute, but I can't pass him a dynamic node that I'd created and manipulated in the wdDoModify() method.
    How can I do???
    Thanks to all.
    Gianluca Barile

    I've implemented the following code (but it doesn't work)
    in wdDoModify() method:
    IWDNodeInfo nodeinfo = wdContext.getNodeInfo();
    IWDNodeInfo grigliaComparativaNode = nodeinfo.addChild("GrigliaComparativa",null,true,true,true,false,false,true,null,null,null);
    IWDAttributeInfo nominativo = grigliaComparativaNode.addAttribute("Nominativo","com.sap.dictionary.string");
    IWDAttributeInfo periodoDa = grigliaComparativaNode.addAttribute("Da","com.sap.dictionary.string");
    IWDAttributeInfo periodoA = grigliaComparativaNode.addAttribute("A","com.sap.dictionary.string");
    IWDAttributeInfo[] v = new IWDAttributeInfo[50];
    for (int i = 0; i < wdContext.nodeT_Body_Elements().size(); i++)
    v<i> = grigliaComparativaNode.addAttribute("V"+i,"com.sap.dictionary.string");
    IWDNode dynTabNode = (IWDNode)wdContext.getChildNode("GrigliaComparativa",0);
    Map columnInfosMap = new HashMap(); 
    dynTabNode.moveFirst();
    do{
    IWDNodeElement dynTabElem = (IWDNodeElement)dynTabNode.getCurrentElement();
                   columnInfosMap.put(dynTabElem.getClass().getName(),dynTabElem.getClass().getName().toString());
              }while(dynTabNode.moveNext()!=null);
              wdThis.wdGetExcelExportCompInterface().exportToExcel2003(dynTabNode , columnInfosMap);
    Message was edited by: Gianluca Barile
    Message was edited by: Gianluca Barile

  • Help: Dynamic ALV from an dynamic Node

    Hi Expart,
    I have a question.  I need to create an dynamic context node, and depending upon that dynamic context node, I need to create an dynamic ALV in the View. Is it possible to create two level of dynamic implimentation in case of ALV ?
    if possibel in that case, can ayn one give some hint, how to create  ? or some document link to help me out. Any kind of help is mostly welcome.
    thanks in advance.
    Regards
    Satrajit.

    Yes it is possible.
    To create the dynamic node you can use the method ADD_NEW_CHILD_NODE of the node info object.  You can use a ddic structure/table or an RTTI instance to supply the information for the node attributes. 
    rootnode_info = wd_context->get_node_info( ).
    *   Create dynamic sub node name TEST1 of structure (tablename)
        dyn_node_info = rootnode_info->add_new_child_node(
              static_element_type          = tablename
              name                         = tablename ).   " Web Dynpro: Name of Context Node
    You can then bind to the dynamic context node like normal:
    *  get instance of new node
      dyn_node = wd_context->get_child_node( name = tablename ).
    *  Bind internal table to context node
      dyn_node->bind_table( <tab> ).
    Then connect the dynamic context node to an ALV component usage:
    * Connect to the component Usage of the ALV
      if wd_this->wd_cpuse_alv( )->has_active_component( ) is initial.
        wd_this->wd_cpuse_alv( )->create_component( ).
      endif.
    * Through the interface controller of the ALV Component set the DATA node dynamically
      wd_this->wd_cpifc_alv( )->set_data( r_node_data = dyn_node  ).

  • How to de-activate a button in webdynpro dynamically

    Hi Experts,
    How to de-activate a button and checkbox in webdynpro dynamically depending upon some condition.
    Thanks,

    hi
    to de-activate or disable a button, lets say u want to disable SAVE button once it is clicked...
    then in the method where u write code for SAVE button
    at the end:
      elem_btn_disable->set_attribute(
            EXPORTING
              name =  `DIS_SAVE`
              value = abap_false ).
    DIS_SAVE should be of type WDY_BOOLEAN in the context.
    abap_false means deactivating the button .
    if you want to HIDE a button, then type should be WDY_VISIBILITY  or WDY_UI_ELEMENT_VISIBLE
    & value = 1 .
    if you want to do this before screen loads, then do it in the INBOUND plug method of in tht WDDOINIT method.
    give points if helpful.
    rgds
    prateek

  • Dynamic Node bind to attribute of type "STRING_TABLE"

    Hi ,
    I want to create dynamic node which is bind to attribute of type "STRING_TABLE'.
    Basically I want to create this node for inserting dynamic "TEXT EDIT' UI elements in my view .
    can sm1 help me in this regard.

    Seems like you should be able to use the API: cl_wd_dynamic_tool=>create_nodeinfo_from_struct.
    The real question is do you really need to create the node dynamically.  Why not just create a node that has the string_table attribute in it. Make the node 1:n or 0:n.  Bind this node to a RowReapter or MultiPane UI element.  Then as a child of the RowReapter/MultiPane you place your textEdit UI element.  This way, you will render dynamically how ever many textEdits as there are elements in your node.  No need for dynamic node creation.

  • Error in dynamic node creation ..........

    Hi experts,
    I am creating a node dynamically in WDDOINT  and creating an input field in WDDOMODIFYVIEW , but am getting an error "attribute not found". Am pasting below my code...
    Code in WDDOINT of a view :
    data lr_par_node       type ref to IF_WD_CONTEXT_NODE_INFO.
        data lr_node       type ref to IF_WD_CONTEXT_NODE_info.
         data lr_node_info1       type ref to IF_WD_CONTEXT_NODE_INFO.
        data lr_node1       type ref to IF_WD_CONTEXT_NODE.
        data lr_attribute  type        WDR_CONTEXT_ATTRIBUTE_INFO.
        data lt_child_node_map                  type wdr_context_child_info_map.
    *****to get context parent node information
        lr_par_node = wd_context->get_node_info( ).
    *****to get child node of the parent
        lt_child_node_map = lr_par_node->get_child_nodes( ).
    *****check for the existence of node
        read table lt_child_node_map transporting no fields with table key name = `RESULT`.
        if sy-subrc = 0.
          " REMOVE_CHILD_NODE
          lr_par_node->remove_child_node( `RESULT` ).
        endif.
    *****inserting new node in context
        CALL METHOD lr_par_node->ADD_NEW_CHILD_NODE
          EXPORTING
            NAME                         = 'RESULT'
    *       IS_MANDATORY                 = ABAP_FALSE
    *       IS_MANDATORY_SELECTION       = ABAP_FALSE
            IS_MULTIPLE                  = ABAP_TRUE
           IS_MULTIPLE_SELECTION        = ABAP_TRUE
    *       IS_SINGLETON                 = ABAP_FALSE
           IS_INITIALIZE_LEAD_SELECTION = ABAP_false
    *       STATIC_ELEMENT_RTTI          =
            IS_STATIC                    = ABAP_TRUE
    *       ATTRIBUTES                   =
    *       IS_RANGE_NODE                =
          RECEIVING
            CHILD_NODE_INFO              = lr_node.
        lr_node1 = wd_context->get_child_node( name = 'RESULT' ).
        lr_node_info1 = lr_node1->GET_NODE_INFO( ).
    *********Adding attribute
        lr_attribute-NAME = 'TEST_GROUP'.
        lr_attribute-TYPE_NAME = 'PLNNR'.
        lr_attribute-NODE_INFO = lr_node_info1.
        CALL METHOD lr_node_info1->ADD_ATTRIBUTE
          EXPORTING
            ATTRIBUTE_INFO = lr_attribute.
        clear lr_attribute.
    Code in the WDDOMODIFYVIEW :
    method WDDOMODIFYVIEW .
      if first_time = abap_true.
        data : lt_header_block type zcdp_tt_mfte_header.
        lt_header_block = WD_COMP_CONTROLLER->MT_HEADER_BLOCK.
        DATA :lr_container  TYPE REF TO cl_wd_uielement_container,
         lr_input      TYPE REF TO cl_wd_input_field,
         lr_caption    type ref to CL_WD_CAPTION,
         lr_column type ref to CL_WD_TABLE_COLUMN,
         lr_trans_cont TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
        data lr_lbl type ref to CL_WD_TEXT_VIEW.
    ******to get root element container
        lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
        lr_trans_cont ?= VIEW->GET_ELEMENT('TRANS_CONT_HEADER_BLOCK').
    * Created one transparent container in the view.......
    CALL METHOD CL_WD_TEXT_VIEW=>NEW_TEXT_VIEW
      EXPORTING
    *    CONTEXT_MENU_BEHAVIOUR = E_CONTEXT_MENU_BEHAVIOUR-INHERIT
    *    CONTEXT_MENU_ID        =
    *    DESIGN                 = E_DESIGN-STANDARD
    *    ENABLED                = 'X'
    *    H_ALIGN                = E_H_ALIGN-AUTO
    *    ID                     =
    *    LAYOUT                 = E_LAYOUT-NATIVE
    *    SEMANTIC_COLOR         = E_SEMANTIC_COLOR-STANDARD
        TEXT                   = 'TEST'
    *    TEXT_DIRECTION         = E_TEXT_DIRECTION-INHERIT
    *    TOOLTIP                =
    *    VIEW                   =
    *    VISIBLE                = E_VISIBLE-VISIBLE
    *    WIDTH                  =
    *    WRAPPING               =
      RECEIVING
        CONTROL                = lr_lbl
    cl_wd_matrix_head_data=>new_matrix_head_data(
                element = lr_lbl ).
    lr_trans_cont->ADD_CHILD( lr_lbl ).
       CALL METHOD CL_WD_INPUT_FIELD=>NEW_INPUT_FIELD
          EXPORTING
            BIND_VALUE             = 'RESULT.TEST_GROUP'
            ENABLED                = 'X'
    *       EXPLANATION            =
           ID                     = 'ABCD'
          RECEIVING
            CONTROL                = lr_input.
      cl_wd_matrix_data=>new_matrix_data(
                element = lr_input ).
    lr_trans_cont->ADD_CHILD( lr_input ).
      endif.
    endmethod.
    Pls help  me in this.....
    Thanks
    Aisurya.

    Hi,
    looking at code it seems that you are adding textview and inputfield. please check in debugging if the correct context node/attribute  is being created and you are providing its reference while adding UI elements.
    Thanks,
    Chandra

Maybe you are looking for