Dynammic node creation

hi experts,
i am creating node dynamically , i have declared variable contextnode_info like
     data : contextnode_info TYPE REF TO if_wd_context_node_info.
and when i write this code to get the node info in the varuable.
    contextnode_info = wd_context->get_node_info().
i am getting this the sytax error as
" Names like "NAME+" or "NAME()" , as in wd_ontext->get_node_info()" , are identical to "NAME.These are no longer allowed in release 4.0. "
Please suggest a way to resolve this.
Thank You.

Hi Vishvadeep
Try this code. For this u hv to take a node says - INPUT and within this a ttribute says tablename.
*Node Info
rootnode_info type ref to if_wd_context_node_info,
*Context Nodes
dyn_node      type ref to if_wd_context_node,
tabname_node  type ref to if_wd_context_node,
*String (for table name)
tablename type string.
*get node info of context root node
rootnode_info = wd_context->get_node_info( ).
*get the name of the table to be created.
tabname_node = wd_context->get_child_node( name = 'INPUT' ).
tabname_node->get_attribute( Exporting name = 'TABLENAME'
                              Importing value = tablename ).
translate tablename to upper case.
*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 ).
DATA: stru_tab type ref to data.
  field-symbols: <tab> type table.
*Create Internal Table
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>.
*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> ).
Regard
Manoj Kumar

