Creating XML format

Hi  All,
Can anyone please explain what is the difference between creating an XML format from an internal table using  CALL TRANSFORMATION and using CLASS BUILDER?
In  class builder  we have  to Create the main iXML factory , then Create a stream factory and streams etc..
Can  call transformation id
  source SOURCE = SOURCE
  result xml XML_RESULT.   be  used  as  a  replacement  for  the  above?

yes

Similar Messages

  • Creating xml format file with double dagger ‡ as delimiter

    Hi,
    My source files are delimited with double dagger (‡) and I am using openrowset to load the files to SQL Server. When I am creating the format file by specifying the delimiter as ‡, the format file created has a different delimiter than the specified one.
    The new delimiter appearing in xml format file is ç.
    Any help?
    TIA
    Nitesh Rai- Please mark the post as answered if it answers your question

    How did you create format file?
    Try this method and see if it works
    http://visakhm.blogspot.com/2013/10/generate-format-files-based-on-table.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Create XML format file in bulk insert with a data file with out delimiter

    Hello
    I have a date file with no delimiter like bellow
    0080970393102312072981103378000004329392643958
    0080970393102312072981103378000004329392643958
    I just know 5 first number in a line is for example "ID of bank"
    or 6th and 7th number in a line is for example "ID of employee"
    Could you help me how can I create a XML format file?
    thanks alot

    This is a fixed file format. We need to know the length of each field before creating the format file. Say you have said the first 5 characters are Bank ID and 6th to 7th as Employee ID ... then the XML should look like,
    <?xml version="1.0"?>
    <BCPFORMAT xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <RECORD>
      <FIELD ID="1"xsi:type="CharFixed"LENGTH="5"/>
      <FIELD ID="2"xsi:type="CharFixed"LENGTH="2"/>
      <FIELD ID="3" xsi:type="CharFixed" LENGTH="8"/>
      <FIELD ID="4" xsi:type="CharFixed" LENGTH="14"/>
      <FIELD ID="5" xsi:type="CharFixed" LENGTH="14"/>
      <FIELD ID="6" xsi:type="CharFixed" LENGTH="1"/>
    </RECORD>
    <ROW>
      <COLUMNSOURCE="1"NAME="c1"xsi:type="SQLNCHAR"/>
      <COLUMNSOURCE="2"NAME="c2"xsi:type="SQLNCHAR"/>
      <COLUMN SOURCE="3" NAME="c3" xsi:type="SQLCHAR"/>
      <COLUMN SOURCE="4" NAME="c4" xsi:type="SQLINT"
    />
      <COLUMN SOURCE="5" NAME="c5" xsi:type="SQLINT"
    />
    </ROW>
    </BCPFORMAT>
    Note: Similarly you need to specify the other length as well.
    http://stackoverflow.com/questions/10708985/bulk-insert-from-fixed-format-text-file-ignores-rowterminator
    Regards, RSingh

  • I am creating a form on LiveCycle Designer and I am trying to create a form that has a e-mail submit button.  When the butten is utilized it attaches the form to the e-mail in an plain text .xml format rather than the pdf format.  Is there a quick fix?

    I am creating a form on LiveCycle Designer and I am trying to create a form that has a e-mail submit button.  When the button is utilized it attaches the form to the e-mail in an plain text .xml format rather than the pdf format.  Is there a quick fix?

    Hi,
    You have the choice between xml or pdf, in later versions of designer you can choose with a dropdown on the email button Object palette, the "Submit As";
    In earlier version you had to edit the XML Source and change the format from xml to pdf (or vice-versa);
    Regards
    Bruce

  • Strange issue creating a BCP xml format file with double dagger '‡' (alt + 0135) as column terminator with bcp.exe

    Hi,
    I'm having issues generating a BCP XML format file using a fairly unusual column terminator, a double dagger symbol
    ‡ (alt + 0135) which I need to support.
    I'm experiencing this problem with bcp.exe for SQL2008 R2 and SQL2012.
    If I run the following command line:
    bcp MyDB.TMP.Test_Extract format nul -c -x -f "C:\BCP\format_file_dagger_test.xml" -T -S localhost\SQL2012 -t‡
    I end up with a XML format file like so:
    <?xml version="1.0"?>
    <BCPFORMAT xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <RECORD>
      <FIELD ID="1" xsi:type="CharTerm" TERMINATOR="ç" MAX_LENGTH="255" COLLATION="SQL_Latin1_General_CP1_CI_AS"/>
      <FIELD ID="2" xsi:type="CharTerm" TERMINATOR="ç" MAX_LENGTH="50" 
    .. and so on.
    You will notice that the TERMINATOR="ç" (Minuscule c-cedilla) is output instead of TERMINATOR="‡". The
    ç character, is strangely enough is alt + 135 (and not alt + 0135) so this might more than a coincidence! I know you can specify the codepage but this switch applies the data being imported or extracted and not for the format file
    itself (I tried it anyway). 
    In order to use the XML file to bulk import I manually did a text substitution of 'ç' character for '‡' and then BCP imports '‡' data fine. 
    This character swap doesn't occur if I generate a non XML format file (the '‡' character is output in the format file correctly) however, this file produces other import errors, which I don't encounter if I use a standard delimiter like a comma. So I have stuck
    with the working XML format file which I prefer.
    Does anyone know why this is happening? I'm planning to automate the generation the of the XML format file and would like to avoid the additional step of text substitution if possible.
    Thank you.

    Hi Ham09,
    According to your description , we do a test and find that the character of the terminator is changed due to the code page of Operation System. When you choose the different time zone in Data and Time bar, and do the same bcp test, you will find it will
    export the different TERMINATOR in your XML format file. For example, you can import the character "ç" (alt + 135) in (UTC-12:00)International Date Line West time zone and (UTC+09:00)Osaka, Sapporo, Tokyo time zone, and check if the terminators are different.
    By default, the field terminator is the tab character (represented as \t). To represent a paragraph mark, use \r\n.
    For more information, there is detail about code page(Windows), you can review the following article.
    http://msdn.microsoft.com/en-us/library/windows/desktop/dd317752(v=vs.85).aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • How to create xml file through SDK?

    Hi,
    I need help in creating the xml file using SAP B1 SDK?
    i want to create xml file which is in tally xml format.
    Warm Ragards,
    Mahendra

    Hi Mahendra,
    This is an example to save a form as XML :
    try
                    System.Xml.XmlDocument oXmlDoc = null;
                    string sXmlString = null;
                    oXmlDoc = new System.Xml.XmlDocument();
                    // get the form as an XML string
                    sXmlString = Form.GetAsXML();
                    // load the form's XML string to the
                    // XML document object
                    oXmlDoc.LoadXml(sXmlString);
                    string sPath = null;
                    sPath = System.IO.Directory.GetParent(System.Windows.Forms.Application.StartupPath).ToString();
                    sPath = System.IO.Directory.GetParent(sPath).ToString();
                    // save the XML Document
                    oXmlDoc.Save((sPath + @"\Form" + sType + ".xml"));
                    //oXmlDoc.Save(DIRECTORY_TEMPLATE + "Form" + sType + ".xml");
                catch (Exception ex)
                    SBO_Application.MessageBox("ERROR in 'SaveAsXML()' : " + ex.Message, 1, "Ok", "", "");
    And an example to navigate in the XML file :
    System.Xml.XmlDocument xxml;
                                    System.Xml.XmlNode node;
                                    System.Xml.XmlNodeList nodes;
                                    xxml = new System.Xml.XmlDocument();
                                    xxml.LoadXml(oRecAU.GetAsXML());
                                    nodes = xxml.SelectNodes("BOM/BO/IFC_AU/row");
                                    foreach (System.Xml.XmlNode node in nodes)
                                        oColumn.ValidValues.Add(node.SelectSingleNode("Code").InnerText, node.SelectSingleNode("Name").InnerText);
    I hope it's help you.
    Regards
    Michael

  • Scratch 22: Creating XML Publisher report from scratch in eBS

    Problem:
    How to build a XML Publisher (XMLP) report in eBS from scratch. Thus NOT adapting or converting an existing report.
    Context:
    I have an eBS R12 Vision instance up and running where I want to learn building XMLP reports.
    This is what all tutorials I can find tell me to do:
    Most reports apparently consist of a layout template e.g. TEST.rtf and a data template e.g. TEST.xml. Now in order to generate a new report layout I am supposed to take existing output in XML format and (using ‘Load Data’ function in Template Builder plugin in Word) specify in my layout template where and how I want the actual data to pop up. So far so good.
    But now I want to build the data template from scratch and use it combined with a layout template. So I build the data template but can’t use that for building the layout template. For that I need output, for which I need a layout template.....
    Sounds like Catch 22 to me. How do I break this?
    1. Can I generate an XML-output file from the XML Data Template alone?
    2. Can I build my (RTF) layout template directly based upon the XML Data Template?
    3. Or have I completely lost the plot?
    Oh yes, dunno the first thing about Java and do not have My Oracle Support..
    Edited by: rjvencken on Jul 5, 2012 10:39 AM
    Edited by: rjvencken on Jul 5, 2012 10:51 AM

    1. Can I generate an XML-output file from the XML Data Template alone?
    create data definition with your data template-> create concurrent -> output as xml -> run -> view output and your xml
    I thought the XDODTEXE engine would pick up the (Layout) Template through concurrent program definition CPD short name which in turn points to the Data Definition (and thus Data Template). So does your answer mean I can call straight from CPD to Data Definition? I tried registering my Data Template in the Template Tab but it will not take XML as a type.2. Can I build my (RTF) layout template directly based upon the XML Data Template?
    if you want to use xml publisher desktop then you need xml (with data, not definition)
    So that's not an option I understand. Weird cuz I'd expect this to be technically easier.btw you can create your layout (rtf) without xml (data) and without data template (xml with select statement)
    create filed and past tag definition
    Yes but in that case I'd have an empty report. How would that help me?bouble click on filed:
    "Text Form Field Options" -> "Add Help Text ..." -> "Status Bar" (tab) -> "Type your own:"
    if you use bi publisher desktop plugin
    bouble click on filed:
    "BI Publisher Properties" -> "Advanced" -> "Code"
    or switch to Word Properties
    "BI Publisher Properties" -> "Word Properties" and use above path
    3. Or have I completely lost the plot?
    may be ;)

  • How to generate Campaign details in XML format for sending to downstream sy

    Dear gurus,
    we have a requirement to send the Campaign details from CRM to some Downstream system in the XML format through PI interfaces. We want to include the following campaign details in the structure.
    <SAPTOAL DATE="03-MAR-2011" TIME="13:25pm">
          <CAMPAIGN>
                <ID></ID>
                <NAME></NAME>
                <RUNDATE></RUNDATE>
                <RUNTIME></RUNTIME>
                <STARTDATE></STARTDATE>
                <ENDDATE></ENDDATE>
                <RECORDCOUNT></RECORDCOUNT>
          </CAMPAIGN>
          <TARGETGROUP>
                <ID></ID>
                <NAME></NAME>
    </TARGETGROUP>
          <BUSINESSPARTNERS>
                <BUSINESSPARTNER>
                      <ID>001</ID>
                <TARGETGROUPID></TARGETGROUPID>
                <FIRSTNAME></FIRSTNAME>
                      <LASTNAME></LASTNAME>
                      <TITLE></TITLE>
                      <SUFFIX></SUFFIX>
                      <EMAIL></EMAIL>
                      <REPFIRSTNAME></REPFIRSTNAME>
                      <REPLASTNAME></REPLASTNAME>
                      <REPPHONE></REPPHONE>
                      <REPSIGNATUREURL></REPSIGNATUREURL>
                      <REPPICTUREURL></REPPICTUREURL>
                      <REPEMAIL></REPEMAIL>
                </BUSINESSPARTNER>
                <BUSINESSPARTNER>
                      <ID>002</ID>
                <TARGETGROUPID></TARGETGROUPID>
                      <FIRSTNAME></FIRSTNAME>
                      <LASTNAME></LASTNAME>
                      <TITLE></TITLE>
                      <SUFFIX></SUFFIX>
                      <EMAIL></EMAIL>
                      <REPFIRSTNAME></REPFIRSTNAME>
                      <REPLASTNAME></REPLASTNAME>
                      <REPPHONE></REPPHONE>
                      <REPSIGNATUREURL></REPSIGNATUREURL>
                      <REPPICTUREURL></REPPICTUREURL>
                      <REPEMAIL></REPEMAIL>
                </BUSINESSPARTNER>
          </BUSINESSPARTNERS>
    </SAPTOAL>
    We have already tried the following things in SPRO.
    CRM --> Marketing --> Marketing Planning and Campaign Management --> Campaign Execution --> Define File Export Variants
    But with this we were not able to get the full XML structure, as required above. We got only this much.
    <?xml version="1.0" encoding="utf-8" ?>
    <DATA>
    <ITEM>
       <Field_1>Test Email.</Field_1>
       <Field_2>Test Email.</Field_2>
       <Field_3>ABC Company.</Field_31>
    </ITEM>
    </DATA>
    Any pointers or help on this will he greatly appreciated.rgrds,
    Randhir Soni

    Hi Prabhu,
    The program SAPFPAYM generates the payment Medium  on the basis of your configuration and background settings, this program does not bydefault give the output in the XML.
    Varient creation for the PMW in T. Code OBPM4, use the same program, which i already done it, even without this it is not be possible to create any payment Medium.
    Regards,
    Rony

  • Problem with getting a D2K report in XML format

    Hi all,
    Could any body give a solution for this problem.
    I have a matrix report like following:
    Q_Statement_Of_Net_Assets ----> main query
    |
    G_Cross ----> Cross product
    | CS_VALUE
    | CS_NET_ASSET
    | CF_COSTI
    |
    | --------------------------------- |
    | | G_CTIF | | ------> Like this I have two more groups
    | --------------------------------- |
    ...... |
    -----------------------------------------------|
    My requirement is i want to print CS_VALUE, CS_NET_ASSET, CF_COSTI values in XML report, these values i am getting in a Normal/RTF format reports.
    But i am not getting in XML format report.
    thanks in advance.
    Vasu

    Thanks Schellyc
    actually I want to creat a new SOAPMessage for the very beginning like this:
    try{
                MessageFactory mf = MessageFactory.newInstance();
                SOAPMessage msg = mf.createMessage();
                SOAPPart sp = msg.getSOAPPart();
                //create the header container
                SOAPEnvelope se = sp.getEnvelope();
                SOAPHeader sh = se.getHeader();
                SOAPBody sb = se.getBody();
            }catch(Throwable e) {
                e.printStackTrace();
            }and I want to get the empty header from this newly created SOAPEnvelop and add my own content into the header as well as the empty body.
    I wrote the code by following the example from the jaxm api.
    can anybody tell me any further information about the NullPointerException?

  • How can I convert IDoc in XML format w/DTD into a string?

    I want to send by e-mail outbound IDoc in XML format with its document type definition (DTD).
    I want to be able to get the same output result into a string than the XML file IDoc port type with DTD activated.  I have created a FM (based on SAP "OWN_FUNCTION") assigned to an IDoc port of type ABAP-PI that executes the following processing steps:
    1-Extract outbound IDoc information to get the sender & recipient mail addresses (EDP13 / EDIPHONE tables).
    2-Convert & Transform IDoc data into XML string using FM IDX_IDOC_TO_XML.
    3-Prepare and send e-mail with XML attachement using FM SO_NEW_DOCUMENT_ATT_SEND_API1.
    I cand generate the e-mail with the XML file attachement but FM IDX_IDOC_TO_XML does not convert the IDoc with proper formating and DTD.
    What should I use to accomplish the IDoc conversion to XML w/DTD into a string?
    Should I use XSLT tools ?
    How does that work?
    Thank you
    Carl

    muks wrote:
    Use decimal string to number
    Specifically, you can define a constant with a different datatype on the input on the lower left if you need a different datatype (e.g. U8, I64, DBL, etc) Are all your values integers or do you also need to scan fractional numbers? In this case, you should use "fract/exp string to number" instead.
    LabVIEW Champion . Do more with less code and in less time .

  • Heap space error while creating XML document from Resultset

    I am getting Heap space error while creating XML document from Resultset.
    It was working fine from small result set object but when the size of resultset was more than 25,000, heap space error
    I am already using -Xms32m -Xmx1024m
    Is there a way to directly write to xml file from resultset instead of creating the whole document first and then writing it to file? Code examples please?
    here is my code:
    stmt = conn.prepareStatement(sql);
    result = stmt.executeQuery();
    result.setFetchSize(999);
    Document doc = JDBCUtil.toDocument(result, Application.BANK_ID, interfaceType, Application.VERSION);
    JDBCUtil.write(doc, fileName);
    public static Document toDocument(ResultSet rs, String bankId, String interfaceFileType, String version)
        throws ParserConfigurationException, SQLException {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = factory.newDocumentBuilder();
            Document doc = builder.newDocument();
            Element results = doc.createElement("sims");
            results.setAttribute("bank", bankId);
            results.setAttribute("record_type", "HEADER");
            results.setAttribute("file_type", interfaceFileType);
            results.setAttribute("version", version);
            doc.appendChild(results);
            ResultSetMetaData rsmd = rs.getMetaData();
            int colCount = rsmd.getColumnCount();
            String columnName="";
            Object value;
            while (rs.next()) {
                Element row = doc.createElement("rec");
                results.appendChild(row);
                for (int i = 1; i <= colCount; i++) {
                    columnName = rsmd.getColumnLabel(i);
                    value = rs.getObject(i);
                    Element node = doc.createElement(columnName);
                    if(value != null)
                        node.appendChild(doc.createTextNode(value.toString()));
                    else
                        node.appendChild(doc.createTextNode(""));
                    row.appendChild(node);
            return doc;
    public static void write(Document document, String filename) {
            //long start = System.currentTimeMillis();
            // lets write to a file
            OutputFormat format = new OutputFormat(document); // Serialize DOM
            format.setIndent(2);
            format.setLineSeparator(System.getProperty("line.separator"));
            format.setLineWidth(80);
            try {
                FileWriter writer = new FileWriter(filename);
                BufferedWriter buf = new BufferedWriter(writer);
                XMLSerializer FileSerial = new XMLSerializer(writer, format);
                FileSerial.asDOMSerializer(); // As a DOM Serializer
                FileSerial.serialize(document);
                writer.close();
            } catch (IOException ioe) {
                ioe.printStackTrace();
            //long end = System.currentTimeMillis();
            //System.err.println("W3C File write time :" + (end - start) + "  " + filename);
        }

    you can increase your heap size..... try setting this as your environment variable.....
    variable: JAVA_OPTS
    value: -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m

  • Convert PDF to XML Format . Can´t get it working :(

    Hi everybody,
    I am a Rocky in Acrobat Scriptingand I need some helpd to convert a PDF file into an XML format using the build in javascript console.
    The only thing I got so far is:
    this.saveAs("/e/test.xml","com.adobe.acrobat.xml-1-00")
    I got this information from the refrence guide, but I did not find an accurate example. Can you lend me a hand ? If you find a solution can you also explain me the different sections of the code because I still want to learn something besides using the copy and paste option.
    Thank you very much:
    Roland

    Bernd Alheit wrote:
    What happens when you try it?
    The problem is I tried it several times, but nothing happens at all.  The reference guide mentioned a second file with the ending *.xls will be created but nothing happens at all. Can you help me out ?

  • DME file in XML format in SAP 4.6C

    Hi Experts,
    For a Belgium client, I have a requirement to generate DME file in XML format for payments made to foreign and domestic vendors.  I want to know the following,
    1.  Can DME file be generated in XML format using classic payment medium programs RFFOBE_E and RFFOBE_I.
    2.  If not why and what are the other options.
    3.  I also came to know that there is an options of using Payment medium workbench - through XML format trees BE_BEPDTA and BE_PIBDTA.  But since we are in 4.6C, i am not able to create a payment format.  Is there any support package or patch that is required.
    4.  I tried for SEPA_CT - again a XML format tree but was not very successful as that too was not available in SAP 4.6C.  Is there any way that I can get this done in 4.6C - any support packages or patches available?
    Thanks

    Hi Kaylan,
    could you please share that documentation with me too.
    Thanks, Regards,
    Alex Cardona

  • Create XML file on application server (unix directory) from internal table

    Hallo everybody,
    I have got the following problem:
    I am working with <u><b>release 4.6C</b></u> and have got to create XML files from HR master data and organizational data respectively.
    This takes place in 3 steps:
    1.     Collect the data in an internal table
    2.     Convert the data to XML format using the function module 'SAP_CONVERT_TO_XML_FORMAT'
    3.     Download the data
    If I download the converted data, which are in an internal table, to the presentation server via the function module ‘WS_DOWNLOAD’ and open it with the Internet Explorer, everything is ok.
    If I download the converted data to the application server, i.e. into a unix directory via
    ‘open dataset’, ‘loop at internal table, ‘transfer working area to file’, ‘close dataset’
    and then try to open it, this is not possible, because after the last tag some unreadable characters, e.g. a square, appear that aren’t supposed to be there. That’s what my colleagues told me, for I haven’t got access to the server.
    I have no idea where these characters come from and how I can get rid of them. I guess that either I have to modify (how?) the table with the converted data before the download or I have to use another way to convert the data. For the second way I would probably have to work with an XML class or an XML interface. Unfortunately I’I am not an expert in working with classes so sample coding would have to be rather detailed.
    Here’s some more information about how I work with the conversion function module:
      call function 'SAP_CONVERT_TO_XML_FORMAT'
           exporting
                i_field_seperator    = lv_field_seperator
               i_line_header        = lv_line_header
               i_filename           = lv_xml_file
               i_appl_keep          = ' '
                i_xml_doc_name       = lv_xml_doc_name
           importing
                pe_bin_filesize      = lv_result
           tables
                i_tab_sap_data       = gt_data
           changing
                i_tab_converted_data = lt_tab_converted_data
           exceptions
                conversion_failed    = 1
                others               = 2.
    lv_field_seperator = ‘X’.
    lv_xml_doc_name = ‘Personalstammdaten Publikation’
    lv_result: type i
    gt_data: fields: PERNR, PERSG, PERSK etc.
      types:
      begin of truxs_xml_line,
        data(256) type x,
      end of truxs_xml_line.
      types:
      truxs_xml_table type table of truxs_xml_line.
    data:
    lv_tab_converted_data type truxs_xml_line,
    lt_tab_converted_data type truxs_xml_table
    open dataset lv_xml_file for output in binary mode.
    loop at lt_tab_converted_data into lv_tab_converted_data.
      transfer lv_tab_converted_data to lv_xml_file.
    endloop.
    close dataset lv_xml_file
    lv_xml_file: /usr/users/.../.../Personendaten_2004-11-02.xml
    Hope the information is detailed enough! Otherwise let me know. Thank you in advance.
    Message was edited by: Johannes Schwehm

    Hi Raja,
    tried the "TEXT" mode, but that didn't help.
    There are still characters after the last tag, that are not supposed to be there including a date that is not
    the creation date of the file.
    Thank you for your help.
    Regards
    Johannes

  • Create XML File with codepage (not UNICODE)

    Hi all ,
    I'm using the SDIXML_DATA_TO_DOM function module to create a xml format from an internal table, finally I write the internal table in xml format to file in the application server.
    Finally I get a file in XML format in UTF-8 (UNICODE), but I have to convert the UTF-8 into other codepage because the file is send to other system which not familiar with the UNICODE.
    Does anyone knows how to convert the codepage for the xml internal table ?
    Thanks,
    Yaki

    Another option rather than converting it after the fact is to have it create the XML file in the encoding that you want to begin with.  It looks like this function module you mention will either accept a pointer to a XML document object or create one for you.  I would suggest that you go ahead and create a document yourself and pass it to the function module.
      ixml = cl_ixml=>create( ).
      document = ixml->create_document( ).
    You can then call the method SET_ENCODING of the class IF_IXML_DOCUMENT.  The encoding itself is another class of type IF_IXML_ENCODING.  You can set the character set in this object using method SET_CHARACTER_SET.

Maybe you are looking for