How to add a new node into existing XML Document

I have a very simple question. I use XML as input argument for PL/SQL procedure that inserts data into the corresponding table. All I have to do is to add a new tag for Primary Key column and put sequence.NEXTVAL - value into it.
<ROWSET>
<ROW>
-- Add <ID_table_name> value </ID_table_name> ??????
<FIELD1>data1</FIELD1>
<FIELD2>data1</FIELD2>
</ROW>
</ROWSET>
I've parsed XML, but I couldn't find the way how to insert the new NODE.
If you know how to use packages XMLDOM, XMLParser for this purpose, please help me!
Oracle version 8.1.7

DOMParser parser=new DOMParser();
XMLDocument xmlDocument=parser.getdocument();
Node node=xmlDocument.selectSingleNode("/ROWSET/ROW");
Element element=xmlDocument.createElement(String tagName)
node.appendChild(element);

Similar Messages

  • How I can append new node in existing  XML file

    I've just begun learning DOM XML , so I'm currently at a very beginner level.
    I have an existing XML file that I would like to add an additional node to before saving it to another variable.
    how I can append new node in this file.
    now this code is overwrite new data over old data
    The code looks like this:
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerFactoryConfigurationError;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Attr;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    public class VerbXMLWriter
        static String EVerb3;
        static String englishTranslate3;
        public void VerbXMLWriter(String EVerb, String englishTranslate )
             EVerb3 = EVerb;
             englishTranslate3=englishTranslate;
        File xmlFile = new File("VerbDB.xml");
        DocumentBuilderFactory factory =  DocumentBuilderFactory.newInstance();
        try
         DocumentBuilder builder = factory.newDocumentBuilder();
         Document document = builder.newDocument();
        Element root = document.createElement("Verb");
         document.appendChild(root);
         Element verb = document.createElement(EVerb3);
         verb.setAttribute("EnglishTranslate",englishTranslate3);
         root.appendChild(verb);
         Source xmlSource = new DOMSource( document );
         Result result = new StreamResult( new FileOutputStream(xmlFile) );
        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        Transformer transformer =
        transformerFactory.newTransformer();
        transformer.setOutputProperty( "indent", "yes" );
         transformer.transform( xmlSource, result );
      catch(TransformerFactoryConfigurationError factoryError )
        factoryError.printStackTrace();
       catch (ParserConfigurationException pc)
           pc.printStackTrace();
       catch (IOException io)
          io.printStackTrace();
       catch(Exception excep )
           excep.printStackTrace();
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <Verb>
    <Play EnglishTranslate="playing" />
    </Verb>Edited by: itb402 on Mar 9, 2008 6:05 AM

    in your code you are already appending new nodes to the root node. so what exactly is your problem? The following steps are usually taken for appending a new node:
    1. Read the XML document
    2. Build a DOM tree
    3. Navigate to the node under which you want to insert the new node
    4. Create a new node.
    5. Insert the new node to the node selected in point #3.
    ~Debopam

  • SQL Server Distributed Partitioning Views how to add a new node online

    We are using distributed partitioning views in SQL Server 2012 Enterprise Edition for scaling out our data across more than one servers. Now we faced to question how to add a new node (server) into the scale outed db servers system without sending the servers
    down, so our users will be able to use them during the process as well.
    For example we have 4 servers with scaled out data. When we add the new empty server, the CHECKINGs for the partitioning columns should be reorganized. But during the process the partitioning views are not working.
    The High Availability, Always On or Failover Cluster approaches seem are not resolve the problems.
    So my question is how to add new node online?
    KH

    Thank you Erland for the reply.
    Yes, it's sounds as possible solution but has some not resolvable nuance in it. Let's say we copied some data from Node5 to new added Node6. Let's assume in Node5 we had data in Table1 with partitioning column's values 100,101,102,103,104,105,106.  Now
    we want to copy part of the rows with partitioning column's values 103,104,105,106 from Node5.Table1 into Node6.Table1. With this Node5 will contain less data and will work more quickly (less IO, less CPU usage etc), and the rest data will be contained on
    Node6. But because of Node5 is already in use, the Node5.Table1 contains CHECK CONSTRAINT = ParttionColumn should be from 100 up to 106. This is check for Node5. The Distributed Partitioning Views are already using the CHECKs to identify what server should
    be used to get data from.
    Now when we copied part of the Node5.Table1 rows to Node6.Table1 the views are still using the 103-106 rows from Node5.Table1 because the CHECK points there. Then we include the newest Node6.Table1 in the distributed partitioning views. OK, but we should
    set some CHECK on new Node6.Table1 which will be used by views. We can't set intersecting checking like Node5 has CHECK 100-106 and Node6 has CHECK 103-106. We also can't edit Node5 check and set it 100-102 untill the data will be removed in it. But this means
    that the data will not be available during the execution. 
    So, any ideas ?
    KH

  • JTree: HOW TO add a new node

    Hi everybody,
    Im going to try to be clear...
    My problem is the following: I am a beginner using JTree and what I want to do is to add a new node in a certain position in my JTree. I would be very grateful if apart from explanation, any of you could provide me with a piece of code.
    Let us think that my tree has the root and some first-level children called group 1, ..., group n. Every group has some children called rulemodule 1, ..., rulemodule m. And every rulemodule has some children called rule 1, ..., rule j.
    An example of the visual look of my jtree:
    root
    __ group 1
    ____ rulemodule 1.1
    ______ rule 1.1.1
    ____ rulemodule 1.2
    ______ rule 1.2.1
    ______ rule 1.2.2
    ______ rule 1.2.3
    __ group 2
    ____ rulemodule 2.1
    ______ rule 2.1.1
    ____ rulemodule 2.2
    ______ rule 2.2.1
    Then, let us say that what I want is to add a new rule in the position where it is in this moment rule 1.2.2 (so the rule that was 1.2.2 before would be now 1.2.3, and the one that was 1.2.3 would be now 1.2.4). So I know the name of the group, the name of the rulemodule and the position of the new rule. How could I do that?
    In order to build the JTree I have the following statements:
    TreeNode treeNode = fillTheTree(ruleModulePart.config.getRuleModules()); This function actually builds the tree.
    jTreeModel = new DefaultTreeModel(treeNode);
    jTree = new JTree(jTreeModel);
    Thanks a lot to everybody!
    Fran.

    Thanks a lot for your answer Maxideon,
    Well, I think that I did not explained it the problem very well...
    The example of the tree was just that, an example, but the tree does not look like that. I just wanted to show that the tree has 3 levels of depth.
    The declaration of the function would actually be like that:
    public void UpdateJTreeWithNewRule (String groupName, String ruleModuleName, String newRuleName, int positionOfNewRule) {
    }So I think that I would need to do first a search to find the position of the "group" which corresponds to that 'groupName' and after that the position of the "rulemodule" which corresponds to that 'ruleModuleName'. And then add the 'newRuleName' in the position 'positionOfNewRule' inside that "rulemodule".
    Thanks a lot again,
    Fran.

  • How to add a new system in existing 3 system lanscape in stms

    Hi,
    we have 3 system in our STMS i.e Dev->Qua->Prod. now we have install one more quality system for business requirement and add the same saystem in stms.
    now my query is that how we can add this new system in existing transport route so that transport request can be added automatically to import queue of both quality system once released from development system.

    Hi Nadar,
    It is possible, But not recommended. Better if you have solution like...
    DEV-->QAS1-->QAS2-->PRD
    But it is possible by using transport groups. There are lots of posts aleady regarding this.
    Basis Stms Configuration Notes
    http://sap.ittoolbox.com/groups/technical-functional/sap-basis/4-system-landscape-stms-2712918
    4-system landscape
    STMS config for dual prod (w/ auto synch)
    Thanks
    Asad

  • How to add a new filter in existing BIWS (WEBI) for dashboard consumption

    Hello Experts, we have 7 web service query's connected to a dashboard. Basically it is one WSDL URL and 7 Get Methods...Web service queries are BIWS (via WEBI document instance). There are filters setup for each of these web service methods.
    Recently there was a request to add 2 new fields to the webi document and also the 2 fields need to be included as filters in the 7 methods. I know there is an option to edit the method, but when i edit the method, i cannot find the 2 new fields in list to set as filters.Can anybody help me understand how to add filters to an existiing web service method? I do not want to delete the method and republish the block as web service.
    Any help will be great and points rewarded.
    Thank you
    Ann

    Hi Ann,
    You can create a new WebServices or modify the document block on which the webservices is published.
    Once the block is modified you might be able to see the new objects in the filters.
    Thanks,
    Amit

  • How to add a new value into message choice ?

    Dear all,
    I have a messageChoice component in my OAF page and I binding it with my VO (the VO is based on my query SQL in controller, NOT based on EO).
    For example, the query result of VO is as following:
    columnName, columnValue
    a, 1
    b, 2
    c, 3
    And I binding them into my messageChoice component as following:
    myChoice.setPickListViewUsageName("myVO1");
    myChoice.setListDisplayAttribute("columnName");
    myChoice.setListValueAttribute("columnValue");
    myChoice.setPickListCacheEnabled(false);
    Now I want to add a new combination into te messageChoice component, such as 'd, 4'.
    So I write it like this:
    myChoice.addOption("d", "4");
    But it doesn't work. The result of choice is still the same as before.
    So I think maybe I can use myVO1.createRow() method, but when I run my page, it raise an error message: "myVO1 is read only" :(
    Should I have to add a "UNION" in my query SQL of VO for this requirement?
    Any other ideas, please?
    Thanks.
    Kenny

    If you know the values to be added in advance, then its a better option to put them in VO itself with union clause and it has a better performance compared to runtime modification to VO.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                       

  • Create a new Node in existing xml file using CL_IXML

    Friends i have to create a new node on existing file of xml. using CL_IXML class methods Append child .

    Hi,
       searching information of XML I find your post.
       Post my code source that I have (at the moment) but if you think something that changed , tell me please.
    TYPE-POOLS: ixml.
    * macros
    DEFINE write_xml.
      write: / 'XML:', &1 color col_positive inverse.
    END-OF-DEFINITION.
      TYPES: BEGIN OF xml_line,
              data(256) TYPE x,
             END OF xml_line.
    data: nom_archivo(50) TYPE c,
    g_arch_enviar(128) TYPE c.
    CONSTANTS: ENCODING(5) VALUE 'UTF-8'.
      DATA: l_ixml            TYPE REF TO if_ixml,
            l_streamfactory   TYPE REF TO if_ixml_stream_factory,
            l_parser type ref to if_ixml_parser,"""
            l_istream type ref to if_ixml_istream,"""
            l_ostream         TYPE REF TO if_ixml_ostream,
            l_renderer        TYPE REF TO if_ixml_renderer,
            l_document        TYPE REF TO if_ixml_document,
            l_node type ref to if_ixml_node,"""
            l_encoding type ref to if_ixml_encoding."""
      DATA: l_value                        TYPE string,"""""""""añado data
            l_var_xmldata type string,"""
            l_var_xmldata2 type string,"""
            l_var_xmldata3 type string,"""
            l_var_xmldata4 type string,"""
            l_var_cstr type xstring,"""
            l_var_ret type i,"""
            l_var_dsn type string."""
      DATA: l_xml_table       TYPE TABLE OF xml_line,
            l_xml_size        TYPE i,
            l_rc              TYPE i.
    *l_var_xmldata = '<?xml version="1.0" encoding="utf-8"?><C dr="ñ" "></C>'.
    l_var_xmldata2 = '<?xml version="1.0" encoding="utf-8"?>'.
    l_var_xmldata3 = '<elementFormDefault="qualified"'.
    l_var_xmldata4 = 'attributeFormDefault="unqualified""></C>'.
    *CONCATENATE l_var_xmldata2 '<elementFormDefault="qualified" "></C>' INTO l_var_xmldata.
    CONCATENATE l_var_xmldata2 l_var_xmldata3 l_var_xmldata4 INTO l_var_xmldata.
    nom_archivo = 'utf8.xml'.
    * Text-001 Ruta de unix a donde enviara el Archivo.
    CONCATENATE '/tmp/' nom_archivo INTO g_arch_enviar.
    CLASS cl_ixml DEFINITION LOAD.
      TYPES: c_line(50)    TYPE c.
    DATA:         xmltab        TYPE STANDARD TABLE OF c_line,
             node      TYPE REF TO if_ixml_node,
             xml_line       TYPE c_line,
             charset       TYPE string,
             success       TYPE c.
    DATA: BEGIN OF elemento1 occurs 0,
       name(30) VALUE 'Header',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento1.
    DATA: BEGIN OF elemento2 occurs 0,
       name(30) VALUE 'MasterFiles',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2.
    DATA: BEGIN OF elemento3 occurs 0,
       name(30) VALUE 'GeneralLedgerEntries',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3.
    DATA: BEGIN OF elemento4 occurs 0,
       name(30) VALUE 'SourceDocuments',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4.
    DATA: BEGIN OF elemento1A occurs 0,
       name(30) VALUE 'AuditFileVersion',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento1A.
    DATA: BEGIN OF elemento1B occurs 0,
       name(30) VALUE 'CompanyID',
       elemento1B1(30) VALUE 'ele1B1'.
    DATA END OF elemento1B.
    DATA: BEGIN OF elemento1C occurs 0,
       name(30) VALUE 'TaxRegistrationNumber',
       elemento1C1(30) VALUE 'ele1C1'.
    DATA END OF elemento1C.
    DATA: BEGIN OF elemento1D occurs 0,
       name(30) VALUE 'TaxAccountingBasis',
       elemento1D1(30) VALUE 'ele1D1'.
    DATA END OF elemento1D.
    DATA: BEGIN OF elemento1E occurs 0,
       name(30) VALUE 'CompanyName',
       elemento1E1(30) VALUE 'ele1E1'.
    DATA END OF elemento1E.
    DATA: BEGIN OF elemento1F occurs 0,
       name(30) VALUE 'CompanyAddress',
       elemento1F1(30) VALUE 'ele1F1'.
    DATA END OF elemento1F.
    DATA: BEGIN OF elemento1G occurs 0,
       name(30) VALUE 'FiscalYear',
       elemento1G1(30) VALUE 'ele1G1'.
    DATA END OF elemento1G.
    DATA: BEGIN OF elemento1H occurs 0,
       name(30) VALUE 'StartDate',
       elemento1H1(30) VALUE 'ele1H1'.
    DATA END OF elemento1H.
    DATA: BEGIN OF elemento1I occurs 0,
       name(30) VALUE 'EndDate',
       elemento1I1(30) VALUE 'ele1I1'.
    DATA END OF elemento1I.
    DATA: BEGIN OF elemento1J occurs 0,
       name(30) VALUE 'CurrencyCode',
       elemento1J1(30) VALUE 'ele1J1'.
    DATA END OF elemento1J.
    DATA: BEGIN OF elemento1K occurs 0,
       name(30) VALUE 'DateCreated',
       elemento1K1(30) VALUE 'ele1K1'.
    DATA END OF elemento1K.
    DATA: BEGIN OF elemento1L occurs 0,
       name(30) VALUE 'ProductID',
       elemento1L1(30) VALUE 'ele1L1'.
    DATA END OF elemento1L.
    DATA: BEGIN OF elemento1M occurs 0,
       name(30) VALUE 'ProductVersion',
       elemento1M1(30) VALUE 'ele1M1'.
    DATA END OF elemento1M.
    DATA: BEGIN OF elemento1N occurs 0,
       name(30) VALUE 'Telephone',
       elemento1N1(30) VALUE 'ele1N1'.
    DATA END OF elemento1N.
    DATA: BEGIN OF elemento1O occurs 0,
       name(30) VALUE 'Fax',
       elemento1O1(30) VALUE 'ele1O1'.
    DATA END OF elemento1O.
    DATA: BEGIN OF elemento1P occurs 0,
       name(30) VALUE 'Email',
       elemento1P1(30) VALUE 'ele1P1'.
    DATA END OF elemento1P.
    DATA: BEGIN OF elemento1Q occurs 0,
       name(30) VALUE 'WebSite',
       elemento1Q1(30) VALUE 'ele1Q1'.
    DATA END OF elemento1Q.
    DATA: BEGIN OF elemento1R occurs 0,
       name(30) VALUE 'HeaderComment',
       elemento1R1(30) VALUE 'ele1R1'.
    DATA END OF elemento1R.
    DATA: BEGIN OF elemento2A occurs 0,
       name(30) VALUE 'GeneralLedger',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2A.
    DATA: BEGIN OF elemento2B occurs 0,
       name(30) VALUE 'Customer',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B.
    DATA: BEGIN OF elemento2C occurs 0,
       name(30) VALUE 'Supplier',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C.
    DATA: BEGIN OF elemento2D occurs 0,
       name(30) VALUE 'Product',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2D.
    DATA: BEGIN OF elemento2E occurs 0,
       name(30) VALUE 'TaxTable',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E.
    DATA: BEGIN OF elemento2A1 occurs 0,
       name(30) VALUE 'AccountID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2A1.
    DATA: BEGIN OF elemento2A2 occurs 0,
       name(30) VALUE 'AccountDescription',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2A2.
    DATA: BEGIN OF elemento2B1 occurs 0,
       name(30) VALUE 'CustomerID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B1.
    DATA: BEGIN OF elemento2B2 occurs 0,
       name(30) VALUE 'CustomerTaxID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B2.
    DATA BEGIN OF elemento2B3 occurs 0.
    INCLUDE STRUCTURE elemento1E.
    *   name(30) VALUE 'CompanyName',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B3.
    DATA: BEGIN OF elemento2B4 occurs 0,
       name(30) VALUE 'Contact',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B4.
    DATA: BEGIN OF elemento2B5 occurs 0,
       name(30) VALUE 'BillingAddress',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B5.
    DATA: BEGIN OF elemento2B6 occurs 0,
       name(30) VALUE 'ShipToAddress',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B6.
    DATA: BEGIN OF elemento2B7 occurs 0.
    INCLUDE STRUCTURE elemento1N.
    *   name(30) VALUE 'Telephone',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B7.
    DATA: BEGIN OF elemento2B8 occurs 0.
    INCLUDE STRUCTURE elemento1O.
    *   name(30) VALUE 'Fax',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B8.
    DATA: BEGIN OF elemento2B9 occurs 0.
    INCLUDE STRUCTURE elemento1P.
    *   name(30) VALUE 'Email',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B9.
    DATA: BEGIN OF elemento2B10 occurs 0.
    INCLUDE STRUCTURE elemento1Q.
    *   name(30) VALUE 'Website',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2B10.
    DATA: BEGIN OF elemento2C1 occurs 0,
       name(30) VALUE 'SupplierID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C1.
    DATA: BEGIN OF elemento2C2 occurs 0,
       name(30) VALUE 'SupplierTaxID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C2.
    DATA: BEGIN OF elemento2C3 occurs 0.
    INCLUDE STRUCTURE elemento1E.
    *   name(30) VALUE 'CompanyName',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C3.
    DATA: BEGIN OF elemento2C4 occurs 0.
    INCLUDE STRUCTURE elemento2B4.
    *   name(30) VALUE 'Contact',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C4.
    DATA: BEGIN OF elemento2C5 occurs 0.
    INCLUDE STRUCTURE elemento2B5.
    *   name(30) VALUE 'BillingAddress',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C5.
    DATA: BEGIN OF elemento2C6 occurs 0.
    INCLUDE STRUCTURE elemento2B6.
    *   name(30) VALUE 'ShipToAddress',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C6.
    DATA: BEGIN OF elemento2C7 occurs 0.
    INCLUDE STRUCTURE elemento1N.
    *   name(30) VALUE 'Telephone',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C7.
    DATA: BEGIN OF elemento2C8 occurs 0.
    INCLUDE STRUCTURE elemento1O.
    *   name(30) VALUE 'Fax',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C8.
    DATA: BEGIN OF elemento2C9 occurs 0.
    INCLUDE STRUCTURE elemento1P.
    *   name(30) VALUE 'Email',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C9.
    DATA: BEGIN OF elemento2C10 occurs 0.
    INCLUDE STRUCTURE elemento1Q.
    *   name(30) VALUE 'Website',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2C10.
    DATA: BEGIN OF elemento2D1 occurs 0,
       name(30) VALUE 'ProductType',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2D1.
    DATA: BEGIN OF elemento2D2 occurs 0,
       name(30) VALUE 'ProductCode',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2D2.
    DATA: BEGIN OF elemento2D3 occurs 0,
       name(30) VALUE 'ProductGroup',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2D3.
    DATA: BEGIN OF elemento2D4 occurs 0,
       name(30) VALUE 'ProductDescription',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2D4.
    DATA: BEGIN OF elemento2D5 occurs 0,
       name(30) VALUE 'ProductNumberCode',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2D5.
    DATA: BEGIN OF elemento2E1 occurs 0,
       name(30) VALUE 'TaxType',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E1.
    DATA: BEGIN OF elemento2E1A occurs 0,
       name(30) VALUE 'Description',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E1A.
    DATA: BEGIN OF elemento2E1B occurs 0,
       name(30) VALUE 'TaxCodeDetails',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E1B.
    DATA: BEGIN OF elemento2E1B1 occurs 0,
       name(30) VALUE 'TaxCode',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E1B1.
    DATA: BEGIN OF elemento2E1B2 occurs 0.
    INCLUDE STRUCTURE elemento2E1A.
    *   name(30) VALUE 'Description',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E1B2.
    DATA: BEGIN OF elemento2E1B3 occurs 0,
       name(30) VALUE 'TaxPercentage',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento2E1B3.
    DATA: BEGIN OF elemento3A occurs 0,
       name(30) VALUE 'NumberOfEntries',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3A.
    DATA: BEGIN OF elemento3B occurs 0,
       name(30) VALUE 'TotalDebit',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3B.
    DATA: BEGIN OF elemento3C occurs 0,
       name(30) VALUE 'TotalCredit',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3C.
    DATA: BEGIN OF elemento3D occurs 0,
       name(30) VALUE 'Journal',
       minOccurs(30) VALUE '0',
       maxOccurs(30) VALUE 'unbounded',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D.
    DATA: BEGIN OF elemento3D1 occurs 0,
       name(30) VALUE 'JournalID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D1.
    DATA: BEGIN OF elemento3D2 occurs 0.
    INCLUDE STRUCTURE elemento2E1A.
    *   name(30) VALUE 'Description',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D2.
    DATA: BEGIN OF elemento3D3 occurs 0,
       name(30) VALUE 'Transaction',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3.
    DATA: BEGIN OF elemento3D3A occurs 0,
       name(30) VALUE 'TransactionID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3A.
    DATA: BEGIN OF elemento3D3B occurs 0,
       name(30) VALUE 'Period',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3B.
    DATA: BEGIN OF elemento3D3C occurs 0,
       name(30) VALUE 'TransactionDate',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3C.
    DATA: BEGIN OF elemento3D3D occurs 0,
       name(30) VALUE 'SourceID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3D.
    DATA: BEGIN OF elemento3D3E occurs 0.
    INCLUDE STRUCTURE elemento2E1A.
    *   name(30) VALUE 'Description',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3E.
    DATA: BEGIN OF elemento3D3F occurs 0,
    *INCLUDE STRUCTURE elemento2B1.
       name(30) VALUE 'GLPostingDate',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3F.
    DATA: BEGIN OF elemento3D3G occurs 0.
    INCLUDE STRUCTURE elemento2B1.
    *   name(30) VALUE 'CustomerID',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3G.
    DATA: BEGIN OF elemento3D3H occurs 0,
       name(30) VALUE 'SupplierID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3H.
    DATA: BEGIN OF elemento3D3I occurs 0,
       name(30) VALUE 'Line',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I.
    DATA: BEGIN OF elemento3D3I1 occurs 0,
       name(30) VALUE 'RecordID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I1.
    DATA: BEGIN OF elemento3D3I2 occurs 0.
    INCLUDE STRUCTURE elemento2A1.
    *   name(30) VALUE 'AccountID',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I2.
    DATA: BEGIN OF elemento3D3I3 occurs 0,
       name(30) VALUE 'SourceDocumentID',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I3.
    DATA: BEGIN OF elemento3D3I4 occurs 0,
       name(30) VALUE 'SystemEntryDate',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I4.
    DATA: BEGIN OF elemento3D3I5 occurs 0.
    INCLUDE STRUCTURE elemento2E1A.
    *   name(30) VALUE 'Description',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I5.
    DATA: BEGIN OF elemento3D3I5A occurs 0,
       name(30) VALUE 'DebitAmount',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I5A.
    DATA: BEGIN OF elemento3D3I5B occurs 0,
       name(30) VALUE 'CreditAmount',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento3D3I5B.
    DATA: BEGIN OF elemento4A occurs 0,
       name(30) VALUE 'SalesInvoices',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A.
    DATA: BEGIN OF elemento4A1 occurs 0.
    INCLUDE STRUCTURE elemento3A.
    *   name(30) VALUE 'NumberOfEntries',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A1.
    DATA: BEGIN OF elemento4A2 occurs 0.
    INCLUDE STRUCTURE elemento3B.
    *   name(30) VALUE 'TotalDebit',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A2.
    DATA: BEGIN OF elemento4A3 occurs 0.
    INCLUDE STRUCTURE elemento3C.
    *   name(30) VALUE 'TotalCredit',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A3.
    DATA: BEGIN OF elemento4A4 occurs 0,
       name(30) VALUE 'Invoice',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4.
    DATA: BEGIN OF elemento4A4A occurs 0,
       name(30) VALUE 'InvoiceNo',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4A.
    DATA: BEGIN OF elemento4A4B occurs 0.
    INCLUDE STRUCTURE elemento3D3B.
    *   name(30) VALUE 'Period',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4B.
    DATA: BEGIN OF elemento4A4C occurs 0,
       name(30) VALUE 'InvoiceDate',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4C.
    DATA: BEGIN OF elemento4A4D occurs 0,
       name(30) VALUE 'InvoiceType',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4D.
    DATA: BEGIN OF elemento4A4E occurs 0.
    INCLUDE STRUCTURE elemento3D3I4.
    *   name(30) VALUE 'SystemEntryDate',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4E.
    DATA: BEGIN OF elemento4A4F occurs 0.
    INCLUDE STRUCTURE elemento3D3A.
    *   name(30) VALUE 'TransactionID',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4F.
    DATA: BEGIN OF elemento4A4G occurs 0.
    INCLUDE STRUCTURE elemento2B1.
    *   name(30) VALUE 'CustomerID',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4G.
    DATA: BEGIN OF elemento4A4H occurs 0,
       name(30) VALUE 'ShipTo',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4H.
    DATA: BEGIN OF elemento4A4I occurs 0,
       name(30) VALUE 'ShipFrom',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4I.
    DATA: BEGIN OF elemento4A4J occurs 0.
    INCLUDE STRUCTURE elemento3D3I.
    *   name(30) VALUE 'Line',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J.
    DATA: BEGIN OF elemento4A4K occurs 0,
       name(30) VALUE 'DocumentTotals',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K.
    DATA: BEGIN OF elemento4A4J1 occurs 0,
       name(30) VALUE 'LineNumber',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J1.
    DATA: BEGIN OF elemento4A4J2 occurs 0,
       name(30) VALUE 'OrderReferences',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J2.
    DATA: BEGIN OF elemento4A4J3 occurs 0,
       name(30) VALUE 'ProductCoder',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J3.
    DATA: BEGIN OF elemento4A4J4 occurs 0.
    INCLUDE STRUCTURE elemento2D4.
    *   name(30) VALUE 'ProductDescription',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J4.
    DATA: BEGIN OF elemento4A4J5 occurs 0,
       name(30) VALUE 'Quantity',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J5.
    DATA: BEGIN OF elemento4A4J6 occurs 0,
       name(30) VALUE 'UnitOfMeasure',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J6.
    DATA: BEGIN OF elemento4A4J7 occurs 0,
       name(30) VALUE 'UnitPrice',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J7.
    DATA: BEGIN OF elemento4A4J8 occurs 0,
       name(30) VALUE 'TaxPointDate',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J8.
    DATA: BEGIN OF elemento4A4J9 occurs 0,
       name(30) VALUE 'References',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J9.
    DATA: BEGIN OF elemento4A4J10 occurs 0.
    INCLUDE STRUCTURE elemento2E1A.
    *   name(30) VALUE 'Description',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J10.
    DATA: BEGIN OF elemento4A4J11 occurs 0.
    INCLUDE STRUCTURE elemento3D3I5A.
    *   name(30) VALUE 'DebitAmount',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J11.
    DATA: BEGIN OF elemento4A4J12 occurs 0.
    INCLUDE STRUCTURE elemento3D3I5B.
    *   name(30) VALUE 'CreditAmount',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J12.
    DATA: BEGIN OF elemento4A4J13 occurs 0,
       name(30) VALUE 'Tax',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J13.
    DATA: BEGIN OF elemento4A4J14 occurs 0,
       name(30) VALUE 'SettlementAmount',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J14.
    DATA: BEGIN OF elemento4A4J2A occurs 0,
       name(30) VALUE 'OriginatingON',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J2A.
    DATA: BEGIN OF elemento4A4J2B occurs 0,
       name(30) VALUE 'OrderDate',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J2B.
    DATA: BEGIN OF elemento4A4J9A occurs 0,
       name(30) VALUE 'CreditNote',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J9A.
    DATA: BEGIN OF elemento4A4J9A1 occurs 0,
       name(30) VALUE 'Reference',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J9A1.
    DATA: BEGIN OF elemento4A4J9A2 occurs 0,
       name(30) VALUE 'Reason',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4J9A2.
    DATA: BEGIN OF elemento4A4K1 occurs 0,
       name(30) VALUE 'TaxPayable',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K1.
    DATA: BEGIN OF elemento4A4K2 occurs 0,
       name(30) VALUE 'NetTotal',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K2.
    DATA: BEGIN OF elemento4A4K3 occurs 0,
       name(30) VALUE 'GrossTotal',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K3.
    DATA: BEGIN OF elemento4A4K4 occurs 0,
       name(30) VALUE 'Currency',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K4.
    DATA: BEGIN OF elemento4A4K5 occurs 0,
       name(30) VALUE 'Settlement',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K5.
    DATA: BEGIN OF elemento4A4K4A occurs 0.
    INCLUDE STRUCTURE elemento1J.
    *   name(30) VALUE 'CurrencyCode',
    *   elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K4A.
    DATA: BEGIN OF elemento4A4K4A1 occurs 0,
       name(30) VALUE 'CurrencyDebitAmount',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K4A1.
    DATA: BEGIN OF elemento4A4K4A2 occurs 0,
       name(30) VALUE 'CurrencyCreditAmount',
       elemento1A1(30) VALUE 'ele1A1'.
    DATA END OF elemento4A4K4A2.
    START-OF-SELECTION.
    *       Creating a ixml factory
            l_ixml = cl_ixml=>create( ).
    * Create factory object for data streams
    l_streamfactory = l_ixml->create_stream_factory( ).
    * Create object for input stream
    l_istream = l_streamfactory->create_istream_string( string =
    l_var_xmldata ).
    *       Creating the dom object model
            l_document = l_ixml->create_document( ).
    * Create parser
    l_parser = l_ixml->create_parser( document = l_document
    stream_factory = l_streamfactory
    istream = l_istream ).
    * create dom tree by parsing
    if l_parser->parse( ) <> 0.
    data: j(2).
    j = '9'.
    * do exception handling here
    * return.
    endif.
    *create output objetct
    * create a output stream
      l_ostream = l_streamfactory->create_ostream_itable( table = xmltab ).
      charset = 'SAP*'.
      IF NOT charset IS INITIAL.
    *   set an document encoding (optional)
        l_encoding = l_ixml->create_encoding( character_set = charset
                                          byte_order = 0 ).
        success  = l_ostream->set_encoding( encoding = l_encoding ).
      ENDIF.
    l_renderer =
    l_ixml->create_renderer( document = l_document
    ostream = l_ostream ).
      IF l_renderer->render( ) <> 0.
        WRITE: / 'ERROR: document rendering'.
        EXIT.
      ENDIF.
    call method l_ostream->close( ).
    *Writing string to file
    open dataset g_arch_enviar FOR OUTPUT in binary mode.
    transfer l_var_cstr to g_arch_enviar.
    close dataset g_arch_enviar.
    *       Fill root node with value AuditFile
    DATA: l_element_AuditFile TYPE REF TO if_ixml_element.
            l_element_AuditFile  = l_document->create_simple_element(
                        name = 'AuditFile'
                        parent = l_document ).
    DATA: CONCA TYPE STRING.
    DATA: elemento type string.
    elemento = elemento1-name.
    DATA: l_element_Header TYPE REF TO if_ixml_element.
            l_element_Header  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_AuditFile ).
    elemento = elemento1A-name.
    DATA: l_element_AuditFileVersion TYPE REF TO if_ixml_element.
            l_element_AuditFileVersion  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1B-name.
    DATA: l_element_CompanyID TYPE REF TO if_ixml_element.
            l_element_CompanyID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    *The name "L_ELEMENT_TAXREGISTRATIONNUMBER" is longer than the allowed          
    *30 characters.          
    *elemento = elemento1C-name.
    *DATA: l_element_TaxRegistrationNumber TYPE REF TO if_ixml_element.
    *        l_element_TaxRegistrationNumber  = l_document->create_simple_element(
    *                    name = elemento
    *                    parent = l_element_Header ).
    elemento = elemento1D-name.
    DATA: l_element_TaxAccountingBasis TYPE REF TO if_ixml_element.
            l_element_TaxAccountingBasis  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1E-name.
    DATA: l_element_CompanyName TYPE REF TO if_ixml_element.
            l_element_CompanyName  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1F-name.
    DATA: l_element_CompanyAddress TYPE REF TO if_ixml_element.
            l_element_CompanyAddress  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1G-name.
    DATA: l_element_FiscalYear TYPE REF TO if_ixml_element.
            l_element_FiscalYear  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1H-name.
    DATA: l_element_StartDate TYPE REF TO if_ixml_element.
            l_element_StartDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1I-name.
    DATA: l_element_EndDate TYPE REF TO if_ixml_element.
            l_element_EndDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1J-name.
    DATA: l_element_CurrencyCode TYPE REF TO if_ixml_element.
            l_element_CurrencyCode  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1K-name.
    DATA: l_element_DateCreated TYPE REF TO if_ixml_element.
            l_element_DateCreated  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1L-name.
    DATA: l_element_ProductID TYPE REF TO if_ixml_element.
            l_element_ProductID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1M-name.
    DATA: l_element_ProductVersion TYPE REF TO if_ixml_element.
            l_element_ProductVersion  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1N-name.
    DATA: l_element_Telephone TYPE REF TO if_ixml_element.
            l_element_Telephone  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1O-name.
    DATA: l_element_Fax TYPE REF TO if_ixml_element.
            l_element_Fax  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1P-name.
    DATA: l_element_Email TYPE REF TO if_ixml_element.
            l_element_Email  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1Q-name.
    DATA: l_element_WebSite TYPE REF TO if_ixml_element.
            l_element_WebSite  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento1R-name.
    DATA: l_element_HeaderComment TYPE REF TO if_ixml_element.
            l_element_HeaderComment  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Header ).
    elemento = elemento2-name.
    DATA: l_element_MasterFiles TYPE REF TO if_ixml_element.
            l_element_MasterFiles  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_AuditFile ).
    elemento = elemento2A-name.
    DATA: l_element_GeneralLedger TYPE REF TO if_ixml_element.
            l_element_GeneralLedger  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_MasterFiles ).
    elemento = elemento2B-name.
    DATA: l_element_Customer TYPE REF TO if_ixml_element.
            l_element_Customer  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_MasterFiles ).
    elemento = elemento2C-name.
    DATA: l_element_Supplier TYPE REF TO if_ixml_element.
            l_element_Supplier  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_MasterFiles ).
    elemento = elemento2D-name.
    DATA: l_element_Product TYPE REF TO if_ixml_element.
            l_element_Product  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_MasterFiles ).
    elemento = elemento2E-name.
    DATA: l_element_TaxTable TYPE REF TO if_ixml_element.
            l_element_TaxTable  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_MasterFiles ).
    elemento = elemento2A1-name.
    DATA: l_element_AccountID TYPE REF TO if_ixml_element.
            l_element_AccountID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_GeneralLedger ).
    elemento = elemento2A2-name.
    DATA: l_element_AccountDescription TYPE REF TO if_ixml_element.
            l_element_AccountDescription  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_GeneralLedger ).
    elemento = elemento2B1-name.
    DATA: l_element_CustomerID TYPE REF TO if_ixml_element.
            l_element_CustomerID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    elemento = elemento2B2-name.
    DATA: l_element_CustomerTaxID TYPE REF TO if_ixml_element.
            l_element_CustomerTaxID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    *elemento = elemento2B3-name.
    elemento = elemento1E-name.
    *DATA: l_element_CompanyName TYPE REF TO if_ixml_element.
            l_element_CompanyName  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    elemento = elemento2B4-name.
    DATA: l_element_Contact TYPE REF TO if_ixml_element.
            l_element_Contact  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    elemento = elemento2B5-name.
    DATA: l_element_BillingAddress TYPE REF TO if_ixml_element.
            l_element_BillingAddress  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    elemento = elemento2B6-name.
    DATA: l_element_ShipToAddress TYPE REF TO if_ixml_element.
            l_element_ShipToAddress  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    *elemento = elemento2B7-name.
    elemento = elemento1N-name.
    *DATA: l_element_Telephone TYPE REF TO if_ixml_element.
            l_element_Telephone  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    *elemento = elemento2B8-name.
    elemento = elemento1O-name.
    *DATA: l_element_Fax TYPE REF TO if_ixml_element.
            l_element_Fax  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    *elemento = elemento2B9-name.
    elemento = elemento1P-name.
    *DATA: l_element_Email TYPE REF TO if_ixml_element.
            l_element_Email  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    *elemento = elemento2B10-name.
    elemento = elemento1Q-name.
    *DATA: l_element_Website TYPE REF TO if_ixml_element.
            l_element_Website  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Customer ).
    elemento = elemento2C1-name.
    DATA: l_element_SupplierID TYPE REF TO if_ixml_element.
            l_element_SupplierID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento2C2-name.
    DATA: l_element_SupplierTaxID TYPE REF TO if_ixml_element.
            l_element_SupplierTaxID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento1E-name.
    *DATA: l_element_CompanyName TYPE REF TO if_ixml_element.
            l_element_CompanyName  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento2B4-name.
    *DATA: l_element_Contact TYPE REF TO if_ixml_element.
            l_element_Contact  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento2B5-name.
    *DATA: l_element_BillingAddress TYPE REF TO if_ixml_element.
            l_element_BillingAddress  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento2B6-name.
    *DATA: l_element_ShipToAddress TYPE REF TO if_ixml_element.
            l_element_ShipToAddress  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento1N-name.
    *DATA: l_element_Telephone TYPE REF TO if_ixml_element.
            l_element_Telephone  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento1O-name.
    *DATA: l_element_Fax TYPE REF TO if_ixml_element.
            l_element_Fax  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento1P-name.
    *DATA: l_element_Email TYPE REF TO if_ixml_element.
            l_element_Email  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento1Q-name.
    *DATA: l_element_Website TYPE REF TO if_ixml_element.
            l_element_Website  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Supplier ).
    elemento = elemento2D1-name.
    DATA: l_element_ProductType TYPE REF TO if_ixml_element.
            l_element_ProductType  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Product ).
    elemento = elemento2D2-name.
    DATA: l_element_ProductCode TYPE REF TO if_ixml_element.
            l_element_ProductCode  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Product ).
    elemento = elemento2D3-name.
    DATA: l_element_ProductGroup TYPE REF TO if_ixml_element.
            l_element_ProductGroup  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Product ).
    elemento = elemento2D4-name.
    DATA: l_element_ProductDescription TYPE REF TO if_ixml_element.
            l_element_ProductDescription  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Product ).
    elemento = elemento2D5-name.
    DATA: l_element_ProductNumberCode TYPE REF TO if_ixml_element.
            l_element_ProductNumberCode  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Product ).
    elemento = elemento2E1-name.
    DATA: l_element_TaxType TYPE REF TO if_ixml_element.
            l_element_TaxType  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_TaxTable ).
    elemento = elemento2E1A-name.
    DATA: l_element_Description TYPE REF TO if_ixml_element.
            l_element_Description  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_TaxType ).
    elemento = elemento2E1B-name.
    DATA: l_element_TaxCodeDetails TYPE REF TO if_ixml_element.
            l_element_TaxCodeDetails  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_TaxType ).
    elemento = elemento2E1B1-name.
    DATA: l_element_TaxCode TYPE REF TO if_ixml_element.
            l_element_TaxCode  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_TaxCodeDetails ).
    elemento = elemento2E1A-name.
    *DATA: l_element_Description TYPE REF TO if_ixml_element.
            l_element_Description  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_TaxCodeDetails ).
    elemento = elemento2E1B3-name.
    DATA: l_element_TaxPercentage TYPE REF TO if_ixml_element.
            l_element_TaxPercentage  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_TaxCodeDetails ).
    elemento = elemento3-name.
    DATA: l_element_GeneralLedgerEntries TYPE REF TO if_ixml_element.
            l_element_GeneralLedgerEntries  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_AuditFile ).
    elemento = elemento3A-name.
    DATA: l_element_NumberOfEntries TYPE REF TO if_ixml_element.
            l_element_NumberOfEntries  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_GeneralLedgerEntries ).
    elemento = elemento3B-name.
    DATA: l_element_TotalDebit TYPE REF TO if_ixml_element.
            l_element_TotalDebit  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_GeneralLedgerEntries ).
    elemento = elemento3C-name.
    DATA: l_element_TotalCredit TYPE REF TO if_ixml_element.
            l_element_TotalCredit  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_GeneralLedgerEntries ).
    elemento = elemento3D-name.
    *****if elemento3D-minOccurs NE ''.
    *****   elemento1 = ' minOccurs = '.
    *****   elemento2 = elemento3D-minOccurs.
    *****   CONCATENATE elemento elemento1 elemento2 INTO elemento.
    *****endif.
    *data: eleref(30),
    *elemento.
    *eleref = 'ref = '.
    *CONCATENATE eleref elemento INTO elemento.
    DATA: l_element_Journal TYPE REF TO if_ixml_element.
            l_element_Journal  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_GeneralLedgerEntries ).
    elemento = elemento3D1-name.
    DATA: l_element_JournalID TYPE REF TO if_ixml_element.
            l_element_JournalID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Journal ).
    elemento = elemento2E1A-name.
    *DATA: l_element_Description TYPE REF TO if_ixml_element.
            l_element_Description  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Journal ).
    elemento = elemento3D3-name.
    DATA: l_element_Transaction TYPE REF TO if_ixml_element.
            l_element_Transaction  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Journal ).
    elemento = elemento3D3A-name.
    DATA: l_element_TransactionID TYPE REF TO if_ixml_element.
            l_element_TransactionID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento3D3B-name.
    DATA: l_element_Period TYPE REF TO if_ixml_element.
            l_element_Period  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento3D3C-name.
    DATA: l_element_TransactionDate TYPE REF TO if_ixml_element.
            l_element_TransactionDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento3D3D-name.
    DATA: l_element_SourceID TYPE REF TO if_ixml_element.
            l_element_SourceID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento2E1A-name.
    *DATA: l_element_Description TYPE REF TO if_ixml_element.
            l_element_Description  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento3D3F-name.
    DATA: l_element_GLPostingDate TYPE REF TO if_ixml_element.
            l_element_GLPostingDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento2B1-name.
    *DATA: l_element_CustomerID TYPE REF TO if_ixml_element.
            l_element_CustomerID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento2C1-name.
    *DATA: l_element_SupplierID TYPE REF TO if_ixml_element.
            l_element_SupplierID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento3D3I-name.
    DATA: l_element_Line TYPE REF TO if_ixml_element.
            l_element_Line  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Transaction ).
    elemento = elemento3D3I1-name.
    DATA: l_element_RecordID TYPE REF TO if_ixml_element.
            l_element_RecordID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento2A1-name.
    *DATA: l_element_AccountID TYPE REF TO if_ixml_element.
            l_element_AccountID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento3D3I3-name.
    DATA: l_element_SourceDocumentID TYPE REF TO if_ixml_element.
            l_element_SourceDocumentID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento3D3I4-name.
    DATA: l_element_SystemEntryDate TYPE REF TO if_ixml_element.
            l_element_SystemEntryDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento2E1A-name.
    *DATA: l_element_Description TYPE REF TO if_ixml_element.
            l_element_Description  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento3D3I5A-name.
    DATA: l_element_DebitAmount TYPE REF TO if_ixml_element.
            l_element_DebitAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Description ).
    elemento = elemento3D3I5B-name.
    DATA: l_element_CreditAmount TYPE REF TO if_ixml_element.
            l_element_CreditAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Description ).
    elemento = elemento4-name.
    DATA: l_element_SourceDocuments TYPE REF TO if_ixml_element.
            l_element_SourceDocuments  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_AuditFile ).
    elemento = elemento4A-name.
    DATA: l_element_SalesInvoices TYPE REF TO if_ixml_element.
            l_element_SalesInvoices  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_SourceDocuments ).
    elemento = elemento3A-name.
    *DATA: l_element_NumberOfEntries TYPE REF TO if_ixml_element.
            l_element_NumberOfEntries  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_SalesInvoices ).
    elemento = elemento3B-name.
    *DATA: l_element_TotalDebit TYPE REF TO if_ixml_element.
            l_element_TotalDebit  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_SalesInvoices ).
    elemento = elemento3C-name.
    *DATA: l_element_TotalCredit TYPE REF TO if_ixml_element.
            l_element_TotalCredit  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_SalesInvoices ).
    elemento = elemento4A4-name.
    DATA: l_element_Invoice TYPE REF TO if_ixml_element.
            l_element_Invoice  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_SalesInvoices ).
    elemento = elemento4A4A-name.
    DATA: l_element_InvoiceNo TYPE REF TO if_ixml_element.
            l_element_InvoiceNo  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento3D3B-name.
    *DATA: l_element_Period TYPE REF TO if_ixml_element.
            l_element_Period  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento4A4C-name.
    DATA: l_element_InvoiceDate TYPE REF TO if_ixml_element.
            l_element_InvoiceDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento4A4D-name.
    DATA: l_element_InvoiceType TYPE REF TO if_ixml_element.
            l_element_InvoiceType  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento3D3I4-name.
    *DATA: l_element_SystemEntryDate TYPE REF TO if_ixml_element.
            l_element_SystemEntryDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento3D3A-name.
    *DATA: l_element_TransactionID TYPE REF TO if_ixml_element.
            l_element_TransactionID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento2B1-name.
    *DATA: l_element_CustomerID TYPE REF TO if_ixml_element.
            l_element_CustomerID  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento4A4H-name.
    DATA: l_element_ShipTo TYPE REF TO if_ixml_element.
            l_element_ShipTo  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento4A4I-name.
    DATA: l_element_ShipFrom TYPE REF TO if_ixml_element.
            l_element_ShipFrom  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento3D3I-name.
    *DATA: l_element_Line TYPE REF TO if_ixml_element.
            l_element_Line  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento4A4K-name.
    DATA: l_element_DocumentTotals TYPE REF TO if_ixml_element.
            l_element_DocumentTotals  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Invoice ).
    elemento = elemento4A4J1-name.
    DATA: l_element_LineNumber TYPE REF TO if_ixml_element.
            l_element_LineNumber  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J2-name.
    DATA: l_element_OrderReferences TYPE REF TO if_ixml_element.
            l_element_OrderReferences  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J3-name.
    DATA: l_element_ProductCoder TYPE REF TO if_ixml_element.
            l_element_ProductCode  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento2D4-name.
    *DATA: l_element_ProductDescription TYPE REF TO if_ixml_element.
            l_element_ProductDescription  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J5-name.
    DATA: l_element_Quantity TYPE REF TO if_ixml_element.
            l_element_Quantity  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J6-name.
    DATA: l_element_UnitOfMeasure TYPE REF TO if_ixml_element.
            l_element_UnitOfMeasure  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J7-name.
    DATA: l_element_UnitPrice TYPE REF TO if_ixml_element.
            l_element_UnitPrice  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J8-name.
    DATA: l_element_TaxPointDate TYPE REF TO if_ixml_element.
            l_element_TaxPointDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J9-name.
    DATA: l_element_References TYPE REF TO if_ixml_element.
            l_element_References  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento2E1A-name.
    *DATA: l_element_Description TYPE REF TO if_ixml_element.
            l_element_Description  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento3D3I5A-name.
    *DATA: l_element_DebitAmount TYPE REF TO if_ixml_element.
            l_element_DebitAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento3D3I5B-name.
    *DATA: l_element_CreditAmount TYPE REF TO if_ixml_element.
            l_element_CreditAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J13-name.
    DATA: l_element_Tax TYPE REF TO if_ixml_element.
            l_element_Tax  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J14-name.
    DATA: l_element_SettlementAmount TYPE REF TO if_ixml_element.
            l_element_SettlementAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Line ).
    elemento = elemento4A4J2A-name.
    DATA: l_element_OriginatingON TYPE REF TO if_ixml_element.
            l_element_OriginatingON  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_OrderReferences ).
    elemento = elemento4A4J2B-name.
    DATA: l_element_OrderDate TYPE REF TO if_ixml_element.
            l_element_OrderDate  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_OrderReferences ).
    elemento = elemento4A4J9A-name.
    DATA: l_element_CreditNote TYPE REF TO if_ixml_element.
            l_element_CreditNote  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_References ).
    elemento = elemento4A4J9A1-name.
    DATA: l_element_Reference TYPE REF TO if_ixml_element.
            l_element_Reference  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_CreditNote ).
    elemento = elemento4A4J9A2-name.
    DATA: l_element_Reason TYPE REF TO if_ixml_element.
            l_element_Reason  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_CreditNote ).
    elemento = elemento4A4K1-name.
    DATA: l_element_TaxPayable TYPE REF TO if_ixml_element.
            l_element_TaxPayable  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_DocumentTotals ).
    elemento = elemento4A4K2-name.
    DATA: l_element_NetTotal TYPE REF TO if_ixml_element.
            l_element_NetTotal  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_DocumentTotals ).
    elemento = elemento4A4K3-name.
    DATA: l_element_GrossTotal TYPE REF TO if_ixml_element.
            l_element_GrossTotal  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_DocumentTotals ).
    elemento = elemento4A4K4-name.
    DATA: l_element_Currency TYPE REF TO if_ixml_element.
            l_element_Currency  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_DocumentTotals ).
    elemento = elemento4A4K5-name.
    DATA: l_element_Settlement TYPE REF TO if_ixml_element.
            l_element_Settlement  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_DocumentTotals ).
    elemento = elemento1J-name.
    *DATA: l_element_CurrencyCode TYPE REF TO if_ixml_element.
            l_element_CurrencyCode  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_Currency ).
    elemento = elemento4A4K4A1-name.
    DATA: l_element_CurrencyDebitAmount TYPE REF TO if_ixml_element.
            l_element_CurrencyDebitAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_CurrencyCode ).
    elemento = elemento4A4K4A2-name.
    DATA: l_element_CurrencyCreditAmount TYPE REF TO if_ixml_element.
            l_element_CurrencyCreditAmount  = l_document->create_simple_element(
                        name = elemento
                        parent = l_element_CurrencyCode ).
    *   Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
    *   Connect internal XML table to stream factory
        l_ostream = l_streamfactory->create_ostream_itable( table = l_xml_table ).
    *   Rendering the document
        l_renderer = l_ixml->create_renderer( ostream  = l_ostream
                                              document = l_document ).
        l_rc = l_renderer->render( ).
    *   Saving the XML document
        l_xml_size = l_ostream->get_num_written_raw( ).
        CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            bin_filesize = l_xml_size
    *        filename     = 'E:     empAuditFile2.xml'                  "cambio E
            filename     = 'C:mioAuditFile21.xml'                  "cambio C
            filetype     = 'BIN'
          CHANGING
            data_tab     = l_xml_table
          EXCEPTIONS
            OTHERS       = 24.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    *inicio prueba
    *Process the document
    perform process_dom using l_document.
    *WHEN
    *fin prueba
    **& Form process_dom
    form process_dom using document type ref to if_ixml_document.
    data: node type ref to if_ixml_node,
    iterator type ref to if_ixml_node_iterator,
    nodemap type ref to if_ixml_named_node_map,
    attr type ref to if_ixml_node,
    name type string,
    prefix type string,
    value type string,
    indent type i,
    count type i,
    index type i.
    data: name2 type string,
    name_root type string,
    node_parent type ref to if_ixml_node,
    node_root type ref to if_ixml_node,
    num_children type i.
    node ?= document.
    check not node is initial.
    uline.
    write: /.
    write: /' DOM-TREE'.
    write: /.
    if node is initial. exit. endif.
    *create a node iterator
    iterator = node->create_iterator( ).
    *get current node
    node = iterator->get_next( ).
    *loop over all nodes
    while not node is initial.
    indent = node->get_height( ) * 2.
    indent = indent + 20.
    num_children = node->num_children( ).
    case node->get_type( ).
    when if_ixml_node=>co_node_element.
    *element node
    name = node->get_name( ).
    nodemap = node->get_attributes( ).
    node_root = node->get_root( ).
    name_root = node_root->get_name( ).
    write: / 'ELEMENT :'.
    write: at indent name color col_positive inverse.
    write: 'NUM_CHILDREN:', num_children.
    write: 'ROOT:', name_root.
    node_parent = node->get_parent( ).
    name2 = node_parent->get_name( ).
    write: 'NAME2: ' , name2.
    if not nodemap is initial.
    *attributes
    count = nodemap->get_length( ).
    do count times.
    index = sy-index - 1.
    attr = nodemap->get_item( index ).
    name = attr->get_name( ).
    prefix = attr->get_namespace_prefix( ).
    value = attr->get_value( ).
    write: / 'ATTRIBUTE:'.
    write: at indent name color col_heading inverse, '=',
    value color col_total inverse.
    enddo.
    endif.
    when if_ixml_node=>co_node_text or
    if_ixml_node=>co_node_cdata_section.
    *text node
    value = node->get_value( ).
    write: / 'VALUE :'.
    *mjprocha
    node_parent = node->get_parent( ).
    write: at indent value color col_group inverse.
    name2 = node_parent->get_name( ).
    write: 'NAME2: ' , name2.
    endcase.
    *advance to next node
    node = iterator->get_next( ).
    endwhile.
    endform. "process_dom
    *       FORM print_tree                                               *
    FORM print_dom USING node TYPE REF TO if_ixml_node.
      DATA: iterator  TYPE REF TO if_ixml_node_iterator,
            nodemap   TYPE REF TO if_ixml_named_node_map,
            attr      TYPE REF TO if_ixml_node,
            name      TYPE string,
            prefix    TYPE string,
            value     TYPE string,
            indent    TYPE i,
            count     TYPE i,
            index     TYPE i.
      CHECK NOT node IS INITIAL.
      ULINE.
      WRITE: /.
      WRITE: /' DOM-TREE'.
      WRITE: /.
      IF node IS INITIAL. EXIT. ENDIF.
    * create a node iterator
      iterator  = node->create_iterator( ).
    * get current node
      node = iterator->get_next( ).
    * loop over all nodes
      WHILE NOT node IS INITIAL.
        indent = node->get_height( ) * 2.
        indent = indent + 20.
        CASE node->get_type( ).
          WHEN if_ixml_node=>co_node_eleme

  • How do you move new photos into existing albums?

    On an iPad how do you move a new photo into an existing album?

    Or, from the camera roll:
    Tap Select (upper right hand corner)
    Tap the pictures you want to add to an album (you'll see a check mark in each selected photo)
    Tap Add To (upper left hand corner)
    Your albums will appear and touch the album you want to move the picture to and they'll go there
    Note:  They will stay in your Camera Roll as well

  • How to add a new printer into printer list?

    Dear all,
    May I know how to add new printer into my printer list in SAP system? My company SAP is SAP 4.0B. Can any one please teach me how to add printer step-by-step?
    Thanks alot!!
    PC

    Solved

  • How do I add (or insert) a node into an XML document with JSTL?

    Dear all,
    I am trying to use JSTL to store some data from a form into XML. However, I have read many articles in JSTL and only found that it can only be, as far as those articles are concerned, used to "read" data from XML files, but not "write" to them.
    Am I missing something in JSTL? Or, if I want to write to an XML file (e.g., insert a new node, or modify a node's data), will I have to write my own bean and then use <c:usebean />?
    Thanks very much in advance.
    Regards,
    Robert

    JSTL is not a programming language in and of itself. It is intended to help you to write scriptlet free JSPs.
    JSP pages (by one school of thought) are intended to function as the "View" in a Model-View-Controller architecture.
    Being a view, JSP pages should be able to look at things - but not touch.
    The standard pattern is to go to a servlet first, which invokes the logic, and then forwards to a JSP for rendering.
    Editing XML by adding new nodes etc etc is thus a function of the java code layer - servlet/action whatever you want to call it.
    Giving you the power to edit XML documents via JSTL (ie on a JSP page) takes away from purity of the MVC design.
    Hence why they don't provide the tags for manipulating XML, and only provide the database tags with a disclaimer that they should only be used for prototypes/trivial apps!
    JSTL is designed to replace scriptlet code on a JSP page.
    It can replace 99% of scriptlet code. The other 1% shouldn't be on the JSP in the first place :-)
    cheers,
    evnafets

  • How to add a new column to existing Asset history sheet version

    Hi Experts,
    I would like to one more column in the asset history sheet version for displaying ordinary depreciation and value adjustment in the standard report RAGITT_ALV01 (S_ALR_87011990).
    Could you please let me the know the steps to perform this requirement.
    Thanks in Advance...
    Best Regards,
    Chandra.

    Hi,
    Thanks for your reply.
    I have got any help like customizg path in asset history sheet.
    I have copied the standard SAP asset history sheet version and trying to add to new fileds according to the requirement.
    But it's not saving at all.
    Could you Please let me know is there any other method to do this.
    Thanks in Advance..
    Best Regards,
    Chandra.

  • Help: How to add serial number data into Delivery Order document

    Dear Gurus,
    I am creating an interface program and I have problem in attaching the serial number data to the corresponding material code for a certain delivery order document in R/3 4.6C SP22 system.
    The serial number can be attached either during the creation of the Delivery Order itself or in the subsequent step after creating the Delivery Order (i.e.: create the D/O document first, and then update the D/O data).
    The BAPI_OUTB_DELIVERY_CONFIRM_DEC FM does not provide any input parameter to let me put the serial number in this R/3 version.
    By tracing in SE30 the standard program VL02N --> Menu --> Extras --> Serial Number --> Continue (Enter) --> Save (Ctrl+S), I found out that the serial attachment 'might' be done during sub-routine SERIAL_LISTE_POST_LS in program SAPLIPW1. It will in turn executes FM SERIAL_LISTE_POST_LS. The commit to database table will be done in update task by FM OBJK_POST_UPDATE_N and SERIAL_POST_UPDATE_LS.
    <b>My question:</b>
    ============
    1. Is FM SERNR_ADD_TO_LS can be used to attach the serial number to D/O?
    If yes, how to do it please because I already tried it I can not see the serial information in VL02N after that. There is no any insert or update to database in this function module. Should I call other FM after this? I want to try to call FM OBJK_POST_UPDATE_N and SERIAL_POST_UPDATE_LS but I do not know how I can retrieve the global object such as XOBJK_ALL that is necessary for the input parameter.
    2. If SERNR_ADD_TO_LS can not be used, what other FM can I use? Can I call SERIAL_LISTE_POST_LS instead? Is there any reliable way to generate the import parameter for this FM, such as XSER00, XSER01, XOBJK_ALL and XEQUI?
    Thank you in advanced for your kind assistance.
    Best Regards,
    Hiroshi

    Try something similar to this below...
    Afterwards you should do a call transaction to VL02N and immediately SAVE. This is sufficient to ensure the status on the serial numbers is updated correctly.
    FUNCTION z_mob_serialnr_update_ls.
    ""Local interface:
    *" IMPORTING
    *" VALUE(VBELN_I) LIKE LIKP-VBELN
    *" TABLES
    *" SERNO_TAB STRUCTURE RISERLS
    *" YSER00 STRUCTURE SER00 OPTIONAL
    *" YSER01 STRUCTURE RSERXX OPTIONAL
    *" YOBJK_ALL STRUCTURE RIPW0 OPTIONAL
    *" YEQUI STRUCTURE RIEQUI OPTIONAL
    *" YMASE STRUCTURE MASE OPTIONAL
    *" EXCEPTIONS
    *" NO_EQUIPMENT_FOUND
    The modified/confirmed table of serial numbers is supplied in
    SERNO_TAB.
    These are updated in the SAP tables
    YSER00 - General Header Table for Serial Number Management
    YSER01 - Document Header for Serial Numbers for Delivery
    YOBJK_ALL - Internal Table for Object List Editing/Serial Numbers
    YEQUI - Internal Structure for IEQUI
    local data
    DATA: BEGIN OF del_wa,
    vbeln LIKE likp-vbeln,
    posnr LIKE lips-posnr,
    matnr LIKE lips-matnr,
    lfimg LIKE lips-lfimg.
    DATA: END OF del_wa.
    DATA: del_tab LIKE del_wa OCCURS 0.
    DATA: _ct TYPE i.
    DATA: lastobknr LIKE objk-obknr.
    DATA: _debug.
    CLEAR: yser00, yser01, yobjk_all, yequi, ymase.
    REFRESH: yser00, yser01, yobjk_all, yequi, ymase.
    GET PARAMETER ID 'ZEDI_DEBUG' FIELD _debug.
    OBJECT KEYS
    read the delivery items with serial numbers to be processed
    SELECT * INTO CORRESPONDING FIELDS OF TABLE del_tab
    FROM lips
    WHERE vbeln = vbeln_i
    AND serail NE space.
    if nothing is relevant for serial numbers bailout
    DESCRIBE TABLE del_tab LINES _ct.
    IF _ct IS INITIAL.
    EXIT.
    ENDIF.
    ==== read the existing object keys for delivery items
    SELECT * INTO CORRESPONDING FIELDS OF TABLE yser01
    FROM ser01
    WHERE lief_nr = vbeln_i.
    IF sy-subrc = 0.
    yser01-dbknz = 'X'. "entry exists in db
    MODIFY yser01 TRANSPORTING dbknz WHERE dbknz = space.
    ENDIF.
    == check if there is a header entry for the delivery item
    LOOP AT del_tab INTO del_wa.
    READ TABLE yser01 WITH KEY lief_nr = del_wa-vbeln
    posnr = del_wa-posnr.
    IF sy-subrc NE 0.
    create one
    CALL FUNCTION 'OBJECTLIST_NUMBER'
    IMPORTING
    obknr = yser01-obknr.
    yser00-mandt = sy-mandt.
    yser00-obknr = yser01-obknr.
    APPEND yser00.
    SELECT SINGLE kunnr INTO (yser01-kunde)
    FROM likp
    WHERE vbeln = vbeln_i.
    yser01-mandt = sy-mandt.
    yser01-lief_nr = del_wa-vbeln.
    yser01-posnr = del_wa-posnr.
    yser01-vorgang = 'SDLS'.
    yser01-vbtyp = 'J'.
    yser01-bwart = '601'.
    yser01-dbknz = space. "not in db
    yser01-loknz = space. "do not delete
    APPEND yser01.
    ENDIF.
    ENDLOOP.
    check if any entries should be deleted
    LOOP AT yser01.
    READ TABLE serno_tab WITH KEY vbeln = yser01-lief_nr
    posnr = yser01-posnr.
    IF sy-subrc NE 0.
    yser01-loknz = 'X'. "mark for delete
    MODIFY yser01.
    ENDIF.
    ENDLOOP.
    collect all the object keys for the delivery item with s/n's
    LOOP AT yser01.
    READ TABLE serno_tab WITH KEY vbeln = yser01-lief_nr
    posnr = yser01-posnr.
    IF sy-subrc = 0.
    READ TABLE yser00 WITH KEY obknr = yser01-obknr.
    IF sy-subrc NE 0.
    yser00-mandt = yser01-mandt.
    yser00-obknr = yser01-obknr.
    APPEND yser00.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF NOT _debug IS INITIAL. BREAK-POINT. ENDIF.
    SERIAL NO OBJECTS
    ==== read the existing serial numbers from the database
    via object number into YOBJK_ALL
    LOOP AT yser00.
    SELECT * APPENDING CORRESPONDING FIELDS OF TABLE yobjk_all
    FROM objk
    WHERE obknr = yser00-obknr.
    ENDLOOP.
    yobjk_all-dbknz = 'X'.
    MODIFY yobjk_all TRANSPORTING dbknz WHERE dbknz = space.
    === add any new serial numbers
    LOOP AT serno_tab.
    READ TABLE yser01 WITH KEY lief_nr = serno_tab-vbeln
    posnr = serno_tab-posnr.
    READ TABLE yobjk_all WITH KEY sernr = serno_tab-sernr
    matnr = del_wa-matnr.
    IF sy-subrc NE 0.
    this is a new serial number
    yobjk_all-mandt = sy-mandt.
    yobjk_all-obknr = yser01-obknr.
    yobjk_all-obzae = 0.
    yobjk_all-equnr = yequi-equnr.
    yobjk_all-objvw = 'S'.
    yobjk_all-sernr = serno_tab-sernr.
    yobjk_all-matnr = del_wa-matnr.
    yobjk_all-datum = sy-datum.
    yobjk_all-taser = 'SER01'.
    yobjk_all-equpd = 'X'.
    yobjk_all-objnr = yequi-objnr.
    yobjk_all-dbknz = space.
    yobjk_all-loknz = space.
    APPEND yobjk_all.
    ENDIF.
    ENDLOOP.
    === mark any which are no longer confirmed as deleted
    LOOP AT yobjk_all.
    READ TABLE yser01 WITH KEY obknr = yobjk_all-obknr.
    READ TABLE serno_tab WITH KEY vbeln = yser01-lief_nr
    posnr = yser01-posnr
    sernr = yobjk_all-sernr.
    IF sy-subrc NE 0.
    yobjk_all-loknz = 'X'.
    MODIFY yobjk_all TRANSPORTING loknz.
    ENDIF.
    ENDLOOP.
    EQUIPMENT RECORDS
    == get the equipment records
    LOOP AT yobjk_all.
    SELECT SINGLE * INTO CORRESPONDING FIELDS OF yequi
    FROM equi
    WHERE sernr = yobjk_all-sernr
    AND matnr = yobjk_all-matnr.
    IF sy-subrc NE 0.
    CONTINUE.
    ENDIF.
    IF yobjk_all-dbknz = space AND
    yobjk_all-loknz = space.
    yequi-dbknz = 'X'.
    yequi-obknr = yobjk_all-obknr.
    yequi-j_vorgang = 'PMS3'. "add to delivery
    yequi-matnr_old = yequi-matnr.
    APPEND yequi.
    yobjk_all-equnr = yequi-equnr.
    MODIFY yobjk_all TRANSPORTING equnr.
    CONTINUE.
    ENDIF.
    IF yobjk_all-dbknz = 'X' AND
    yobjk_all-loknz = 'X'.
    yequi-dbknz = 'X'.
    yequi-j_vorgang = 'PMSA'. "delete from delivery
    yequi-matnr_old = yequi-matnr.
    APPEND yequi.
    CONTINUE.
    ENDIF.
    ENDLOOP.
    remove any Equipment records that do not need to be processed
    DELETE yequi WHERE j_vorgang IS initial.
    IF NOT _debug IS INITIAL. BREAK-POINT. ENDIF.
    fill the object counter
    LOOP AT del_tab INTO del_wa.
    READ TABLE yser01 WITH KEY lief_nr = del_wa-vbeln
    posnr = del_wa-posnr.
    DO del_wa-lfimg TIMES.
    READ TABLE yobjk_all WITH KEY obknr = yser01-obknr
    obzae = sy-index.
    IF sy-subrc NE 0.
    READ TABLE yobjk_all WITH KEY obknr = yser01-obknr
    obzae = 0.
    IF sy-subrc = 0.
    yobjk_all-obzae = sy-index.
    MODIFY yobjk_all INDEX sy-tabix TRANSPORTING obzae.
    ENDIF.
    ENDIF.
    ENDDO.
    ENDLOOP.
    IF NOT _debug IS INITIAL. BREAK-POINT. ENDIF.
    ===========================================
    update the delivery
    ===========================================
    CALL FUNCTION 'SERIAL_LISTE_POST_LS'
    TABLES
    xser00 = yser00
    xser01 = yser01
    xobjk_all = yobjk_all
    xequi = yequi
    xmase = ymase.
    TAB_CUOBJ =
    XSER03 =
    CALL FUNCTION 'STATUS_BUFFER_EXPORT_TO_MEMORY'
    EXPORTING
    i_memory_id = memid_status.
    COMMIT WORK AND WAIT.
    CALL FUNCTION 'Z_MOB_SERIALNR_REFRESH_LS'
    EXPORTING
    ctu = 'X'
    mode = 'N'
    UPDATE = 'L'
    GROUP =
    USER =
    KEEP =
    HOLDDATE =
    NODATA = '/'
    vbeln_i = vbeln_i.
    IMPORTING
    SUBRC =
    TABLES
    MESSTAB =
    ENDFUNCTION.
    FUNCTION z_mob_serialnr_refresh_ls.
    ""Local interface:
    *" IMPORTING
    *" VALUE(CTU) LIKE APQI-PUTACTIVE DEFAULT 'X'
    *" VALUE(MODE) LIKE APQI-PUTACTIVE DEFAULT 'N'
    *" VALUE(UPDATE) LIKE APQI-PUTACTIVE DEFAULT 'L'
    *" VALUE(GROUP) LIKE APQI-GROUPID OPTIONAL
    *" VALUE(USER) LIKE APQI-USERID OPTIONAL
    *" VALUE(KEEP) LIKE APQI-QERASE OPTIONAL
    *" VALUE(HOLDDATE) LIKE APQI-STARTDATE OPTIONAL
    *" VALUE(NODATA) LIKE APQI-PUTACTIVE DEFAULT '/'
    *" VALUE(VBELN_I) LIKE LIKP-VBELN
    *" EXPORTING
    *" VALUE(SUBRC) LIKE SYST-SUBRC
    *" TABLES
    *" MESSTAB STRUCTURE BDCMSGCOLL OPTIONAL
    DATA: vbeln_001 LIKE bdcdata-fval.
    vbeln_001 = vbeln_i.
    subrc = 0.
    PERFORM bdc_nodata USING nodata.
    PERFORM open_group USING group user keep holddate ctu.
    PERFORM bdc_dynpro USING 'SAPMV50A' '4004'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LIKP-VBELN'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LIKP-VBELN'
    vbeln_001.
    PERFORM bdc_dynpro USING 'SAPMV50A' '1000'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=PSER_T'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LIPS-POSNR(01)'.
    PERFORM bdc_dynpro USING 'SAPLIPW1' '0200'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RIPW0-SERNR(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=RWS'.
    PERFORM bdc_dynpro USING 'SAPMV50A' '1000'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=SICH_T'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LIPS-MATNR(02)'.
    PERFORM bdc_transaction TABLES messtab
    USING 'VL02N'
    ctu
    mode
    update.
    IF sy-subrc <> 0.
    subrc = sy-subrc.
    EXIT.
    ENDIF.
    PERFORM close_group USING ctu.
    ENDFUNCTION.
    INCLUDE bdcrecxy.

  • How to add features(new product) to existing services

    Hi - Good wishes
    My scenario is like this -
    In OSM, we have cartridge to provision/activate wireline services -
    So, if we create new install order for wireline services - it'll be done fine.
    Now i would like to introduce new feature to wireline - like Voice mail box.
    To existing Wireline customer, if i want to activate voice mail box - how should i proceed?
    It is something like - Change order scenario and adding voice mail box to the existing wireline.
    In this case - how we should handle such orders?
    Is it advisable to create new Prod Specf - Voice mail box and proceed that way?
    or do we have any logic in associating this voice mail box product with Wireline.
    Because as per my above requirement, voice mail box can exists only if customer has wireline.
    Plz advise.
    Thanks
    Sathya

    DOMParser parser=new DOMParser();
    XMLDocument xmlDocument=parser.getdocument();
    Node node=xmlDocument.selectSingleNode("/ROWSET/ROW");
    Element element=xmlDocument.createElement(String tagName)
    node.appendChild(element);

  • How to add a new font into Report Builder and Oracle Forms/Reports Server?

    Hi,
    I've searched the forum and can't find this being discussed.
    My developers run Report Builder 10.1.2.0.2 on their XP laptops.
    Their reports run (in production) on Oracle Forms/Reports Server 10.1.2.0.2.
    This server runs on MS Windows 2003, SP2.
    They've got a client who wants reports using the "Garamond Western" font.
    So....how do I get this font onto the developer's Report Builder laptops, and onto the Oracle Forms/Reports Server?
    I've moved various 'Garamond' fonts into C:\WINDOWS\FONTS on both the laptops and the server, but neither seem to recognize it.
    Thanks for your help.

    Thanks.
    This answers 1/2 of my question.
    The developer can now use Report Builder on his laptop, with the new fonts.
    But when he moves this new Report to the Oracle Application Server/Forms-Reports Server, it fails to use the new fonts.
    The Oracle App Server/Forms-Report Server is Version 10.1.2.0.2. It runs on MS Windows 2003, SP2.
    I have installed the exact same fonts on this server, into C:\WINDOWS\Fonts.
    I have used REGEDIT to change REPORTS_PATH....and placed C:\WINDOWS\Fonts; as the first value in this field.
    I have then stopped and restarted the Forms-Reports Server.

Maybe you are looking for

  • How do I open a photo from Mac Finder in Lightroom?

    Here's the problem: I frequently need to search for photos in the Mac Finder (I actually use HoudahSpot and Path Finder, but it's similar with an exception I note below). I can search for keywords, like "yosemite." But the Finder and QuickLook are ra

  • Cpgz file

    Any tips on how to stop the zip > cpgz file looping?  I have a zip file that I can't seem to open except that it gets converted to a cpgz file.  Thoughts?

  • Project Settings - paths, classes, etc

    I am interested in finding out if anyone is creating 'default project' settings. For example, having a 'production' source reference library, that would be searched during 'make/compile' and 'build' processes. More detail: Application 'ABC' currently

  • I couldn't find Facebook on mountain lion

    Hi, I am Clemens Kim And I have download OS X Mountain Lion yeasterday and today again. But I couldn't find facebook that you told mac installed inside itself mac already. And another problem on this OS is that I can't open memo pad that is everytime

  • TS3694 error code 2009

    My ipod touch 4 gen show me an error code 2009 when I try to reset it through itunes? What that error code is and how to fix it?