How I could generate an XML file from a report in version 4.0B

Good morning,
How could I generate an XML file from a report? Please note that I am using version 4.0B
I don't have access to
Billy Vital

Hi,
        In the Class CL_XML_DOCUMENT,
             we have a method  EXPORT_TO_FILE to download an XML file.

Similar Messages

  • Generate an HTML file from a Report in ABAP

    Good morning,
    How I could generate an HTML file from a report.
    Any Ideas... I have found the function WWW_ITAB_TO_HTML, but someone has the standar code and how use this function?
    Thanks a lot,
    Hernán Restrepo

    Hi,
    I am facing a similar problem.I did try using the function module WWW_ITAB_TO_HTML in the reoprt program, as I'm trying to generate a url from a report, but i'm not able to get the expected results. The code is given below. Could someone please try and help me resolve this issue.Thanks in advance.
    DATA:   emp_name                     TYPE char80.
    DATA:   it_itabex                    TYPE zdb_ex_tty,
            it_emp                       TYPE TABLE OF zis_emp,
            it_org                       TYPE TABLE OF zis_org,
            it_pos                       TYPE TABLE OF zis_pos,
            it_pos_alloc                 TYPE TABLE OF zis_pos_alloc,
            it_res                       TYPE TABLE OF zis_res,
            it_res_alloc                 TYPE TABLE OF zis_res_alloc,
            ls_itabex                    TYPE zdb_ex_s.
    DATA:   lv_filename                  TYPE string,
            lv_path                      TYPE string,
            lv_fullpath                  TYPE string,
            lv_replace                   TYPE i.
    DATA qstring LIKE it_itabex OCCURS 10.
    DATA: url(200), url2(200), url3(200), fullurl(200).
    FIELD-SYMBOLS: <fs_emp>              LIKE LINE OF it_emp,
                   <fs_org>              LIKE LINE OF it_org,
                   <fs_pos>              LIKE LINE OF it_pos,
                   <fs_pos_alloc>        LIKE LINE OF it_pos_alloc,
                   <fs_res>              LIKE LINE OF it_res,
                   <fs_res_alloc>        LIKE LINE OF it_res_alloc.
    Report Program to export data from database to Excel.
    Populate all the tables that have to be exported.
    SELECT * FROM zis_org       INTO TABLE it_org.
    SELECT * FROM zis_pos       INTO TABLE it_pos.
    SELECT * FROM zis_pos_alloc INTO TABLE it_pos_alloc.
    SELECT * FROM zis_emp       INTO TABLE it_emp.
    SELECT * FROM zis_res_alloc INTO TABLE it_res_alloc.
    SELECT * FROM zis_res       INTO TABLE it_res.
    Append the Column Header
    CLEAR ls_itabex.
    ls_itabex-ipp_pos_id            = 'IPP Pos ID'.
    ls_itabex-emp_name              = 'Name'.
    ls_itabex-dt_of_join            = 'JoinedOn'.
    ls_itabex-emp_status            = 'Status'.
    ls_itabex-org_name              = 'Org'.
    ls_itabex-prj_name              = 'Project'.
    ls_itabex-mgr_name              = 'Line'.
    ls_itabex-designation           = 'Designation'.
    ls_itabex-specialization        = 'Specialization'.
    APPEND ls_itabex TO it_itabex.
    Append all the tables into one internal table
    LOOP AT it_pos_alloc ASSIGNING <fs_pos_alloc>.
      CLEAR ls_itabex.
      ls_itabex-ipp_pos_id          = <fs_pos_alloc>-ipp_pos_id.
      READ TABLE it_emp ASSIGNING <fs_emp> WITH KEY emp_guid = <fs_pos_alloc>-emp_guid.
      IF sy-subrc = 0.
        CONCATENATE <fs_emp>-emp_fname <fs_emp>-emp_lname INTO ls_itabex-emp_name  SEPARATED BY space.
        ls_itabex-dt_of_join        = <fs_emp>-dt_of_join.
        ls_itabex-emp_status        = <fs_emp>-emp_status.
        ls_itabex-specialization    = <fs_emp>-specialization.
      ENDIF.
      READ TABLE it_pos ASSIGNING <fs_pos> WITH KEY ipp_pos_id = <fs_pos_alloc>-ipp_pos_id.
      IF sy-subrc = 0.
        ls_itabex-designation       = <fs_pos>-designation.
        READ TABLE it_org ASSIGNING <fs_org> WITH KEY  org_id = <fs_pos>-org_id.
        IF sy-subrc = 0.
          ls_itabex-org_name        = <fs_org>-org_name.
          ls_itabex-mgr_name        = <fs_org>-mgr_name.
        ENDIF.
      ENDIF.
      READ TABLE it_res ASSIGNING <fs_res> WITH KEY org_id = <fs_org>-org_id.
       ls_itabex-org_name         = <fs_org>-org_name.
      APPEND ls_itabex TO it_itabex.
    ENDLOOP.
    url = 'http://testweb/scripts/wgate/zvw10a/!?~language=en'.
    url2 = '&~OkCode(LGON)=LGON&login-login_user='.
    url3 = '&vbcom-vbeln='.
    CONCATENATE url url2 url3 INTO fullurl.
    WRITE: /'Staffing Excel'.
    CALL FUNCTION 'WWW_SET_URL'
      EXPORTING
        offset        = 12
        length        = 10
        func          = fullurl
      TABLES
        query_string  = qstring
      EXCEPTIONS
        invalid_table = 1
        OTHERS        = 2.
    Thanks & Regards,
    Preethi.

  • How I can create a XML file from java Aplication

    How I can create a XML file from java Aplication
    whith have a the following structure
    <users>
    <user>
    <login>anyName</login>     
    <password>xxxx</password>
    </user>
    </users>
    the password label must be encripted
    accept any suggestion

    Let us assume you have all the data from the jsp form in an java bean object..
    Now you want a xml file. This can be acheived in 2 ways
    1. Write it into a file using java.io classes. Say you have a class with name
    write("<name>"+obj.getName+</name>);
    bingo you have a flat file with the xml
    2. Use data binding to do the trick
    will recommend JiBx and Castor for the 2nd option
    Regards,
    Rajagopal

  • Generate an XML file from a DOM tree

    Hi,
    I'm trying to generate an XML file from a DOM tree that I obtained from another XML file with the Xerces library. I used the following operation :
    public static void writeXmlFile(Document doc, String filename) {
    try {
    Source source = new DOMSource(doc);
    File file = new File(filename);
    Result result = new StreamResult(file);
    Transformer xformer = TransformerFactory.newInstance().newTransformer();
    xformer.transform(source, result);
    } catch (TransformerConfigurationException e) {
    System.err.println(e);
    System.exit(1);
    } catch (TransformerException e) {
    System.err.println(e);
    System.exit(1);
    But I have this Windows/Linux problem. When I execute this on Windows, everything is correct. But if I try on Linux (every distribution does the same thing), I obtain an XML file where everything is written on just ONE LINE : there is neither identation nor carriage return at the end of a line ... And that is pretty annoying 'cause I need to SEE what I generate ...
    Thanks for your answer,
    Blueberryfin.

    Actually I would think that no indents and no new-lines would be more correct, but maybe it's an option for parsers to do it either way if you don't specify it. If you want to specify it, look at this post from last month:
    http://forum.java.sun.com/thread.jsp?forum=34&thread=383400

  • How to automatically generate build.xml file in eclipse?

    Hello every body,
    I am learning about ANT. e.g I have writen a very simple programme which displays output "no worries". But how can I compile it with ANT and how can I generate build.xml file using eclipse.

    This is not really a Java issue but rather is an Eclipse issue. You may wish to look for their support sites or forums.

  • How to generate an XML file from SSIS (based on an XSD)?

    I have an XSD that describes an XML format. I also have a sample XML file as well from the XSD. I am trying to understand SSIS's capability to generate the XML file in an ETL process. I would need to create the XML file based on the XSD that
    I have. It is safe to assume that all the data elements are in the DB that I am incorporating in the ETL and it is also safe to assume that the data in the XML may be from multiple different tables (so massaging is probably necessary). 
    Would this be a job for C#/VB or can I do this through an SSIS process/task? Please help me understand my options. Thanks.

    Dear All,
    Indeed the post by RamJaddu did not answer the question. I am having the same issue: I have been provided an .xsd file which contains a data schema, and I have all of the necessary
    data in a .mdf file in order to create the required .xml file. Having queried SQL Server and received my data in "myDataSet" I can use C# to create the .xml ignoring the schema using
    string strSchemaFile = @"F:\Documents\UserCost\VictorianDataCollection\VCDCSchema_v2.xsd";
    string strXmlFile = "testXmlExport.xml";
    myDataSet.WriteXmlSchema(strSchemaFile);
    myDataSet.WriteXml(strXmlFile, XmlWriteMode.IgnoreSchema);
    but how do I export the .xml file so that is conforms with the .xsd format?
    If any of you have worked this out the answer would be most appreciated.
    All the best,
    Nick
    "Everything should be made as simple as possible, but not simpler" - Einstein

  • How to generate a XML file from a XML schema...?

    Hi guys...!
    I have a XML schema and I want to write a XML file based on that schema. I have heard about this feature that eclipse has, which given a XML schema, can generate a XML file for you.
    Does anyone of you know about this feature? or is there another way to do it. The schema that I have is very huge...
    I will really appreciate any help from you guys...
    Thank...you..
    --- Spirit Away...

    don't cross post
    http://forum.java.sun.com/thread.jspa?threadID=649205&tstart=10

  • How to generate an xml file from a soapbody

    i'm trying to use SOAPMESSAGE from a webservice as a Datasource for my JasperReport, I'm thinking of doing it as getting the SOAPBody and saving it as xml file and setting that xml file as datasource to my JasperReport. My problem is how will a get the SOAPBody and save it as an xml file? or is there other way to make SOAP from webservice as a datasource for my Jasperreport?
    Thanks in advance for your help.

    Dear All,
    Indeed the post by RamJaddu did not answer the question. I am having the same issue: I have been provided an .xsd file which contains a data schema, and I have all of the necessary
    data in a .mdf file in order to create the required .xml file. Having queried SQL Server and received my data in "myDataSet" I can use C# to create the .xml ignoring the schema using
    string strSchemaFile = @"F:\Documents\UserCost\VictorianDataCollection\VCDCSchema_v2.xsd";
    string strXmlFile = "testXmlExport.xml";
    myDataSet.WriteXmlSchema(strSchemaFile);
    myDataSet.WriteXml(strXmlFile, XmlWriteMode.IgnoreSchema);
    but how do I export the .xml file so that is conforms with the .xsd format?
    If any of you have worked this out the answer would be most appreciated.
    All the best,
    Nick
    "Everything should be made as simple as possible, but not simpler" - Einstein

  • Generating a XML file from a JSP request Page

    Hi,
    I am very new to JAVA with XML. My need is i want to capture some data in in a JSP page then after submitting ,it will generate a XML file. How can i do that??? Any help will be highly appriciated. If anybody can give me a good example....
    Thx

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    Are you using our XML SQL Utility that comes with the Oracle XDK for Java? Is the correct result produced, but you are having trouble writing it to a file?<HR></BLOCKQUOTE>
    hi steven,
    yes i am using xml sql utility and have solved the problem..... as i was working from a remote system i didnot give the correct path that is the c:\.....etc of the machine i was giving http:// thats why i did not write to a file... now its working

  • How do I create individual xml files from the parsed data output of a xml file?

    I have written a program (DOM Parser) that parses data from a XMl File. I would like to create an individual file with the corresponding name for each set of data parsed from the xml document. If the parsed output is Single, Double, Triple, I would like to create an individual xml file (Single.xml, Double.xml, Triple.xml)with those corresponding names. How do I create the xml files and give each file the name of my parsed data output? Thanks in advance for your help.
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class MyDomParser {
      public static void main(String[] args) {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      try {
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document doc = builder.parse("ENtemplate.xml");
      doc.normalize();
      NodeList rootNodes = doc.getElementsByTagName("templates");
      Node rootNode = rootNodes.item(0);
      Element rootElement = (Element) rootNode;
      NodeList templateList = rootElement.getElementsByTagName("template");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      System.out.println("Template" + ": " +templateElement.getAttribute("name")+ ".xml");
      } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (SAXException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

    Ive posted the new code but now I'm getting a FileAlreadyExistException error. How do I handle this exception error correctly in my code?
    import java.io.IOException;
    import java.nio.file.FileAlreadyExistsException;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class MyDomParser {
      public static void main(String[] args) {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      try {
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document doc = builder.parse("ENtemplate.xml");
      doc.normalize();
      NodeList rootNodes = doc.getElementsByTagName("templates");
      Node rootNode = rootNodes.item(0);
      Element rootElement = (Element) rootNode;
      NodeList templateList = rootElement.getElementsByTagName("template");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      System.out.println(templateElement.getAttribute("name")+ ".xml");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      String fileName = templateElement.getAttribute("name") + ".xml";
      Files.createFile(Paths.get(fileName));
      System.out.println("File" + ":" + fileName + ".xml created");
      } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (SAXException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

  • Generate multiple XML files from one Invoices file in AR Selected Invoices

    I have converted our Oracle EBS 11i Selected Invoice RAXINV.rdf to XML and created a template for XML Bursting. I'm bursting fine at the:
    /ZRAXINV/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_CF_NO/G_CF_NO. My question is since I'm writing out my pdf output invoices to the filesystem on Sharepoint; I also need to archive the XML part of each invoice broken down by the same group as .//LIST_G_CF_NO/G_CF_NO. When I convert the rdf to XML it produces one XML file from which I created the templates.
    My requirement is to archive both the individual invoices from the templates and the corresponding XML pieces on Sharepoint so that we will be able to search and link the xml to the pdf written out to the filesystem on Sharepoint.
    Any idea how should go about this requirement will be much appreciated.
    Thanks,
    Leo

    So how does it take this file
    file>
    <statement>
    <name>John Dow </name>
    <address>123 Main</address>
    <phone>972-213-3434</phone>
    </statement>
    <statement>
    <name>Jane Dow </name>
    <address>345 Main</address>
    <phone>972-213-3534</phone>
    </statement>
    <statement>
    <name>Marry Dow </name>
    <address>678 Main</address>
    <phone>972-213-3435</phone>
    </statement>
    </file>
    and create these three different one?
    1.)
    <statement>
    <name>John Dow </name>
    <address>123 Main</address>
    <phone>972-213-3434</phone>
    </statement>
    2.)
    <statement>
    <name>Jane Dow </name>
    <address>345 Main</address>
    <phone>972-213-3534</phone>
    </statement>
    3.)
    <statement>
    <name>Marry Dow </name>
    <address>678 Main</address>
    <phone>972-213-3435</phone>
    </statement>
    Is it not going to just grab each element after the file tag? I'm just confused about that.

  • How to modify an existing xml file from java code.

    Hi
    I have worked on creating a new xml file from java code using xmlbeans.But if i try to modify an already existing file using java code I am unable to get errorfree xmlfile.
    For example if xml file(studlist.xml) is as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <StudentList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\kchaitanya\xmlprac1\abc\Studlist.xsd">
         <Student>
              <Name>ram</Name>
              <Age>27</Age>
         </Student>
    <Student>
              <Name>sham</Name>
              <Age>26</Age>
         </Student>
    </StudentList>
    Now suppose i have set name to victor using student.setName,
    and set age to 20 using setAge from javacode,
    the new xml file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <StudentList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\kchaitanya\xmlprac1\abc\Studlist.xsd">
         <Student>
              <Name>ram</Name>
              <Age>27</Age>
         </Student>
    <Student>
              <Name>sham</Name>
              <Age>26</Age>
         </Student>
    </StudentList>
    <Student>
              <Name>victor</Name>
              <Age>20</Age>
         </Student>
    As observed this is not a valid xml file.But how can i modify without any errors?

    I know it's an old post, but I found this while doing a google search for something else, and don't like to leave it un-aswered
    Just in case anyone has a similar problem... In this case the new elements have been appended outside of the root element
    What you need to do is first get the root element and then append the new children to that, there are several ways of getting the root element, which depend on what you want to do with the elements you get back here's a simple (incomplete) way.
    // gets the root element of the specified file (code not shown)
    Element rootElement= new SAXReader().read(file).getRootElement();Then just append the new elements as below (this is non-generic code and would need to be modified for your situation)
    // write a new student element
    Element student = document.createElement("Student");  // creates the new student
    rootElement.appendChild(student); // ***appends it to the root element***
    Element name = document.createElement("Name"); // creates the name element
    name.appendChild(document.createTextNode("Fred")); // adds the name text to the name element
    student.appendChild(name); // appends the name to the student
    Element age= document.createElement("Age"); // creates the age element
    age.appendChild(document.createTextNode("26")); // adds the age text to the age element
    student.appendChild(age); // appends the name to the studentThen flush ya buffers or whatever and write the file
    Edited by: Dream-Scourge on Apr 23, 2008 11:10 AM

  • How do you get an xml file from the PO Output for Communication report?

    Can anyone tell me how you've created an xml output fil for this program? When I run it, the View XML button doesn't light up, and the output file is empty.
    I can see the XML when I click the View Log button, but can't figure out how to save it so that the XMLP Desktop tool can load it properly.
    If you can tell me how to create this file, I'd be very appreciative.

    Hi,
    I can't see the xml in my log file. Maybe you have a different logging level. One issue I have had before is that the xml declaration had a strange character encoding. It should say something like: <?xml version="1.0" ?>. If it mentions anything about encoding you can remove it.
    One of our developers wrote a custom process to write the xml to a table when the document was generated as we couldn't find any other way of doing it.
    You can use the sample xml available from the data definition but this is missing fields.
    Probably not much help...
    Paul

  • Generate to XML file from a SBO system form ....

    Hi gurus,
       If I remember right, a standard form (ex:A/R invoice, A/P invoice ...) in the SBO system, we can ganerate to XML file. But I don't remember how to do it, anybody know about it, pls help me, tell me ... pls. Thanks.

    Hello Andy,
    The answer of your question could be found in SAP samples, UI API sample 4.(default path C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB6\04.WorkingWithXML)
    The code is below.
    There are lots of samples delivered with SDK, and I think you would benefit a lot from them.
    HTH,
    Nick
    Private Sub SaveAsXML(Form As SAPbouiCOM.Form)
    '// Add a reference to "Microsoft XML, v3.0"
        Dim oXMLDoc As MSXML2.DOMDocument
        Dim sXMLString As String
        Set oXMLDoc = New MSXML2.DOMDocument
        '// get the form as an XML string
        sXMLString = Form.GetAsXML
        '// load the form's XML string to the
        '// XML document object
        oXMLDoc.loadXML (sXMLString)
        '// save the XML Document
        Dim sPath As String
        sPath = CurDir
        oXMLDoc.save (sPath & "MySimpleForm.xml")
    End Sub

  • How to generate a Text file from a Report

    Hi Friends,
    I need to generate a Text file foramat from my Report.My client is having a text file in a standard format.I need to Generate this Text file according to that text format.
    My requirement is For one production order there will be so many line items and for each line item based on its Quantity i need to generate serial numbers.
    For Ex for Production order 100 there r 3 line items.If 1st line item is of Quantity 20.I need to Generate 20 serial numbers for the 1st line item and the same for the remaining line items also.
    How can i proceed.I need to do dis based on the production order Number.
    In d selection screen i need to put the fields Production order Number and From:----
    To:----
      and u button Generate Text file.If I click on Generate Text file Text file should be generated.
    Thanks & Regards,
    Chitty.
    Edited by: chitty d on Mar 12, 2009 5:44 AM

    Hi,
    As far as i understand from your requirements, it like you need all the data item leve into a text file.
    You can fetch all the relevant data from variuos tables and then use  GUI_Download into a text file.

Maybe you are looking for

  • Does Time Machine save my songs from itunes?

    I am trying to buy a new MacBook but want to make sure everything important is saved from my Old Mac I backed up everything on Time Machine Using an external hardrive I just want to make sure all of my Itunes songs are backed up as well. Can anyone h

  • Surcharge on Net not update in PO line item

    Hi,   we had a problem in Surcharge on Net calculated as per condition value.  Some PO,s Surcharge+ Net value update in PO line item, some PO's not updating. I have checked all the configuration part. Validity periods maintained upto 9999. Info recor

  • I wasn to save my bookmarks in bookmark tab instead of unsorted bookmarks by default. What to do?

    Currently all my bookmarks are being saved in unsorted bookmarks bu default. I want to save my bookmarks in bookmark tab (as in google chrome) by default. what is to be done?

  • Syncing ipad 1

    I want to download the new itunes version to my PC so i can sync my ipad but friends have said that they lost their apps after doing so. Can i get the apps back that i paid for?

  • I want to love my new Incredible but...

    There are a couple of issues that I'm seeing that I can't get a straight answer from anyone I talk to at Verizon either on the phone at a store. 1 - Battery Life: I'll typically give my phone a full charge overnight. If, starting around 8:00 AM, I ha