ABAP to XML Transformation Dynamic Element Generation

Hi all,
I have created a deep structure and used simple transformation in XSLT Tool to create XML file. But I would like to generate some elements dynamically. Desired XML output is in the attachments.
There is a way to do that if had used XSLT Program instead of simple transformation (dynamic xml nodes using xslt - Stack Overflow) but XSLT Program does not create fields from structures automatically like simple transformation.
So, is there any way to do that using simple transformation ?
Thanks.

The error is related to your web browser software or release, because it can't support utf-16 xml file (for example, IE 6 doesn't support it).
Your output file contains <?xml version="1.0" encoding="utf-16"?> in your ECC 6 system because your SAP system is Unicode, and you used a variable of character type behind RESULT XML. When it's character, SAP converts the XML into SAP code page. If you use a byte type behind RESULT XML, SAP doesn't convert, and you'll get the XML data in the encoding of the transformation (defined here: <xsl:output encoding="ISO-8859-1" ...).
I guess you have choosen ISO-8859-1 because your 4.7 system issued a file with that encoding.
So, the only thing you have to do, in the call transformation statement, is to store the result into a table of X255 (instead of table of CHAR2048).
Edited by: Sandra Rossi on Jul 6, 2010 4:14 PM CET:
You must also download using filetype = 'BIN'

