Create XML file from ABAP with SOAP Details

I am new to XML and I am not familiar with JAVA or Web Service. I have searched in SDN and googled for a sample program for creating XML document from ABAP with SOAP details. Unfortunately I couldn't find anything.
I have a requirement for creating an XML file from ABAP with SOAP details. I have the data in the internal table. There is a Schema which the client provided and the file generated from SAP should be validating against that Schema. Schema contains SOAP details like Envelope, Header & Body.
My question is can I generate the XML file using CALL TRANSFORMATION in SAP with the SOAP details?
I have tried to create Transformation (Transaction XSLT_TOOL) in SAP with below code. Also in CALL transformation I am not able to change the encoding to UTF-8. It's always show UTF-16.
<xsl:transform xmlns:xsl="" xmlns:sap="" version="1.0">
  <xsl:template match="/">
    <SOAP:Envelope xmlns:SOAP="">
        <xsl:copy-of select="*"/>
In ABAP program, I have written below code for calling above Transformation.
  call transformation ('Z_ID')
       source tab = im_t_output[]
       result xml xml_out.
  call function 'SCMS_STRING_TO_FTEXT'
      text      = xml_out
      ftext_tab = ex_t_xml_data.
Please help me how to generate XML file with SOAP details from ABAP. If anybody have a sample program, please share with me.
Is there any easy way to create the XML file in CALL Transformation. Please help.

Try ABAP forum, as it seems not to be PI related.