Similar Messages

  • Permissions issue - node creation

    Today our application developed a new bug related to posting messages into a SimpleChatModel node.  It tells us that the user does not have permission to create the node.
    We have approximately 50 rooms and all of them have the nodes we need already in them.  There is no node creation that takes place during normal operation of our application.
    Now, we've been doing this type of posting (successfully posting chat messages into the SimpleChatModel with only Publisher-level permissions) all last week and over the weekend.  It may be that we wrote a bug of course, but I couldn't help noticing that the timing coincided with Nigel's blog post introducing the new SDK.  Is it possible that the volume of new LCCS users, or the use of new server-side permission techniques is related to our issue?
    Thanks,
    -Mike

    Hironmay, I appreciate your input, I know I didn't really provide enough info but I wanted to see if there actually was a problem of which you were aware.
    The behavior was better this morning - but the error has returned (no changes to our code have been made).  So I suspect it is either a timing issue related to how elements of the swf load, or a bug in your service.
    Here is some of the code we use to initialize the chat pod.
    import com.adobe.rtc.sharedModel.descriptors.ChatMessageDescriptor;
    import com.adobe.rtc.events.ChatEvent;
    import com.adobe.rtc.sharedModel.SimpleChatModel;
    [Bindable]
    public var chatModel:SimpleChatModel;
    private function init():void{
    chatModel = new SimpleChatModel();
    chatModel.sharedID = "myChat_SimpleChatModel";
    sync();
    chatModel.addEventListener(ChatEvent.HISTORY_CHANGE, onChatMsg);
    this.addEventListener(KeyboardEvent.KEY_UP, onKeyStroke);
    public function sync():void
    chatModel.subscribe();
    protected function submitChat(str:String):void
    var cmd:ChatMessageDescriptor = new ChatMessageDescriptor();
    cmd.msg =  str;
    chatModel.sendMessage(cmd);
    chat_mesg_input.text = "";
    that code is in an mxml file that defines the chat pod.  the only other place in which we call sync() is reproduced with a small bit of context here:
    if (_usersInRoom == "2" && !_synched) {
    startPublication();
    if (chatPod) {
    chatPod.sync();
    _synched = true;
    this issue does not seem to be confined to any specific room(s) and we are using version 10.
    Error: MessageManager.createNode : insufficient permissions to create node
    at com.adobe.rtc.messaging.manager::MessageManager/http://www.adobe.com/2006/connect/cocomo/messaging/internal::createNode()[C:\work\branches \connect\1004\cocomoPlayer10\src\com\adobe\rtc\messaging\manager\MessageManager.as:253]
    at com.adobe.rtc.sharedModel::CollectionNode/publishItem()[C:\work\branches\connect\1004\coc omoPlayer10\src\com\adobe\rtc\sharedModel\CollectionNode.as:615]
    at com.adobe.rtc.sharedModel::SimpleChatModel/sendMessage()[C:\work\branches\connect\1004\co comoPlayer10\src\com\adobe\rtc\sharedModel\SimpleChatModel.as:377]
    at ChatComponent/submitChat()[/Users/mschwab/work/GoodChat/flex/src/ChatComponent.mxml:31]
    at ChatComponent/onKeyStroke()[/Users/mschwab/work/GoodChat/flex/src/ChatComponent.mxml:55]

  • Node creation and addition to existing Element Node

    Hi all,
    I have a class that opens a xml file, loads the Document and then, from a method, I am trying to add sub nodes to one of the Element node from the XML document. It just doesn't work.
    This is the method that is supposed to add the nodes:
    public Node getSubNode( Node iCurrentNode )
    // Method local variables
    DocumentBuilder lBuilder = null;
    Document lDocument = null;
    DocumentBuilderFactory lFactory = DocumentBuilderFactory.newInstance();
    // Prepare the document and final Node to return
    lBuilder = lFactory.newDocumentBuilder();
    lDocument = lBuilder.newDocument();
    Element lSubMenu = lDocument.createElement("sub_menu");
    lSubMenu.setAttribute("ID", "User20");
    lSubMenu.setAttribute("label", "Montreal user 1");
    iCurrentNode.appendChild( lSubMenu );
    lSubMenu = lDocument.createElement("sub_menu");
    lSubMenu2.setAttribute("ID", "User21");
    lSubMenu2.setAttribute("label", "Montreal user 2");
    lDocument.appendChild(lSubMenu2);*/
    return iCurrentNode;
    I always get a "org.apache.crimson.tree.DomEx: WRONG_DOCUMENT_ERR: That node doesn't belong in this document."
    So I understand by this that I am working with a Document that I declared in this method and thus, for an unknown reason, seem unable to add this node to my existing Element node.
    What should I do to be able to add these nodes to my input Node?
    Dominique Paquin

    Ok, to answer my own question, and for the benefit of future people searching here for an answer, I'd used 2 different Document instance for the creation of my 2 nodes, one for the creation of the basic Node structure and one for the creation of the node that would be added to the other one. Since the importNode (done on the first one ) removes the parent from the imported node, I was no longer in a position to access the parent reference.
    I simply created a single Document in my class as a global variable and used this single entity to create all my nodes (the original and the one added to the original), It solved all my problems.
    I don't know if I was clear anough but if you need further explanation drop me a line.
    [email protected]
    http://www.okiok.com

  • Regex with xml for italicize or node creation

    Okay
    Guess it's a complex situation to explain.
    I am working on the text content of xml documents again. made quite a lot of progress with some of my other regex requirements.
    I am looking for a specific set of words to italicize say for example 'In Vitro'
    String Regex = "In Vitro";
    // here I get the text of a particular xml Node which is a text node
    String paragraph = nl.item(i).getNodeValue();
    //Value of paragraph before replace is "and lipids and In Vitro poorlysoluble(in water"
    String replace = "<Italic>In Vitro<Italic/>";
    String paragRepl = m.replaceFirst(replace);
    //Value of pargRepl after regex replace is "and lipids,?;:!and <Italic>In Vitro<Italic/> poorlysoluble(in water"
    //then I update the content of the node again
    nl.item(i)..setNodeValue(paragRepl);
    // save the xml documentthe italic tag is interpreted by our custom stylesheet to display "In Vitro" in italics, the reason it cannot do that is because the the character entities of the < and > have been put in the text content of the node i.e &lt; and &gt;. On closer examination of the text of the node after the document was saves, it appeared this way " &lt;Italic>In Vitro&lt;Italic/> ". For some reasom the greater than sign came out okay, but still no point, It didn't actually create a new node. I am not sure how you can automatically put tags around specific text you find in xml documents using regex, or If I have to create a new node at that point.
    it's xml so these entities come into picture.
    any help is greatly appreciated, in short I need to just add a set of tags to a particular regex I find in an xml document,
    thanks in advance
    Jeevan

    okay i am getting closer to the solution as there is an api call from another proprietary language that would do this
    but as I loop through the xml document, it keep selecting the text "In Vitro" even after it has been italicized.
    So I guess my next challenge is getting a regex which looks for "In Vitro" but not italicized
    For regex so far I have seen case insensitive handling, I have seen for italics
    basically if I I can get my hands on a regex for example
    String regex = "In Vitro && Not Italic"
    any help is appreciated
    Jeevan

  • 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

  • Difference among Model node creation, model attribute creation and the field creation in database through AET?

    Hello Friends,
    To display the field on the View, we can create the field via 3 ways:
    1) By creating the model attribute
    2) By creating the model node using the GENIL object and using its attributes in view
    3) Creating the field in Database structure using AET
    But, i am not aware that in exactly what kind of business scenarios we use the above 3 methods to create the field.
    Could you help me out to clarify the same.

    Hi Dev,
    1). By creating the model attribute: we will use this option in case of the field is avaibla in stanadrd sap system. It might be in another under child context nodes and we will use BOL relations to access the attribute.
    2).  By creating the model node using the GENIL object and using its attributes in view: We will use this option incase of there is no standard provision to use. Means you want to create any custom assignment block with custom attributes then you can go for this option. More over we can use AET to create custom genil object. We have an option Create Table in AET.
    3).Creating the field in Database structure using AET: We will use this option incase of there is no attribute in database relevant to your requirement then we will go for AET enhancement.
    Hope this might give you little clarification..
    Best Regards,
    Dharmakasi.

  • Child to Parent Node Creation, Mapping Help required

    Hi Guys,
    I need some suggestions on the following mapping problem, kindly suggest some solution if possible:
    I have a sender structure as:
    ParentNode
    ..........RecordSet  (0 to 1)
    ................ SValue1  (0 to 1)
    ................ SValue2  (0 to 1)
    .................SValue3  (0 to 1)
    For the receiver Structure I have following:
    ParentNode
    ..........RSet  (0 to unbounded)
    ............. RValue  (0 to 1)
    ..............RField    (0 to 1)
    Now my mapping conditions requires for every SValue1, SValue2, SValue3 source fields, I should generate at receiver side a new RSet and the value of SValue1/SValue2/SValue3 field(s) should be Provided into RValue, and RField should have the respective field name.
    I am trying this with PI Graphical mapping, is there any better solution for it?

    Hi,
    As source structure occurence is 0..1 in this case duplicate the target structure and use create if function with source as SValue1 ...so that for each of Svalues...a corresponding target node will get generated...
    With graphical mapping you should be able to do this...else need to go for UDF...
    HTH
    Rajesh

  • 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

  • Target node creation on condition

    Hi I have a requirement where i have to create a target node based on a requiremnt.
    the source is                                         The target is
    Line                                                     Tar
      a1                                                         C1
      b1                                                         C2
    c1
    Line
    a1
    b1
    c2
    Line                                                    Tar
    a2                                                          C3
    b2
    c3
    I have achieved creating Tar based on a b values . now i have to map the C target so that it is created for every c value . but if a,b values are same then C has to be in the same Tar element.
    How can i achieve this . Any help is greatly appriciated.
    Note: i just need the mapping for C node. not the Tar node.
    Thank you

    Hi ,
    in my input i have,
    <Name>
    <FirstName>demo</FirstName>
    <LastName>test</LastName>
    </Name
    <Name>
    <FirstName>Testdemo</FirstName>
    <LastName>test</LastName>
    </Name
    <Name>
    <FirstName>Test</FirstName>
    <LastName>test</LastName>
    </Name
    <Name>
    <FirstName>demo data</FirstName>
    <LastName>test</LastName>
    </Name
    So i have to create Name node in target whenever FirstName is  starts with demo with other values in the corrspoinding Name node.
    So my target will be
    <Name>
    <FirstName>demo</FirstName>
    <LastName>test</LastName>
    </Name>
    <Name>
    <FirstName>demo data</FirstName>
    <LastName>test</LastName>
    </Name
    Please tell me how to get this
    Thanks
    Archanaa

  • [IDCS3] Asserts during tree node creation

    I'm porting a plug-in from CS2 to CS3 and am in the middle of converting a list box widget displayed on a dialog to a tree view, using the WListBoxComposite SDK sample and SDK docs as a guide. I'm getting the message:<br /><br />b CreateObject- ReadWrite for impl kTreeNodeControlViewImpl in class kTreeNodeWidgetBoss read wrong amount in plugin <my plugin ID><br /><br />during RegisterStyleWidget in my widget manager implementation, and <br /><br />b ASSERT 'fUTF16BufferLength >= fNumChars'<br /><br />once the dialog is displayed. If I change my tree view adapter to report zero list items then things work fine. I'm assuming this is due to a problem with the resource definition in my .fr, but I haven't been able to spot anything wrong. Are there other places I should be looking at for the source of these errors?<br /><br />For reference, my node widget is defined as:<br /><pre><br />type MyTreeNodeWidget(kViewRsrcType) : <br />ErasablePrimaryResourcePanelWidget(ClassID = kTreeNodeWidgetBoss){};<br /><br />resource MyTreeNodeWidget(kMyTreeNodeRsrcID + index_enUS)<br />{<br />    __FILE__, __LINE__,         <br />    kMyTreeNodeWidgetID, //Widget ID<br />    kPMRsrcID_None,             //Resource ID<br />    kBindLeft | kBindRight,<br />    Frame(0,0,200,20),<br />    kTrue, kTrue,               //Visible, Enabled<br />    kTrue,                      //Erase before draw<br />    kInterfacePaletteFill,      //Color to erase to<br />    "",<br />    {<br />        InfoStaticTextWidget<br />        (<br />            kMyTreeNodeNameWidgetID,            <br />            kSysStaticTextPMRsrcId,<br />            kBindNone,<br />            Frame(2,0,Width, Height),<br />            kTrue, kTrue,                                   <br />            kAlignLeft,                                     <br />            kDontEllipsize,<br />            "",<br />            0,<br />            kPaletteWindowSystemScriptFontId, <br />            kPaletteWindowSystemScriptHiliteFontId,<br />        ),<br />    }       <br />};<br /><br /></pre>

    ErasablePrimaryResourcePanelWidget is wrong, use StandardTreeNodeWidget for kTreeNodeWidgetBoss. The ControlView implementation on StandardTreeNodeWidget (kTreeNodeControlViewImpl) expects the CControlView values without erase and color values.
    Do your erase outside, in the actual tree view.
    Dirk

  • Node creation

    Hi All,
    What is the difference in creating a node in Webdynpro ABAP and mapping them onto ABODE form TO
    creating the tables and nodes in Aodbe form and mapping them to WDA.
    In which cases we follow which apporach..
    When I need to work both with WDA and Adobe...where to create/handle the data first....when a user enters the data into a form that is run from WDA...In this case do the nodes to be created first in WDA and map them to FORM...or viceversa...
    Please share more info..
    Regards,
    Lekha.

    Hi,
    Since the number of times you want to create the target node is fixed i.e. 5, you can right-click on the target node in the message mapping and then select the option of "Duplicate".....Do this 4 times (1original + 4duplicates)...this will cause the addition of the node desired number (5) of times....now once the node has been duplicated apply an If condition on each of these nodes (original and duplicate)....This condition will check the existence of the source node and if the source node is present then your target will repeat 5 times...
    Repeatition of the target node is possible only if the occurence is set to 0/1...unbounded
    Make sure that you set the context of the source node properly.
    Regards,
    Abhishek.

  • Dynamic Node Creation

    Hai all,
              I am new to the Dynpro. i have to create 'n' number of drop down at dynamically. The values of 'n' only known at runtime, that is fetch from database. 
              Basically each dropdown must have one node and one attribute. So i have to create 'n' number of nodes. Each drop down have different values.
               I created some node at runtime using the following code.
          for(int j=0;j<count;j++){
          IWDNodeInfo node = wdContext.getNodeInfo
          ().addChild ("Roles"+j,null,true,     true,false,
          false,false,true,null,null,null);
          node.addAttribute(roles[j].toString  
          (),"com.sap.dictionary.string");
    This is done inside the wdDoInit() method.
    Then i have to fetch the node one by one and load values from database and finally bind into the drop down inside the wdDoModifyView() method.
          I tried the following code,but i don't know whether is it correct way or not.
    if (firstTime) {
              IWDTransparentContainer container = 
                    (IWDTransparentContainer) view.getElement
                    ("RootUIElementContainer");
    container.createLayout(IWDMatrixLayout.class);
    for(int rolecunt=0;rolecunt<size;rolecunt++){
    IWDNode node = wdContext.currentContextElement().node().getChildNode("Roles"+rolecunt,rolecunt);
    IWDNodeElement nodeElement1 = node.getCurrentElement();
    thanks in advance,
    Mukesh Mani.

    Hai Noufal,
                Thanks for your reply. I couldn't get you. From your suggestion i created dropdown only in domodify() like this,
    IWDDropDownByIndex dropDownList = (IWDDropDownByIndex)
    view.createElement (IWDDropDownByIndex.class, "inp");
                How to bind node attribute into the above drop down. Before i created 'n' number of nodes in
    wdinit() method using the following code.
    for(int j=0;j<count;j++){
                   IWDNodeInfo node =
                               wdContext.getNodeInfo().addChild(
                                  "Roles"+j,
                                  null,
                                  true,
                                  true,
                                  false,
                                  false,
                                  false,
                                  true,
                                  null,
                                  null,
                                  null);
    //                    for(int k=0;k<count;k++){          
                             node.addAttribute(roles[j].toString(),"com.sap.dictionary.string");

  • Regarding Target Node creation in Target message

    Hi,
    I am trying to dynamically control the appearence of a node(occurence 0..1) in the target structure using the graphical mapping.
    Source structure looks like.
    Source(occurence 1..1)
        Node1(occurence 0..1)
          Rec1(occurence 0..1)
          Rec2(occurence 0..1)
    here source is the root node under which Node1 is a sub node and Rec1 and Rec2 are two elements of type string under Node1.
    The target structure is also same as that of source. My requirement is to create Rec1 in the target side if Rec1 has value(A), else Rec1 will not be created at the target side, but Rec2 will be created.
    I have used the Createif function to achieve this but it won't worked.
    Createif is working fine, if the assigned condition to it is true else it throws a mapping exception.
    Please suggest me how to achieve this.

    Hi Nitin,
    Give Rec1 and Constant(with value A) as input to function equalsS.Give output from equalsS and Rec 1 to if and then inputs of ifWithoutElse function and give to Rec1 in the target.
    Rec1->equalsS(ConstantA)->ifWithoutElse->Rec1.
    Give Rec1 as input to then and output of equalsS(Constant A) as input to if of ifWithoutElse function.
    For Rec2 give a not function after equalsS function in the above mapping for Rec1 and give Rec2 as input to then of ifWithoutElse function.
    Rec1->equalsS(ConstantA)->not->ifWithoutElse->Rec2
    Give Rec2 as input to then and output of not function as input to if of ifWithoutElse function
    This should solve your issue.
    Rgds,
    Lekshmi.

  • Target Node Creation

    Hi,
    I have to check a condition of a filed in a particular node and if it satisfied need to create the a node in the target with respect to the source node.
    I tried various combination but ended up in error,
    please help.
    Thanks

    Hi ,
    in my input i have,
    <Name>
    <FirstName>demo</FirstName>
    <LastName>test</LastName>
    </Name
    <Name>
    <FirstName>Testdemo</FirstName>
    <LastName>test</LastName>
    </Name
    <Name>
    <FirstName>Test</FirstName>
    <LastName>test</LastName>
    </Name
    <Name>
    <FirstName>demo data</FirstName>
    <LastName>test</LastName>
    </Name
    So i have to create Name node in target whenever FirstName is  starts with demo with other values in the corrspoinding Name node.
    So my target will be
    <Name>
    <FirstName>demo</FirstName>
    <LastName>test</LastName>
    </Name>
    <Name>
    <FirstName>demo data</FirstName>
    <LastName>test</LastName>
    </Name
    Please tell me how to get this
    Thanks
    Archanaa

  • Dynamic node Creation Problem

    Hi all,
    I am trying to create a node through Java code bellow is the code
    IWDNodeInfo graph = wdContext.nodeGraph().getNodeInfo();
    for(int i=0;i<10;i++)
         int nodeNumber = i+4;
         IWDNodeInfo seriseNode = graph.addChild("Serise"+nodeNumber,null,true,false,false,false,false,false,null,null,null);
         seriseNode.addAttribute("S"+nodeNumber+"_size","com.sap.dictionary.double");
         seriseNode.addAttribute("S"+nodeNumber+"_xVal","com.sap.dictionary.double");
         seriseNode.addAttribute("S"+nodeNumber+"_yVal","com.sap.dictionary.double");
         //seriseNode.addAttribute("S"+nodeNumber+"_tooltip","com.sap.dictionary.string");
         IWDNode node = wdContext.nodeGraph().getChildNode("Serise"+nodeNumber,IWDNode.NO_SELECTION);
         IWDNodeElement nodeElem = node.createElement();
         nodeElem.setAttributeValue("S"+nodeNumber+"_xVal",new Double(0));
         nodeElem.setAttributeValue("S"+nodeNumber+"_yVal",new Double(0));
         nodeElem.setAttributeValue("S"+nodeNumber+"_size",new Double(0));
         node.addElement(nodeElem);
    IWDNode node = wdContext.nodeGraph().getChildNode("Serise4",IWDNode.NO_SELECTION);
    node.getCurrentElement().getAttributeAsText("S4_size");
    now it is giving me null pointer exception at last line any idea why it coming.
    Thanks

    Hi,
    This problem is solved but now there is another problem,
    I am creating a Node and attributes at runtime and want to bind to a business graphics UI element bellow is the code for that
    IWDPoint se_point = (IWDPoint) view.createElement(IWDPoint.class,"Series"+seriseNumber+"_Point");
    se.setPoint(se_point);
    se.getPoint().bindValueSource("Graph.Serise"+seriseNumber);
    se.setLabel(supp.getSupplier_Name());
    IWDNumericValue numXVal = (IWDNumericValue) view.createElement(IWDNumericValue.class,"S_"+seriseNumber+"numXVal");
    numXVal.bindValue("Graph.Series"+seriseNumber+".S"+seriseNumber+"_xVal");
    numXVal.setType(WDValueTypeEnumeration.X);
    numXVal.setValue(supp.getXcord());
    and it gives bellow error for last line in the code
    com.sap.tc.webdynpro.progmodel.context.ContextException: Node(GraphView.Graph): no child node 'Series1' at index -1
    Can any one help in this
    Thanks

Maybe you are looking for

  • Moving to Final Cut Pro/Studio from Final Cut Express 4.0.1

    Here's the basic questions... This is a full on different software app than the FCE on my machine right, not an upgrade? Can I run them both independent of each other and still move some of my FCE projects over to FCP? Like untill I get my hands arou

  • End-of-file on communication channel error when starting database

    Hi All, I have small problem, when we specify at startup without any pfile, it will go to read spfile,in our case it gives error end-of-file on communication channel. Can anyone please help me to resolve this issue? Thank you Chirag

  • Special procurement X

    I have one scenario:- I want to have procurement of one semi FG as X i.e both in house as well as external procurement. If order quantity is less than 100, system should create planned orders to be converted to production orders. If order qty is more

  • Blättern in Adobe Reader bei "Zwei-Seiten-Nebeneinander"-Ansicht

    Hallo, meine Frage bezieht sich auf die "Zwei-Seiten-Nebeneinander"-Ansicht. In dieser Ansicht wird bei Betätigung der Pfeiltaste automatisch um zwei Seiten weitergeblätter. Genauer gesagt werden immer ungerade Seitenzahlen auf der linken Seite und g

  • XI Interoperability with C-based Custom Applications

    How can XI interoperate/connect to C-based custom applications?  What connectivity option (i.e. adapters) can be used for both inbound and outbound processing?  Please provide the best approach using the existing technology adapters, existing 3rd-par