Similar Messages

  • Xml transformation of element attributes ?

    I have already build a succesfull transformation with an xml file I could define myself.
    now I get an xml file out of another software pacakge that I also try to transform into tables.
    the structure is totally different since this vendor puts all the fields as attributes in an element ?
    is it also possible to transform these kind of structures ??
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    - <asx:abap xmlns:asx="http://www.sap.com/abapxml">
    - <asx:values>
    - <RECORDS>
    - <RECORD>
      <ROW KP_nummer="8" KP_naam="Correcties Postkamer" Debiteuren_nummer="6364" Vaste_Kosten="Retour pakket" Datum="20100104" Aantal="2" Bonnummer="4596834" Toeslag_Intern="0,833" BTW_Percentage="19" Netto_Intern="10,0674" Gewicht="0" Toeslag_extern="0" BTW_percentage_extern="19" Netto_extern="9,2344" />
      </RECORD>
    - <RECORD>
      <ROW KP_nummer="8" KP_naam="Correcties Postkamer" Debiteuren_nummer="6364" Vaste_Kosten="Strafport Binnenland incidenteel" Datum="20100105" Aantal="1" Bonnummer="14258" Toeslag_Intern="0,0528" BTW_Percentage="0" Netto_Intern="1,8128" Gewicht="0" Toeslag_extern="0" BTW_percentage_extern="0" Netto_extern="1,76" />
      </RECORD>
      </RECORDS>
      </asx:values>
      </asx:abap>
    kind regards
    arthur

    we found another sollution and changed the export of the other system.

  • XML Transformation - Dynamic tags?

    Hi All,
    I am trying to dynamically generate an xml tag based on a parameter.
    I.e.   <tt:root name="V_TYPE"/>    where V_TYPE = MyTag
    I am trying to generate the following from the transformation.
    <MyTag>.... </MyTag>
    Any help would be much appreciated.
    Regards,
    Jason

    Hi Rafael,
    Well its actually a call transformation from an event within table maintenance.
    The table is generic such that the tag names and values are specified by fields in the table.  Ie. 3 fields.
    1) Block
    2) Tag
    3) Value
    I want to generate XML that looks like.
    <Block>
      <Tag>Value</Tag>
    </Block>
    Regards,
    Jason

  • XML transformation using XSLT and Resin 2.1.11

    I have the following problem:
    I'm using a servlet to transform the xml files in my web-app to html. The servlet caches the ones transformed results. For each request it checks if there exists a cached result and if the result is based on the most actual xml file version (checking the "lastModified" method of java.io.File that represents the requested file).
    This servlet works fine and without any errors.
    My web-app also has some other servlets that use the xml transformation to generate a fragment of html code (the menu structure of my "normal" servlets is defined in one xml file for all other files and servlets).
    After invoking these servlets (those that use the xml transformation to create their menu) the first described servlet (transformation of requested xml files) is not working "fine" any longer. All it results is the generated header and footer of the page (hard-coded in the XSL file). The complete content is lost.
    Any ideas how to solve this problem?
    Thanks in advance,
    Thof

    1. The cache:
    The Hashtable is a field of my servlet called XMLTransformerServlet. The cache is not removed or deleted and none of its items is removed or deleted.
    As I said: Caching works fine, wonderful, perfectly...
    That's definitively not the problem.
    2. Thread safety:
    I've made all my servlet methods thread safe (just checked this...)
    3. About the "anonymous" other servlet type that uses xml transformations:
    Some of my servlets use a (thread safe) method to generate a fragment of html code that will show a simple menu structure. Therefore my web-app uses a file called menu.xml - by that way there's only one menu to maintain what makes sure that all my pages get the same menu structure (finally also the xsl file I'm using for "normal" xml transformation imports/includes and interprets this menu.xml).
    The (thread safe) method has transforms the menu.xml file using a special xsl file (menu.xsl) and outputs the result to a StringWriter. From this StringWriter I obtain the code-fragment that will be returned by the method.
    Before I saw the class StringWriter the first time I've used a temporary file to output the transformation result. Next I red in the file and returned its content.
    Finally - this method is working fine and it's always returning the expected data.
    4. The problem:
    Sorry for repeating this all the time...
    What I'm processing:
    &#160;- requesting some xml files -> XMLTransformerServlet is invoked and works fine:
    &#160;&#160;&#160;-> doGet checks the resource (if resource doesn't exist HTTP404 will be responded)
    &#160;&#160;&#160;-> doGet checks the caching state for this resource
    &#160;&#160;&#160;&#160;&#160;&#160;a) resource is in cache and no newer version of the File exists -> return cached element
    &#160;&#160;&#160;&#160;&#160;&#160;b) resource is in cache but a newer version exists in the file system -> recache and return newly cached element
    &#160;&#160;&#160;&#160;&#160;&#160;c) resource is not in cache -> cache the resource and return the newly cached element
    &#160;- requesting one of the other servlets (those that use xml transformation for menu generation)
    &#160;&#160;&#160;-> servlets invoked work fine
    &#160;- requesting a xml file:
    &#160;&#160;&#160;a) current version in cache -> return cached element
    &#160;&#160;&#160;b) no current version in cache -> transform the xml file and cache it
    This last transformation of the requested xml file fails.
    It is not failing in the sense of "throwing an exception"... it seems to work 100% fine and results a String that could be responded to the browser.
    But stupidly it is not working fine...
    Maybe (as you wrote) this is a bug (maybe in Resins xml transformation api).
    Just thought someone else might have made a similar experience...

  • XSLT Transformation ABAP to XML speacial treatment of empty elements

    Dear All,
    I have created a deep abap structure which basically reflects the structure of my XML file which I would like to generate later. I have created a transformation via transaction SE80->create XSLT Program. I am also using the ABAP command call transformation...
    I have made a few ammendments to my XSLT program where required.
    I am outputting data in a loop.
    But I got a problem with one field. I must check if this date field is initial.
    Which I did by using statement:
    <xsl:if test="ENDDATE='0000-00-00'">
    But if this field is initial I have to output the following tag:
    <ENDDATE ReasonForNull="9"></ENDDATE>
    Hence I defined an attribute below in my element as follows:
       <xsl:for-each select="INSTANCE/_-PIQGB_-INSTANCE_XML">
    <xsl:if test="ENDDATE='0000-00-00'">
       <xsl:element name="ENDDATE">
           <xsl:attribute name="ReasonForNull"/>  
        </xsl:element>
    </xsl:if>
       </xsl:for-each>
    Which generates now the output as follows and is quitwe close to the desired output:
    <ENDDATE ReasonForNull=""></ENDDATE>
    Can anybody make a suggestion how I can generate the desired output.
    I assume that I would have to assign a value to the attribute to get the right output. But I got no idea how I could this in the loop.
    Many thanks in advance.
    Rainer

    Hello Rainer
    The solution is quite simple. See the example below.
    " Sample XML file:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="../tmp_EDI_ZZ_tests/Untitled2.xsl"?>
    <INVOIC02>
        <INSTANCE>
            <ENDDATE>2008-07-31</ENDDATE>
        </INSTANCE>
        <INSTANCE>
            <ENDDATE>0000-00-00</ENDDATE>
        </INSTANCE>
    </INVOIC02>
    " Stylesheet:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
        <xsl:output encoding="ISO-8859-1" method="xml" indent="yes"/>
        <xsl:template match="/*">
            <xsl:for-each select="INSTANCE">
                <xsl:choose>
                    <xsl:when test="ENDDATE='0000-00-00' ">
                        <xsl:element name="ENDDATE">
                            <xsl:attribute name="ReasonForNull">
                                <xsl:value-of select=" '9' "/>   " Set value for attribute !!!
                            </xsl:attribute>
                        </xsl:element>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:copy-of select="node()"/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:for-each>
        </xsl:template>
    </xsl:stylesheet>
    " Result of transformation:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <ENDDATE>2008-07-31</ENDDATE>
    <ENDDATE ReasonForNull="9"/>
    Regards
      Uwe

  • Simple Transformation - ABAP 2 XML

    Dear all,
    Finally I was able to transform an internal table to xml using ST. The question is: Can I create different structured XML-files using the same (structured) internal table. Or is there some kind of a 1:1 relationship (between an ITAB structure + XML structure)?
    1) Data declaration
    TYPES: BEGIN OF ty_curr,
           tcurr  TYPE tcurr_curr,
           gdatu  TYPE gdatu_inv,
           ukurs  TYPE ukurs_curr.
    TYPES: END OF ty_curr.
    DATA: gt_tcurr TYPE TABLE OF ty_curr.
    2) Data selection
    Select * into corresponding fields of table gt_tcurr from tcurr where...
    3) Transformation ABAP 2 XML
          CALL TRANSFORMATION z_tcurr
            SOURCE root = gt_tcurr
            RESULT XML    g_xml_string.
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="ROOT"/>
      <tt:template>
        <tt:serialize>
          <rates>
            <tt:loop name="line" ref=".ROOT">
              <currency>
                <tt:value ref="$line.tcurr"/>
              </currency>
              <date>
                <tt:value ref="$line.gdatu"/>
              </date>
              <rate>
                <tt:value ref="$line.ukurs"/>
              </rate>
            </tt:loop>
          </rates>
        </tt:serialize>
      </tt:template>
    </tt:transform>
    Result (XML)
      <?xml version="1.0" encoding="utf-8" ?>
    - <rates>
      <currency>USD</currency>
      <date>01.01.2010</date>
      <rate>-1.1868</rate>
      <currency>EUR</currency>
      <date>01.01.2010</date>
      <rate>-1.1791</rate>
      <currency>USD</currency>
      <date>02.01.2010</date>
      <rate>-1.1864</rate>
      <currency>EUR</currency>
      <date>02.01.2010</date>
      <rate>-1.1864</rate>
      </rates>:
    so far so good... BUT; if I want to get another XML structure
    Example 1)  -> sorted by currency
    <?xml version="1.0" encoding="utf-8" ?>
    - <rates>
      <currency>USD
      <date>01.01.2010</date>
      <rate>-1.1868</rate>
      <date>02.01.2010</date>
      <rate>-1.1868</rate>
      </currency>
      <currency>EUR
      <date>01.01.2010</date>
      <rate>-1.1868</rate>
      <date>02.01.2010</date>
      <rate>-1.1868</rate>
      </currency>
      </rates>
    Example 2) -> sored by date
    <?xml version="1.0" encoding="utf-8" ?>
    - <rates>
      <date>01.01.2010</date> 
       <currency>USD</currency>
      <rate>-1.1868</rate>
       <currency>EUR</currency>
      <rate>-1.1868</rate>
      <date>02.01.2010</date>
       <currency>USD</currency>
      <rate>-1.1868</rate>
       <currency>EUR</currency>
      <rate>-1.1868</rate>
      </rates>
    How can I achieve output example 1+2  using the same internal table as a source? Is this possible? I guess this can be solved within the transformation, right? Any help appreciated.
    Best regards
    Benno

    Thanks for all answers so far. Changing the sequence is not a "problem". What I want to achieve is to change hierarchy of the xml. I'll try to explain again with a simple example:
    ITAB (structure):
    name; birthday; ***; first name
    ITAB (content):
    Smith; 01.01.1970; M; Paul
    Smith; 01.01.1970; F; Stefanie
    Smith; 01.02.1980; F; Barbara
    White; 01.02.1980; M; Steve
    I want to pass the itab exactly the way it is (ok, sorting is allowed). Question: Can I achieve the following XML's using ST? I guess/hope this can be solved with variables/groups/condition statements within the transformation coding?
    Example xml- 1) Sorted/Grouped by Name/***
    <person>
                    <name>Smith
                                 <***>M    
                                       <birthday>01.01.1970</birthday><first name>Paul</first name>                            
                                 </***>
                                 <***>F 
                                       <birthday>01.01.1970</birthday><first name>Stefanie</first name>   
                                       <birthday>01.02.1980</birthday><first name>Barbara</first name>                                  
                                 </***>
                    </name>
                    <name>White
                                 <***>M    
                                       <birthday>01.02.1980</birthday><first name>Steve</first name>                            
                                 </***>
                    </name>
    </person>
    Exampe xml-2 ) Sorted/Grouped by Birthday (Names only)
    <person>
                    <birthday>01.01.1970
                                 <first name>Paul</first name>
                                 <first name>Stefanie</first name>                                 
                    </birthday>
                    <birthday>01.02.1980
                                 <first name>Barbara</first name>
                                 <first name>Steve</first name>                                 
                    </birthday>                        
    </person>

  • XML Transformation error (ABAP -- XML)

    Hi,
    I'm getting the foll. error while doing a XML Transformation, Can anyone help me in this regard..
      <FIN_WT>56.0</FIN_WT>
      <FIN_WT_UNIT>KG</FIN_WT_UNIT>
      <ZZQMNUM />
      <ZZHOLD />
      <ZZDUMATNR
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    The following tags were not closed: asx:abap, asx:values, OUTPUT, item. Error processing resource 'file:///C:/Documents and...
    > />
      <PSP_NR>U5/0626-HT-193-1-36-344</PSP_NR>
      <ZZCRTNAME>ALFI</ZZCRTNAME>
      <ZZAPPNAME>ALFI</ZZAPPNAME>
    Regards
    Jiku

    are you trying to transform XML to itab?
    is the xml well formed one - you can check this by running the xml file in webbrowser, if it doesnt display, then it means the xml is not well formed.
    Regards
    Raja

  • Need help with transforming abap to xml doc!!

    Abap To XML
    Posted: Aug 18, 2005 11:31 AM        Reply      E-mail this post 
    I was able to transfer xml data from abap internal tables to a string.
    Here is the content of the string:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <asx:abap version="1.0" xmlns:asx="http://www.sap.com/abapxml">
    <asx:values>
    <DATA>
    <item>
    <UOM1 />
    <UOM2>L</UOM2>
    <GL_PR_SEG />
    <RECORDMODE>A</RECORDMODE>
    </item>
    </DATA>
    </asx:values>
    </asx:abap>
    Now my goal is to strip out a couple of tags out of that string directly using xslt.
    Do you know of any way i could take out the <asx:abap> and <asx:values> tags using an xslt program. I'd like to be able to strip them out directly from the string itself.

    Hi there,
    Unfortunately this is a bit outside the scope of what ExportPDF is designed for.  You may be able to convert your document to a Word file and, as long as you didn't write over any of the printed text on the document, make your edits there to remove your writing  That said, it sounds like your best bet would be to scan the document to an image format, then use a photo-editing application, such as Photoshop Elements to touch up and remove your hand-written notes.
    Please let us know if you have any questions.
    -David

  • In which cases can the ABAP statement CALL TRANSFORMATION be used?

    Hi friends,
    here is my questions with options below.
    In which cases can the ABAP statement CALL TRANSFORMATION be used? (T/F)
    -To transform as iXML document object into and ABAP data structure using
    XSLT.
    - To transform an XML document contained in a string into another XML
    document
    using and XSLT program.
    - To get canonic XML display of an ABAP data structure.
    - To transform an XML document contained in an xstring into another XLM
    document using an ST program (Simple Transformation).
    - To transform and ABAP data structure into an SML document using ST.
    Kindly give me the expalnation to each statement with either True or False.

    CALL TRANSFORMATION is a new language element in ABAP that we can use to <b>call up the transformation</b>.
    The type of transformation:
    XML to XML
    XML to ABAP
    ABAP to XML or
    ABAP to ABAP is already determined by the two additions SOURCE and RESULT in CALL TRANSFORMATION.
    Check this link for more details.
    http://help.sap.com/saphelp_nw04/helpdata/en/a8/824c3c66177414e10000000a114084/content.htm
    Regards,
    Maha

  • Issue with Date format - ABAP to XML

    Dear Users,
    We are currently facing an issue with the date formats in XML.
    We have a system (.Net), which has a webservice that we are calling for information from SAP. We created a Proxy class in SAP from the WSDL file and have attempted to use the method that gets us required information based on the Timestamp passed from SAP. However, the timestamp that the INPUT structure uses has a data element XSDDATETIME_Z.
    All we can send from SAP is a simple TIMESTAMP, but the .Net system doesn't accept it since it wants the timestamp in XML format i.e. <dd-mm-yyyy>T<hh:mm:ss>Z. SAP documentation says that the field should automatically do conversion from ABAP to XML format, but that doesn't happen. We don't want to build a string from Timestamp in the XML format and send it out since we might surely miss out on the different cases involved.
    Can anyone please suggest a way for us to send the date out in the required XML format?
    Many thanks!

    Hi Vijay,
    Look at the below sample code and it works fine, i guess there is something wrong in your code or conversion, post the actual code if you are still not able figure it out with the below example.
    DATA: l_xml_string TYPE string,
          l_dat_time TYPE xsddatetime_z.
    CALL FUNCTION 'CACS_DATE_GET_TIMESTAMP'
    EXPORTING
       I_DATE                         = sy-datum
       I_TIME                         = sy-uzeit
    IMPORTING
       E_TIMESTAMP                    = l_dat_time
    EXCEPTIONS
       DATE_NOT_FILLED_BUT_TIME       = 1
       DATE_HAS_NO_VALID_FORMAT       = 2
       OTHERS                         = 3.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL TRANSFORMATION id
      SOURCE root = l_dat_time
      RESULT XML l_xml_string.
    IF sy-subrc EQ 0.
    write: l_xml_string.
    ENDIF.
    Regards,
    Chen

  • XML-24521: (Error) Element not completed

    I am trying to map a collection of information to a partnerlink's input variable, using a for-each xsl node in the transformation, however I receive this error during my testing:
    Target XML is invalid for the target schema.
    <Line 14, Column 38>: XML-24521: (Error) Element not completed: 'ExecuteGloviaSP4ProcessRequest'
    At first I thought this was an issue related to the database adapter, now I'm thinking it has to do with the collection or the xsd? But we modled the xsd after the OrderBooking PO xsd...
    Here's my Transformation_1.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="WSDL">
    <schema location="http://Comp3/RFPOTest.wsdl"/>
    <rootElement name="invoiceCollection" namespace="http://199.244.49.95/NotesRFPOInvoice.xsd"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="WSDL">
    <schema location="http://bpel.thomasnow.com:80/orabpel/default/ExecuteGloviaSP4/ExecuteGloviaSP4?wsdl"/>
    <rootElement name="ExecuteGloviaSP4ProcessRequest" namespace="http://xmlns.oracle.com/ExecuteGloviaSP4"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 10.1.2.0.0(build 050504) AT [FRI MAR 24 08:49:55 CST 2006]. -->
    ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://Comp3/RFPOTest.wsdl" xmlns:xsd1="http://199.244.49.95/NotesRFPOInvoice.xsd" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:ns1="http://xmlns.oracle.com/ExecuteGloviaSP4" xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" exclude-result-prefixes="xsl ns0 soap tns xsd1 plnk ns1 wsa bpws ldap xp20 ora orcl">
    <xsl:template match="/">
    <xsl:for-each select="/xsd1:invoiceCollection">
    <ns1:ExecuteGloviaSP4ProcessRequest>
    <ns1:invCCN>
    <xsl:value-of select="xsd1:invoice/xsd1:invCCN"/>
    </ns1:invCCN>
    <ns1:invVendorNbr>
    <xsl:value-of select="xsd1:invoice/xsd1:invVendorNbr"/>
    </ns1:invVendorNbr>
    <ns1:invVendorApLoc>
    <xsl:value-of select="xsd1:invoice/xsd1:invVendorApLoc"/>
    </ns1:invVendorApLoc>
    <ns1:invVendorInvoiceNbr>
    <xsl:value-of select="xsd1:invoice/xsd1:invVendorInvoiceNbr"/>
    </ns1:invVendorInvoiceNbr>
    <ns1:invTotal>
    <xsl:value-of select="xsd1:invoice/xsd1:invTotal"/>
    </ns1:invTotal>
    <ns1:invFreight>
    <xsl:value-of select="xsd1:invoice/xsd1:invFreight"/>
    </ns1:invFreight>
    <ns1:invTax>
    <xsl:value-of select="xsd1:invoice/xsd1:invTax"/>
    </ns1:invTax>
    <ns1:invDate>
    <xsl:value-of select="xsd1:invoice/xsd1:invDate"/>
    </ns1:invDate>
    <ns1:invVendorTerms>
    <xsl:value-of select="xsd1:invoice/xsd1:invVendorTerms"/>
    </ns1:invVendorTerms>
    <ns1:invUNID>
    <xsl:value-of select="xsd1:invoice/xsd1:invUNID"/>
    </ns1:invUNID>
    <ns1:invGLDist>
    <xsl:value-of select="xsd1:invoice/xsd1:invGLDist"/>
    </ns1:invGLDist>
    </ns1:ExecuteGloviaSP4ProcessRequest>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>

    Update:
    By mapping static values to the last three elements in the target schema, I was able to make this error go away.
    Here's the code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="WSDL">
    <schema location="http://Comp3/RFPOTest.wsdl"/>
    <rootElement name="invoiceCollection" namespace="http://199.244.49.95/NotesRFPOInvoice.xsd"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="WSDL">
    <schema location="http://bpel.thomasnow.com:80/orabpel/default/ExecuteGloviaSP4/ExecuteGloviaSP4?wsdl"/>
    <rootElement name="ExecuteGloviaSP4ProcessRequest" namespace="http://xmlns.oracle.com/ExecuteGloviaSP4"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 10.1.2.0.0(build 050504) AT [FRI MAR 24 11:02:02 CST 2006]. -->
    ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://Comp3/RFPOTest.wsdl" xmlns:xsd1="http://199.244.49.95/NotesRFPOInvoice.xsd" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:ns1="http://xmlns.oracle.com/ExecuteGloviaSP4" xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" exclude-result-prefixes="xsl ns0 soap tns xsd1 plnk ns1 wsa bpws ldap xp20 ora orcl">
    <xsl:template match="/">
    <xsl:for-each select="/xsd1:invoiceCollection/xsd1:invoice">
    <ns1:ExecuteGloviaSP4ProcessRequest>
    <ns1:invCCN>
    <xsl:value-of select="xsd1:invCCN"/>
    </ns1:invCCN>
    <ns1:invVendorNbr>
    <xsl:value-of select="xsd1:invVendorNbr"/>
    </ns1:invVendorNbr>
    <ns1:invVendorApLoc>
    <xsl:value-of select="xsd1:invVendorApLoc"/>
    </ns1:invVendorApLoc>
    <ns1:invVendorInvoiceNbr>
    <xsl:value-of select="xsd1:invVendorInvoiceNbr"/>
    </ns1:invVendorInvoiceNbr>
    <ns1:invTotal>
    <xsl:value-of select="xsd1:invTotal"/>
    </ns1:invTotal>
    <ns1:invFreight>
    <xsl:value-of select="xsd1:invFreight"/>
    </ns1:invFreight>
    <ns1:invTax>
    <xsl:value-of select="xsd1:invTax"/>
    </ns1:invTax>
    <ns1:invDate>
    <xsl:value-of select="xsd1:invDate"/>
    </ns1:invDate>
    <ns1:invVendorTerms>
    <xsl:value-of select="xsd1:invVendorTerms"/>
    </ns1:invVendorTerms>
    <ns1:invUNID>
    <xsl:value-of select="xsd1:invUNID"/>
    </ns1:invUNID>
    <ns1:invGLDist>
    <xsl:value-of select="xsd1:invGLDist"/>
    </ns1:invGLDist>
    <ns1:invICN>
    <xsl:value-of select="concat(0,&quot;&quot;)"/>
    </ns1:invICN>
    <ns1:invCurrency>
    <xsl:value-of select="concat(&quot;USD&quot;,&quot;&quot;)"/>
    </ns1:invCurrency>
    <ns1:invGLDistCode>
    <xsl:value-of select="concat(&quot; &quot;,&quot;&quot;)"/>
    </ns1:invGLDistCode>
    </ns1:ExecuteGloviaSP4ProcessRequest>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    However I have a new error now, since I'm also mapping the Collection to the for-each XSL node.
    Target XML is invalid for the target schema.
    <Line 18, Column 1>: XML-20100: (Fatal Error) Expected 'EOF'.
    Searching...

  • Fatal Error and NullPointerException in Oracle XML Transformer

    Hi,
    I'm building a dom tree in memory with oracle xml parser. Then I transform the dom document into a string to send xml to the client. But I get an fatal error on calling transform.
    I don't know what could be the problem, because apache and weblogic parser works, an when I create a dom document with org.w3c.dom elements and statements then the xml document can't be invalid,
    because the document implementation would throw an exception if wrong nodes or something like this should be inserted...
    I'm using oracle xml parser 9.2.0.4 for java, bea weblogic 7.0 and win2k.
    Thanks for help.
    XSL-1900: (Fatal Error) An internal error condition occurred.
    javax.xml.transform.TransformerException: XSL-1900: (Fatal Error) An internal error condition occurred.
    at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:681)
    at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:309)
    java.lang.NullPointerException
    at oracle.xml.parser.v2.XSLSAXPrintDriver.printAttributes(XSLSAXPrintDriver.java:394)
    at oracle.xml.parser.v2.XSLSAXPrintDriver.startElement(XSLSAXPrintDriver.java:322)
    at oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:993)
    at oracle.xml.parser.v2.XMLNode.reportChildSAXEvents(XMLNode.java:1014)
    at oracle.xml.parser.v2.XMLDocument.reportSAXEvents(XMLDocument.java:942)
    at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:294)

    Hi,
    I'm having that problem to:
    I'm getting the following exception
    javax.xml.transform.TransformerException: XSL-1900: (Fatal Error) An internal error condition occurred.
         at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:723)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:340)
         at com.ac.mqif.control.Handler.handleLong(Handler.java:835)
         at com.ac.mqif.control.Handler.run(Handler.java:951)
    Caused by: java.lang.NullPointerException
         at oracle.xml.parser.v2.XPathStep.getSelectedNodes(XPathStep.java:380)
         at oracle.xml.parser.v2.PathExpr.getValue(XSLNodeSetExpr.java:483)
         at oracle.xml.parser.v2.XSLExprBase.getStringValue(XSLExprBase.java:363)
         at oracle.xml.parser.v2.XSLValueOf.processAction(XSLValueOf.java:99)
         at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:367)
         at oracle.xml.parser.v2.XSLTemplate.processAction(XSLTemplate.java:199)
         at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:214)
         at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:207)
         at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:207)
         at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:120)
         at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:367)
         at oracle.xml.parser.v2.XSLTemplate.processAction(XSLTemplate.java:199)
         at oracle.xml.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:471)
         at oracle.xml.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:448)
         at oracle.xml.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:246)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:327)
         ... 2 more
    when using a stylesheet which has a template match condition of more than 1600 characters.
    The second thing is that the Oracle XML transformer is
    NOT threadsafe. I was using several threads using different templates to transform an incoming XML simultaneously but was ALWAYS getting internal XSL errors
    and Nullpointer Exceptions. I solved this by synchronizing the transformation, but I don't like it.
    I'm using the following versions on Windows XP:
    Oracle IDE: 9.0.3.10.35
    Business Components Version: 9.0.3.10.7
    SCM Support Version: 9.0.3.9.4
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
    Thanx,
    Ellcrys

  • Create XML transformation in SAP R/3 4.7

    Hi Experts,
    Kindly let me know the transaction for creating xml transformation in sap r/3 4.7, if there is any.
    Though i could not find anything through tstc or se93.
    Is there any other way of creating xml transformation in r/3 4.7. There is a tcode STRANS in ecc6.0 but not in 4.7.
    Also, please help me resolving this issue of converting abap data to xml file: -
    is the following xml structure possible with transformation or by any other method.
    <Process_Order>
         <item>
                   <PO Number> PO123334 </PO Number>
                   <Header_mat> Mat123 </Header_mat>
                   <BOM>
                          <PDLabels>
                                  <PDLabel>
                                         <PCode>P123456</PCode>
                                         <Batch>123ABC</Batch>
                                         <Quantity>6000</Quantity>
                                         <PDDCode>1234567890</PDDCode>
                                 </PDLabel>
                                 <PDLabel>
                                        <PCode>P234567</PCode>       
                                        <Batch>567DEF</Batch>
                                        <Quantity>6000</Quantity>
                                        <PDDCode></PDDCode>
                                 </PDLabel>
                        </PDLabels>
                       <PDCartons>
                                <PDCarton>
                                       <PCode>P556677</PCode>
                                       <Batch>589GFT</Batch>
                                       <Quantity>1200</Quantity>
                                       <PDDCode></PDDCode>
                                </PDCarton>
                      </PDCartons>
                 </BOM>
        </item>
         <item>
                   <PO Number> PO123334 </PO Number>
                   <Header_mat> Mat123 </Header_mat>
                   <BOM>
                          <PDLabels>
                                  <PDLabel>
                                         <PCode>P123456</PCode>
                                         <Batch>123ABC</Batch>
                                         <Quantity>6000</Quantity>
                                         <PDDCode>1234567890</PDDCode>
                                 </PDLabel>
                                 <PDLabel>
                                        <PCode>P234567</PCode>       
                                        <Batch>567DEF</Batch>
                                        <Quantity>6000</Quantity>
                                        <PDDCode></PDDCode>
                                 </PDLabel>
                        </PDLabels>
                       <PDCartons>
                                <PDCarton>
                                       <PCode>P556677</PCode>
                                       <Batch>589GFT</Batch>
                                       <Quantity>1200</Quantity>
                                       <PDDCode></PDDCode>
                                </PDCarton>
                      </PDCartons>
                 </BOM>
        </item>
    </Process_Order>
    What i mean to ask is, is the hierarchy to this structural level is attainable using either transfomation or any other alternative.
    Thanks a lot in advance !
    Shreya

    oops the message structure has gone bad ........
    What i meant was : --
    <Process_Order>
      <item>
                   <PO Number> PO123334 </PO Number>
                   <Header_mat> Mat123 </Header_mat>
                   <BOM>
                          <PDLabels>
                                  <PDLabel>
                                         <PCode>P123456</PCode>
                                         <Batch>123ABC</Batch>
                                         <Quantity>6000</Quantity>
                                         <PDDCode>1234567890</PDDCode>
                                 </PDLabel>
                                 <PDLabel>
                                        <PCode>P234567</PCode>       
                                        <Batch>567DEF</Batch>
                                        <Quantity>6000</Quantity>
                                        <PDDCode></PDDCode>
                                 </PDLabel>
                        </PDLabels>
                       <PDCartons>
                                <PDCarton>
                                       <PCode>P556677</PCode>
                                       <Batch>589GFT</Batch>
                                       <Quantity>1200</Quantity>
                                       <PDDCode></PDDCode>
                                </PDCarton>
                      </PDCartons>
                 </BOM>
        </item>
    </Process_Order>

  • File size problem when performing XML Transformation into Excel

    Hi All,
    We are performing XML Transformation in ABAP which can open in Excel and saving to common share. But the file size of excel is around 50MB. After opening the excel and save with diffrent name the file is getting compressed and its below 1MB. So what kind of settings does we need to make to the transformation code which will create the excel files with less memory/size??
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
    <tt:root name="AAAAAAA"/>
    <tt:root name="BBBBBBBB"/>
    <tt:root name="CCCCCCCC"/>
    <tt:template>
    <?mso-application progid="Excel.Sheet"?>
    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
    xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:html="http://www.w3.org/TR/REC-html40">
       <ProtectObjects>True</ProtectObjects>
       <ProtectScenarios>True</ProtectScenarios>
      </WorksheetOptions>
    </Worksheet>
    </Workbook>
    </tt:template>
    </tt:transform>
    <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
    </DocumentProperties>
    <CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
      <ContentTypeId dt:dt="string">0x01010049B4763FE606154C9C9BC639FE7EE179</ContentTypeId>
    </CustomDocumentProperties>
    <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
      <Colors>
       <Color>
        <Index>0</Index>
        <RGB>#FF0000</RGB>
       </Color>
       <Color>
        <Index>1</Index>
        <RGB>#FFE4B5</RGB>
       </Color>
       <Color>
        <Index>2</Index>
        <RGB>#FFF8DC</RGB>
       </Color>
       <Color>
        <Index>3</Index>
        <RGB>#000000</RGB>
       </Color>
      </Colors>
    </OfficeDocumentSettings>
    <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
      <WindowHeight>7305</WindowHeight>
      <WindowWidth>11340</WindowWidth>
      <WindowTopX>0</WindowTopX>
      <WindowTopY>0</WindowTopY>
      <TabRatio>334</TabRatio>
      <ProtectStructure>True</ProtectStructure>
      <ProtectWindows>False</ProtectWindows>
    </ExcelWorkbook>
    </DocumentProperties>
    <CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
      <ContentTypeId dt:dt="string">0x01010049B4763FE606154C9C9BC639FE7EE179</ContentTypeId>
    </CustomDocumentProperties>
    <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">

    Hi Raghu,
    have a look at the XLSX file generated by Excel, you'll see that it's simply a zipped file. So you can't do it with a transformation, but you need CL_ABAP_ZIP class. I advise you to look at the abap2xslx project ABAP code (currently 3.0) to see how it works.
    Best regards,
    Sandra

  • Debugging a  XML Transformation Program

    Hi,
    We are converting incoming XML into ABAP structure and checking if the data has any future effective changes. If there is a future effective update, then it is converted back to XML string and stored in a custom table as a XML string. A job which runs picks up the record on the given date and process the changes that are to be applied. We are facing issues during the transformation which happens on this day(effective date. Though the XML string has data when the transformation is called, there is no ABAP output after transformation. Interesting things to note are:
    .  No Transformation error is thrown
        When the same scenario with same XMLs is repeated in other regions(Dev & Quality), there are no issues at all
       What I would like to know is
          >> Is there any file encoding & xml string conversions issues?
          >> is it possible to debug within the transfomation(ie transformation program) We tried STRANS, but were not able?
    Any help is this regard is appreciated.
    Thanks
    Ganesh

    Rich,
    I tried to do what you suggested but it didn't allow me to stop at the break-point.
    Here is why I need to debug the program.  Our sales orders just crossed over the number range for ITOs (inter company transfer orders).  Where we are including the header text of the sales order it is pulling the header info of the ITO that has the same order number (from the numbers crossing).  I need to figure out where/how to pull the header information based on the order type.  The Order Confirmation is pulling the correct header text but I am unsure how it is doing that.  I need to determine what the text name is from the Order Confirmation.  On the Picklist the text name is the sales order number.
    I hope that made sense. 
    Davis

Maybe you are looking for