Similar Messages

  • Creating XML-files in ABAP with format ISO-8859-1 after the use of unicode

    We have a problem with XML-files created in z_abap-programma.
    Before the use of unicode the XML-file was of the format: ISO-8859-1.
    After the introducting of unicode the format is UTF-16.
    In the abap-program we are using:
            CALL TRANSFORMATION xls-program
             SOURCE t_vbak = it_vbak
             RESULT XML xmlstring.
                text     = xmlstring
                buffer   = lx_xml_as_string.
                buffer        = lx_xml_as_string
                output_length = li_xml_size
                binary_tab    = ltb_xml_table.
            CALL METHOD cl_gui_frontend_services=>gui_download
                bin_filesize = li_xml_size
                filename     = lc_filename
                filetype     = 'BIN'
                data_tab     = ltb_xml_table
                OTHERS       = 24.
    Is it prossible to create the XML-file with the format ISO-8859-1 after the unicode, please can you explane how to solve this problem.
    Theo Pijlman

    hi theo,
    did you read my thread i wrote some days before ? have a look in my sample coding find   " if_ixml_encoding ..... " there you can set the encoding of character .
    Re: abap to xml
    SAP Explanation for Interface if_ixml_encoding :

  • Creating XML file from ABAP internal table data....

    I am fethcing data froma  custom table and I have to write data in XMl format. Following is the XML format in which I want data. Is there any function module iN SAP which will help me in writing data from internal table to XML file ?
    Please help.

    I suggest you look into "simple transformations". That's SAP's most recent technology for such purposes, as far as I know.

  • Creating an xml file from abap code

    Hello All,
    Please let me know which FM do I need to execute in order to create an XML file from my ABAP code ?
    Thanks in advance,

    This has been discussed before
    XML files from ABAP programs

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

  • Creating XML file from Java Bean

    Are there any standard methods in Java 1.5 to create XML file from java bean,
    i can use JAXB or castor to do so,
    But i would like to know if there is any thing in java core classes,
    I have seen XMLEncoder, but this is not what i want.
    Any ideas

    Marshall JavaBean to an XML document with JAXB or XMLBeans.

  • Create XML file from table data

    Dear All,
    with dataservice 4.0, I want to create an XML file from a table data.
    Table have a single column but more record, for example:
    My desired XML output:
    I try with a sample query but the sistem write only the last record in XML file:
    Can everyone help me?
    Thank in advance.

    That is a very simple (also odd) XML document structure, and as such doesn't require use of the XML target.  It can be easily acheived by writing a normal file with a header and footer, which is acheived using a row_generation and a query to generate the hard coded open and close tags.

  • How to create xml file from original

    I have this complicated xml and I want to search through it and make a new xml with only element I find that match. what is the best way to do this? the file
    is about 6mb and I want to read the whole file easily..should i load to database table and create a file from table? I have found issues reading the file..
    - <ArrayOfJobClass xmlns:xsi="" xmlns:xsd="">
    - <JobClass>
    - <Triggers>
    - <TriggerClass>
    - <TTime>
    - <IntervalDays>

    You can load it in the database in an XMLType table (Object-Relational or Binary XML storage), use XQuery on the XML content and then write back the result to a file.
    Or, you might just use an external processor (XSLT or XQuery).
    If you want to stay in the Oracle world, you can use :
    - For XSLT : $ORACLE_HOME/bin/oraxsl (it's a wrapper for the java XSLT engine)
    - For XQuery : the java XQuery API
    Personally, I sometimes use the Saxon XSLT and XQuery processor, quite efficient.
    Here's a simplistic example with oraxsl utility :
    <?xml version="1.0" encoding="UTF-8"?>
      <emp id="7369">
      <emp id="7499">
      <emp id="7521">
      <emp id="7566">
      <emp id="7654">
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="">
    <xsl:output method="xml"/>
    <xsl:template match="text()"/>
    <xsl:template match="emps/emp[job='SALESMAN']">
      <xsl:copy-of select="."/>
    </xsl:stylesheet>Applying the transformation to search and extract all "salesmen" :
    D:\ORACLE\test>%ORACLE_HOME%\bin\oraxsl emp.xml emp.xsl result.xml
    D:\ORACLE\test>type result.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <emp id="7499">
      </emp><emp id="7521">
      </emp><emp id="7654">

  • Create XML file from XSD

    can anybody help me with generating an empty tagged XML file from a XSD file. Any sample java code will be highly appreciated.
    Thanx in advance.
    A .

    Apache XML Beans presents a way to compile the XSD Schema and generate Java classes for each element defined in the schema. With these interface you can then create new XML instances from the schema. (

  • Create .xml file from a java file

    I wanted to know how can we create a .xml file through java with the given data.
    For example: book saler.
    data given through java are
    1)Sl no
    2)Book name
    3Book type
    4)Book price
    i want a xml file generated through the java code
    can anyone help me out?

    i have done like this..
    but the problem with this is i want to add more than one book details. i am able to add only one book detais..
    package name:createxml
    main and
    package createxml;
    import java.util.Vector;
    public class GenerateOrderXml {
         public static void main(String[] args) {
              Order order= new Order();
              CreateXml xml=new CreateXml();
              Vector orders=new Vector();
              order.setPublisher("Deepak publishers");
              order.setPublisher("Deepak ");
              catch(ArrayIndexOutOfBoundsException e)
    package createxml;
    import org.jdom.*;
    import org.jdom.output.XMLOutputter;
    import java.util.Vector;
    * @author divyashree
    * To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Generation - Code and Comments
    public class CreateXml {
         public void creatxml(Vector orders)
                   Element root = new Element("BookSaler");          
                   Order order= new Order();          
                   Element BName = new Element("Bookname1");
                   Element AName = new Element("Authorname");
                   Element isbn = new Element("ISBN");
                   Element price = new Element("Price");
                   Element publisher= new Element("Publisher");
                   Element BName1 = new Element("Bookname2");
              Element AName1 = new Element("Authorname");
              Element isbn1 = new Element("ISBN");
              Element price1 = new Element("Price");
              Element publisher1= new Element("Publisher");
              Document doc = new Document(root);
              try {
                   XMLOutputter serializer = new XMLOutputter();
                   serializer.setIndent(" ");
                   serializer.output(doc, System.out);
              catch (IOException e)
         }catch(ClassCastException e)
    package createxml;
    import java.util.Vector;
    public class Order {
         protected String ISBN="";
         protected String BookName="";
         protected String AuthorName="";
         protected String No_of_copies;
         protected String price;
         protected String Publisher="";
         public String getISBN()
              return this.ISBN;
         public String getBookName()
              return BookName;
         public String getAuthorName()
              return AuthorName;
         public String getNo_of_copies()
              return No_of_copies;
         public String getprice()
              return price;
         public String getPublisher()
              return Publisher;
         public void setISBN(String isbn)
              Vector vec_isbn= new Vector();
         public void setBookName(String bookname)
         public void setAuthorName(String authorname)
         public void setNo_of_copies(String no_of_copies)
         public void setprice(String Price)
         public void setPublisher(String publisher)

  • Create XML file from Oracle DB

    I'm working in a task to create electronic billing for Mexico Rules, to do this; I need to create a XML source that will contain all the information requested from Oracle DB.
    For this reason, I'm looking how to create this XML file from Oracle DB.
    All this is for the new legislations rules in Mexico to use electronic billing.
    Please, if you have any reference about this, let me know.
    Thanks and regards.

    you may want to check out commands like xmlforest and xmlelement
    copied from documentation
    XMLForest converts each of its argument parameters to XML, and then returns an XML fragment that is the concatenation of these converted arguments.
    •If value_expr is a scalar expression, then you can omit the AS clause, and Oracle Database uses the column name as the element name.
    •If value_expr is an object type or collection, then the AS clause is mandatory, and Oracle uses the specified c_alias as the enclosing tag. The c_alias can be up to 4000 characters.
    •If value_expr is null, then no element is created for that value_expr.
    The following example creates an Emp element for a subset of employees, with nested employee_id, last_name, and salary elements as the contents of Emp:
    XMLFOREST(e.employee_id, e.last_name, e.salary))
    "Emp Element"
    FROM employees e WHERE employee_id = 204;
    Emp Element

  • How to create .csv file from ABAP report

    We have a requirement to generate .csv file from abap report.
    Currently user saves data from abap report to spreadsheet(.xls format) in desktop.  Then opens excel file and save as .csv format.  Need option to save directly in .csv format instead of .xls format.
    Please let me know, if there is any standard function module available to create .csv file.

    I tried with your code it's going to dump
    REPORT ZTEMP101 message-id 00.
    tables: lfa1.
    types: begin of t_lfa1,
          lifnr like lfa1-lifnr,
          name1 like lfa1-name1,
          end of t_lfa1.
    data: i_lfa1 type standard table of t_lfa1,
          wa_lfa1 type t_lfa1.
    types truxs_t_text_data(4096) type c occurs 0.
    data: csv_converted_table type table of TRUXS_T_TEXT_DATA.
    select-options: s_lifnr for lfa1-lifnr.
    select lifnr name1 from lfa1 into table i_lfa1
           where lifnr in s_lifnr.
       I_FIELD_SEPERATOR          = ';'
             I_LINE_HEADER              =
             I_FILENAME                 =
             I_APPL_KEEP                = ' '
        I_TAB_SAP_DATA             = I_LFA1
       I_TAB_CONVERTED_DATA       = csv_converted_table
       CONVERSION_FAILED          = 1
       OTHERS                     = 2
    IF SY-SUBRC <> 0.
      BIN_FILESIZE                  = ' '
      CODEPAGE                      = ' '
       FILENAME                      =
       'C:\Documents and Settings\ps12\Desktop\Test folder\exl.cvs'
      FILETYPE                      = 'DAT'
      MODE                          = ' '
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
      COL_SELECT                    = ' '
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
      FILELENGTH                    =
        DATA_TAB                      = csv_converted_table
      FIELDNAMES                    =
      FILE_OPEN_ERROR               = 1
      FILE_WRITE_ERROR              = 2
      INVALID_FILESIZE              = 3
      INVALID_TYPE                  = 4
      NO_BATCH                      = 5
      UNKNOWN_ERROR                 = 6
      INVALID_TABLE_WIDTH           = 7
      CUSTOMER_ERROR                = 9
      OTHERS                        = 10
    IF SY-SUBRC <> 0.
    my version is 4.6c

  • Create XML File from a specified XSD file

    I'd like to create an XML document with java. BUT How can we "bind" this creation with a XSD file. Hence, the creation may fail if the XSD binded file is not respected.
    So I know how to create XML file but not bind to this creation my proper XSD file (XML schema). With which tool can I do this ?

    I'd like to create an XML document with java. BUT How can we "bind" this creation with a XSD file. Hence, the creation may fail if the XSD binded file is not respected.
    So I know how to create XML file but not bind to this creation my proper XSD file (XML schema). With which tool can I do this ?

  • How to create xml file from relational tables in 10gR2

    I am very new to XML and was wondering how to create an XML file from querying relational tables. Some child tables may contain multiple rows that need to be returned in certain instances. Other queries will just be single or multiple rows from one or more tables. I would like to use the latest feathers in 10gR2. Thanks for any help you can provide.

    Here is the first row of data created from our person table - it used the column names as the tag names:
    <?xml version="1.0"?>

  • Can not create XML file from MS Access 2003

    I am getting error as "Error loading in DLL" when I use msaccess_exporter to create XML file for migrations usind Access 2003 DB. Does anyone know about this? If yes, could you please let me know how to resolve it?

    Hi Daniel,
    I believe you are seeing the message "Table'_OracletblDatabase' already exists" because you are attempting to export an MDB file that you previously attempted to export, but that initial export process may not have run to completion. I recommend opening your .MDB file, and delete any "_Oracletbl..." table objects that exist under the list of Table objects. Close the MDB file and carry out the export process again. You should now be able to use the 2000 mde file.
    I hope this helps.

Maybe you are looking for