Check if element node exists then create another element

Hi Everyone,
I have element node in the Target structure. I need to create another node if 1st node has been created.
Please let me know how should I do it.
Thanks
NPrabhu

Hi,
I need another node to occur.
I need to check if item in the target is created. If yes then create item[1].
Also I need to add another item above each item node to say which text it is.
<ENGLISH_TEXTS>
   <item>
     <LINE>Catalog text jasdkajdlsk;k;</LINE>
   </item>
   <item>
     <LINE>ProductText asasdklkf;sdlfs' </LINE>
   </item>
</ENGLISH_TEXTS>
I want it to look like this
<ENGLISH_TEXTS>
   <item>
     <LINE>Catalog text</LINE>
   </item>
   <item>
     <LINE>Catalog text jasdkajdlsk;k;</LINE>
   </item>
   <item>
     <LINE>Product text </LINE>
   </item>
   <item>
     <LINE>ProductText asasdklkf;sdlfs' </LINE>
   </item>
</ENGLISH_TEXTS>
Thanks

Similar Messages

  • How can I edit in Elements 10 or Premier Elements 10, slide shows created in Elements 8?

    How can I edit in Elements 10 or Premier Elements 10, slide shows created in Elements 8?
    Fortunen

    When you installed version 10 did you convert your previous catalog?
    If so, your projects should appear in the PSE10 Organizer. To search for them type PSESS into the search box.
    You should then be able to open the project by double clicking on  its thumbnail.
    Then choose Output >> Edit in Premier Elements

  • I downloaded and installed Photoshop Elements & Premiere Elements.  I then launched Photoshop Elements Organizer and imported approx. 28,000 photos (including some videos).  A window opened indicating that many of the photos had tags, and asking if I want

    I downloaded and installed Photoshop Elements & Premiere Elements.  I then launched Photoshop Elements Organizer and imported approx. 28,000 photos (including some videos).  A window opened indicating that many of the photos had tags, and asking if I wanted to add the tags.  I said yes, and the process began.  When it reached 60% a window opened indicating that "Elements 13 Organizer has stopped working", with the only option being to "Close program."
    I've since tried to open organizer several times, but it goes immediately to "Elements 13 Organizer has stopped working".  I was able to open Editor, and tried opening Organizer from Editor, but encountered the same problem.
    FYI, I have an open case (#0214505556), but have not received the help I need.

    This issue is with respect to Elements 13.

  • IDOC and then create WBS element

    Hi guys,
    I need some help here.
    The process is like this. I'm creating an IDOC which would then create a WBS element.
    The message type used here is /ISDFPS/PS and Basic Type is /ISDFPS/PS01.
    I'm posting the IDOC using FM "IDOC_INBOUND_SINGLE.
    The segments that I'm populating are:
    /ISDFPS/E1BP_PROJECT_DEF
    /ISDFPS/E1BP_WBS_ELEMENT
    Its posting and creating the WBS element successfully but there is a small issue.
    Lets say I have a Project Definition A  and under that I have a Parent WBS B
    How do I put the newly created WBS element under the Parent WBS B?

    Friends, Let me correct my stand here.
    In my system, I simulated scenario, I am not getting REL status for higher level  TECO WBS, when I undo TECO for network activity. I tried to find out  why my  system is behaving in that way.  I referred note " 938066 - CJ20N: Cannot Undo TECO status of activity"
    According  to it correction is provided in Support package SAPKH60005 and I am at
    SAP_APPL     600     0002     SAPKH60002     Logistics and Accounting .
    So, My system is not correctly behaving. I have verified the same with one another note  Note 542974 - Status inheritance in different transactions
    Thanks to Ahmed &  A Bhardwaj  for overlooking me.  So, I re look and got the reason. Rashid, take solution given by Ahmed & Bhardwaj ( The same is up to mark )
    With Regards
    Nitin P.

  • How to check whether a node exist in a Particular Level. (xmltype)

    hi,
    please help me to check whether a particular node exists in one level.
    for eg
    I have the following xml
    <map>
         <entry>
              <key>
                   heading1
                   </key>
              <map>
                   <entry>
                        <key> sub1 heading1</key>
                        <value> sub1 heading1 value  </value>
                   </entry>
                   <entry>
                        <key> sub2 heading1 </key>
                        <value> sub2 heading1 value  </value>
                   </entry>
              </map>
         </entry>
         <entry>
              <key>
                   heading2
                   </key>
              <map>
                   <entry>
                        <key> sub1 heading2</key>
                        <value> sub1 heading2 value  </value>
                   </entry>
                   <entry>
                        <key> sub2 heading2 </key>
                        <value> sub2 heading2 value  </value>
                   </entry>
              </map>
         </entry>
    </map>i need to check how many heading exists in this xml.
    I am checking like
            i:=1;
         l_section := ip_xml.extract('//map/entry');
         WHILE l_section.existsnode('entry[' || i|| ']') = 1 LOOP
              // extract the key name within entry tag
                  // print the key name.
    i:=i+1;
         end loop;but iam getting all the key name like
    heading1
    sub1 heading1
    sub2 heading1
    heading2
    sub1 heading2
    sub2 heading2
    I need only heading1 and heading2. how can I check whether a particular node exist in particular level.
    first level , second level etc. Please help

    but iam getting all the key nameThat's because you're using a descendant axis : //map/entry
    SQL> DECLARE
      2 
      3   ip_xml  xmltype := xmltype('<map>
      4       <entry>
      5            <key>
      6                 heading1
      7                 </key>
      8            <map>
      9                 <entry>
    10                      <key> sub1 heading1</key>
    11                      <value> sub1 heading1 value  </value>
    12                 </entry>
    13                 <entry>
    14                      <key> sub2 heading1 </key>
    15                      <value> sub2 heading1 value  </value>
    16                 </entry>
    17            </map>
    18       </entry>
    19       <entry>
    20            <key>
    21                 heading2
    22                 </key>
    23            <map>
    24                 <entry>
    25                      <key> sub1 heading2</key>
    26                      <value> sub1 heading2 value  </value>
    27                 </entry>
    28                 <entry>
    29                      <key> sub2 heading2 </key>
    30                      <value> sub2 heading2 value  </value>
    31                 </entry>
    32            </map>
    33       </entry>
    34  </map>');
    35 
    36  BEGIN
    37 
    38    for r in (
    39      select heading, headno
    40      from xmltable( '/map/entry/key'
    41                     passing ip_xml
    42                     columns heading varchar2(30) path '.'
    43                           , headno  for ordinality )
    44    )
    45    loop
    46      dbms_output.put_line('Heading '||r.headno||' = '||r.heading);
    47    end loop
    48    ;
    49 
    50  END;
    51  /
    Heading 1 =
                   heading1
    Heading 2 =
                   heading2
    PL/SQL procedure successfully completed

  • Check if email address exists before creating account

    Hi all,
    Is there a way to check if the email address chosen when creating a new account isn't already used by another account ?
    Thanks,
    Ben

    Hi.
    First, create a new rule with this code:
    <Rule name='Check Email'>
      <RunAsUser>
        <ObjectRef type='User' id='#ID#Configurator' name='Configurator'/>
      </RunAsUser>
      <RuleArgument name='emailToCheck'/>
      <RuleArgument name='actualId'/>
        <cond>
          <neq>
            <length>
              <remove>
                <invoke name='getUsers' class='com.waveset.ui.FormUtil'>
                  <ref>context</ref>
                  <map>
                    <s>conditions</s>
                    <list>
                      <new class='com.waveset.object.AttributeCondition'>
                        <s>email</s>
                        <s>is</s>
                        <ref>emailToCheck</ref>
                      </new>
                    </list>
                  </map>
                </invoke>
                <ref>actualId</ref>
              </remove>
            </length>
            <i>0</i>
          </neq>
          <s>Email address is already in use.</s>
          <null/>
        </cond>
        <MemberObjectGroups>
            <ObjectRef type='ObjectGroup' id='#ID#All' name='All'/>
        </MemberObjectGroups>
    </Rule>Then, set the validation of waveset.email field in the form in this way:
    <Validation>
      <cond>
        <ref>waveset.email</ref>
        <rule name='Check Email'>
          <argument name='emailToCheck' value='$(waveset.email)'/>
          <argument name='actualId' value='$(waveset.accountId)'/>
        </rule>
      </cond>
    </Validation>That's all!
    O

  • Number of line exceeds in source file by 999 then create another IDOC

    Hi
    I am working on a scernario
    There 3 source files and each file should may have more than 999 lines.
    I need to create idoc only for 999 lines so when lines exceeds then new idoc should be created.
    Can anyone tell me the resolution for the same.
    Regards
    Ria

    Hello,
    Change the FCC configuration.. as described in below.
    Record set Strcture : *,999
    Record Sets per message as : 1
    To eliminate header : Document offset : 1
    Try this by putting message protocol as file content convertion.
    Thx
    Subbu

  • Call subtemplate if the corresponding node exists in the XML

    Hi,
    I have a requirement to call the sub template if the corresponding exists in the XML file. For example if the invoice node and the corresponding details are present in the XML file then i have to call the invoice sub template. Can any one suggest me how to check if the node exists or not in the XML file. Is there any specific command for this.
    Thanks

    Hi,
    Thanks a lot..it is working now as per ur suggestions..but am facing another problem here. Am calling the sub template from a main template. Headers and footers for both main and sub templates are different. So for calling the sub template i did section break (Insert -->Break , In section break-->New page) so that the header and footer of the main template wll not be repeated in the sub template. So in the new page am checking if the node exists or not the XML. If so then call the XML. If the node exists then sub template is called successfully. But if the node does not exists then a blank page is displayed for this since the call stmt is in the new page.
    So can you please suggest me how to suppress the blank page if the node does not exist.
    Thanks.

  • How to check if database/table exists in MYSQL

    I am writing a program which accesses databases in MYSQL, is there any way to check if the databases exists on the MYSQL server and if not create one && to check if a table exists and create one of if it does not

    OK, found out that as special permissions needed to create databases I assume it cannot be done via my app but how about Tables

  • Installed Photoshop Elements 13.  Tried to launch - "Elements 13 Organizer has stopped working."

    I downloaded and installed Photoshop Elements 13 & Premiere Elements.  I then launched Photoshop Elements Organizer and imported approx. 28,000 photos (including some videos).  A window opened indicating that many of the photos had tags, and asking if I wanted to add the tags.  I said yes, and the process began.  When it reached 60% a window opened indicating that "Elements 13 Organizer has stopped working", with the only option being to "Close program."
    I've tried to open organizer several times, but it goes immediately to "Elements 13 Organizer has stopped working".  I was able to open Editor, and tried opening Organizer from Editor, but encountered the same problem.  Same when I opened from Premiere Elements.
    I’ve uninstalled/reinstalled Elements 13 three times, twice using the Akamai downloader, and once using the Alternate method.  It said installation completed, but when I opened the program, it went straight to the error "Elements 13 Organizer has stopped working".  These times I didn't get to import my photos or their associated tags.

    I already checked that and I have the latest drivers for my printer. Thanks for the suggestion though.  Dennis

  • Create another table from existing table with distinct elements

    I have a table applying select clause on which gives following result.
    SQL> select *
    2 from BRANCH_MSTR;
    BRANCH_NO NAME
    B1 Vile Parle(HO)
    B2 Andheri
    B3 Churchgate
    B4 Sion
    B5 Borivali
    B6 Matunga
    B1 C.S.Pur
    B1 Shahidnagar
    B1 Shahidnagar
    I want to create another table ACCT_DTLS from this table which has only one column BRANCH_NO, but has only distinct elements.
    I tried this,
    SQL> create table ACCT_DTLS
    2 (BRANCH_NO)
    3 as
    4 select BRANCH_NO
    5 from BRANCH_MSTR;
    Table created.
    SQL> select 8
    2
    SQL> select *
    2 from ACCT_DTLS;
    BRANCH_NO
    B1
    B2
    B3
    B4
    B5
    B6
    B1
    B1
    B1
    9 rows selected.
    But its not working.

    HI Asit,
    try like this
    sql>create table table-name as (select distinct column-name from another-table);example
    SQL> create table temp_emp2 as (select distinct deptno from scott.emp);
    Table created.
    SQL> select * from temp_emp2;
        DEPTNO
            30
            20
            10

  • IXML - Checking if a specific node exists in XML data

    Hi,
    I´m reading XML data by using iXML classes. One XML file I´m reading contains header and
    item data.
    Right now I´m starting with reading the header attributes and then read all nested nodes and their attribute data. That works all fine, but now I had the error, that the XML file wrongly didn´t contain the items.
    My XML reading method then ended up in a dump because the node was null:
    l_node = l_iterator->get_next( ).
    Can anybody give me an advice, how to check at the beginning of reading my xml data, if a specific node (in my case the node for items) exists in the XML data? If not, I want to stop with an error message. I want to check that at the beginning, before reading all element data, to keep my method structured.
    Thank you very much!

    Hi,
    You can create a filter and set that filter to the iterator. If this is done the iterator returns you only the node with a specific node name or node ID.
    You can also check the parsing in the following WIKI code gallery
    https://wiki.sdn.sap.com/wiki/x/JoDmAQ
    Subroutines create_set_filter_attribute and parse_xml_file would be helpful.

  • HI Can I add a child node to an Element Node with a name that  exists

    HI,
    Can I add a child node to an Element Node with a name that is already existing in the Element Node.
    Let me explain what I need exactly.
    My Existing element Node looks like this:
    <form>
    <name>
    <FirstName></FirstName>
    <LastName></LastName>
    </name>
    </form>
    Can I add another child node with hte name 'FirstName' to the 'name' node ..?
    I want to put a attribute rvsn with a value 1 for the original 'FirstName' element Node.
    so the new Element Node should look like the foloowing:
    <form>
    <name>
    <FirstName rvsn="1"></FirstName>
    <FirstName></FirstName>
    <LastName></LastName>
    </name>
    </form>
    Hopefully this is valid XML !!
    when I tried to use appendChild, it removed the previous node and put the new one. Thats what is the documentation also said.. I read it after I tried it :(
    Anyway, ther should be another way to add a node like that.
    Any hints, ideas will be of great help.
    -Thanks in advance !!
    Murthy

    // this method will start marking the old values with a revision number.
         private void saveNodeDetails (Node node) {
    String Content = "";
    String nodeName = "";
    int rvsn = getRvsn();
    int type = node.getNodeType();
    int tempRvsn = 0;
    String tempNodeName = "";
    String tempParentNodeName = "";
    Node tempParentNode = null;
    // check if element
    if (type == Node.ELEMENT_NODE) {
    Node traverseNode = node;
    nodeName = getNodeName(traverseNode);
    if (nodeName != null && nodeName.trim().length() > 1)
    nodeName = nodeName.substring(0, nodeName.length() - 1);
    if (_debug)
    System.out.print("2. ELEMENT_NODE name## " + nodeName);
    // if the element has no children, its leaf node.
    // if its there in the Hashtble, then update the value from the hashtable.
    if (reqParams.containsKey(nodeName)) {
    if (_debug) System.out.println("3. Hash Value = " + reqParams.get(nodeName).toString());
    if (traverseNode == null)
    if (_debug) System.out.println("3A. traverseNode == null ");
    if (node == null)
    if (_debug) System.out.println("3B. node == null ::(((((");
    // get the node children
    NodeList children = node.getChildNodes();
    // end of getting children for the Node.
    if (_debug) System.out.println("4. Got ChildNodes ");
    if (children != null) {
    int length = 0;
    length = children.getLength();
    if (_debug) System.out.println("5. Got children Length = " + length);
    if( ((Element) node).hasAttribute("rvsn") ){
    System.out.println(" node has Attribute(rvsn) ");
    tempRvsn = Integer.parseInt( ((Element) node).getAttribute("rvsn") );
    if( tempRvsn == rvsn){
    // user is changing the same data again and again.
    // so remove the text node and append the new value as text node finally
    for (int index = 0; index < length; index++) {
    if (_debug) System.out.println("6. index = " + index);
    if (_debug) System.out.println(index + ": children.item( index )@saveNodeDetails@ContainerDoc = " + children.item(index).getNodeType() + " -- " + children.item(index).getNodeValue());
    if (children.item(index).getNodeType() == Node.TEXT_NODE)
    node.removeChild(children.item(index));
    }else{
    int l= 0; // do not do any thing if the current node rvsn is different from the rvsn of the DOM
    // programme logic could enter this part when ther are multiple revisions of the NODe in the DOM,
    // and we are traversing through the previous versions of it.
    } else{
    System.out.println(" node has no Attribute(rvsn) ");
    // the node has no rvsn attribute.
    // it is the initial version of the dom.
    // add the rvsn from the DOM to this NODE for the first time.
    ((Element) node).setAttribute("rvsn", (new Integer(rvsn)).toString() );
    // get parent node and add a new child node with the same name as current node.
    // so parent node will have the previous node with a rvsn and a new node without the rvsn !!
    tempNodeName = node.getNodeName();
    tempParentNode = node.getParentNode();
    tempParentNodeName = tempParentNode.getNodeName();
    System.out.println(" adding node: " + tempNodeName + " to : " + tempParentNodeName);
    node = addNode(tempParentNode, tempNodeName, "");
    getNodeName(node); // print the name of the node after modifying it !!!
    printSiblings(node);
    //System.out.println(" After adding the node : " + getNodeName(node));
    } else if (_debug) {
    System.out.println("7. Node name exist in the Hash but has no children to be removed..!!:: @saveNodeDetails ");
    if (_debug) System.out.println("7B. Update the dom from the hash value " + nodeName + ", " + reqParams.get(nodeName).toString());
    node.appendChild(document.createTextNode(reqParams.get(nodeName).toString()));
    if (node != null) {
    if ( ( (Element) node).hasAttribute("rvw"))
    ( (Element) node).removeAttribute("rvw");
    if ( ( (Element) node).hasAttribute("msg"))
    ( (Element) node).removeAttribute("msg");
    if ( ( (Element) node).hasAttribute("dor"))
    ( (Element) node).removeAttribute("dor");
    }// end of if (type == Node.ELEMENT_NODE)
    NodeList children = node.getChildNodes();
    if (children != null) {
    for (int i = 0; i < children.getLength(); i++) {
    saveNodeDetails(children.item(i));
         } // end of saveNodeDetails method
    public Node addNode(Node parentNode, String nodeName, String value){
    Node newNode = null;
    try{
    newNode = parentNode.appendChild( document.createElement(nodeName) );
    newNode.appendChild( document.createTextNode( value ) );
    }catch(Exception Ex){
    System.out.println("2. Exception@addNode@ContainerDoc = " + Ex);
    return newNode ;
    } // end of addNode method

  • Business Management Error: You are attempting to create a user with a domain logon that does not exist. Select another domain logon and try again.

    Hello,
    Suddenly the working CRM is being stopped for some group of users.
    I drilled down to the issue and have checked that the users from Domain in which CRM is installed are having CRM access.
    But for other domain user having problem to access CRM.
    I tried to add a user from a domain which is not of CRM domain then it gives following error.
    "Business Management Error: You are attempting to create a user with a domain logon that does not exist. Select another domain logon and try again.
    <Message>LookupAccountNameW failed with error</Message> "
    The change is made - AD group have upgraded Activer Directory server to 2012 R2
    Please help as the Production CRM is not working for other domain user.

    We have Activer Directory Structure like below.
    One Root Domain says A
    and there are multiple child domain like B,C,D etc...
    B,C and D are all in same level,they are child of A domain.
    There are two way transitive trusts between A and all the child Domain.
    But there is no trust in between B and C and so on.
    Our CRM server is in B domain and B domain's user can access CRM but users of Domain C,D and so on can not access CRM.
    If this post answers your question, please click &quot;Mark As Answer&quot; on the post and &quot;Mark as Helpful&quot;

  • XPath in receiver determination: Check content of elements that exist 0..n

    Hi all,
    I have a simple requirement in a receiver determination. In the structure of the XML message, there is a node "STATUS" with an element STATUS_CODE. This STATUS node can appear 0 or  9999 times.
    I want to check if there is ANY STATUS with STATUS_CODE = "0", and if so, the message should be sent to a certain receiver. How to to that?
    Will that be the solution: (//STATUS/STATUS_CODE = 0)?
    Thanks,
    CHRIS

    > So it seems to me that the operator != can't be used to check a 1...n element? What might be the reason for this?
    I am not sure how != works, it is not documented well.
    I suppose NE means: does not exist.
    So if any node STATUS_CODE with value 1 exists, then the result is false.
    If you want an existence check if this, you should apply this:
    //STATUS [STATUS_CODE != "1"]  EX
    See also:
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/ab/13bf7191e73a4fb3560e767a2525fd/frameset.htm
    (scroll to the bottom)
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

Maybe you are looking for