XSLT transformation failed

Hi ,
I have the following transformation and the input xml as below.
When i test it in jdeveloper , it's giving "Unable transform,source XML is null".
On the traget XML , there is no data and the error is " Document has no root element ,start of root element expected".
Please revert back if someone has solution.
XSL
<?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="AdCampaignBilling_adCampaignBillingRS.wsdl"/>
<rootElement name="ListOfMeruCampaignRevenueIntegrationIo" namespace="http://www.siebel.com/xml/MERUCampaignBilling"/>
</source>
</mapSources>
<mapTargets>
<target type="WSDL">
<schema location="updateOracleCampaignBilling_DBAdp.wsdl"/>
<rootElement name="XmeruArCampaignBillingCollection" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/updateOracleCampaignBillingDBAdp"/>
</target>
</mapTargets>
<!-- GENERATED BY ORACLE XSL MAPPER 10.1.3.4.0(build 080718.0645) AT [FRI JAN 08 19:01:11 IST 2010]. -->
?>
<xsl:stylesheet version="1.0"
xmlns:inp1="http://www.siebel.com/xml/MERUCampaignBilling"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:pc="http://xmlns.oracle.com/pcbpel/"
xmlns:tns="http://oracle.com/esb/namespaces/AdCampaignBilling"
xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/updateOracleCampaignBilling_DBAdp/"
xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/updateOracleCampaignBillingDBAdp"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
xmlns:ns0="http://www.w3.org/2001/XMLSchema"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:odate="http://www.oracle.com/XSL/Transform/java/meru.com.dateconversion.OracleDateConversion"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/db/"
exclude-result-prefixes="xsl inp1 tns ns0 plt pc ns1 top jca hdr bpws ehdr hwf xp20 xref odate ora ids orcl">
<xsl:template match="/">
<top:XmeruArCampaignBillingCollection>
<xsl:for-each select="/inp1:ListOfMeruCampaignRevenueIntegrationIo/inp1:Campaign/inp1:ListOfRevenue/inp1:Revenue">
<top:XmeruArCampaignBilling>
<top:corporateOperatingUnit>
<xsl:text disable-output-escaping="no">Corporate</xsl:text>
</top:corporateOperatingUnit>
<top:roNumber>
<xsl:value-of select="../../inp1:MERUReleaseOrderNumber"/>
</top:roNumber>
<xsl:choose>
<xsl:when ISParent='"../../inp1:ISParent" = "true"'>
<top:customerName>
<xsl:value-of select="../../inp1:MERUParentAccount"/>
</top:customerName>
</xsl:when>
<xsl:when ISParent='"../../inp1:ISParent" = "false"'>
<top:customerName>
<xsl:value-of select="../../inp1:MERUAccount"/>
</top:customerName>
</xsl:when>
</xsl:choose>
<!-- Following have been removed
<top:customerName>
<xsl:value-of select="../../inp1:MERUAccount"/>
</top:customerName>
Above been removed -->
<top:quantity>
<xsl:value-of select="inp1:MERUBillingDays"/>
</top:quantity>
<top:vehicleNumber>
<xsl:value-of select="inp1:VIN"/>
</top:vehicleNumber>
<!--
<top:billingEndDate>
<xsl:value-of select='xp20:format-dateTime(concat(substring(inp1:MERUBillingEnd,7.0,4.0),"-",substring(inp1:MERUBillingEnd,1.0,2.0),"-",substring(inp1:MERUBillingEnd,4.0,2.0)),"[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01]")'/>
</top:billingEndDate>
-->
<top:unitPrice>
<xsl:value-of select="inp1:Price"/>
</top:unitPrice>
<top:amount>
<xsl:value-of select="inp1:Revenue2"/>
</top:amount>
<top:productName>
<xsl:value-of select="inp1:Product"/>
</top:productName>
<top:corporateId>
<xsl:value-of select="../../inp1:MERUCorporateId"/>
</top:corporateId>
<top:billRefNo>
<xsl:value-of select="inp1:BillRefNo"/>
</top:billRefNo>
<!--
<top:billingStartDate>
<xsl:value-of select='xp20:format-dateTime(concat(substring(inp1:Date,7.0,4.0),"-",substring(inp1:Date,1.0,2.0),"-",substring(inp1:Date,4.0,2.0)),"[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01]")'/>
</top:billingStartDate>
-->
<top:status>
<xsl:text disable-output-escaping="no">N</xsl:text>
</top:status>
<!-- Following have been added -->
<xsl:choose>
<xsl:when ISParent='"../../inp1:ISParent" = "true"'>
<top:meruAccountNumber>
<xsl:value-of select="../../inp1:MERUParentAccountNumber"/>
</top:meruAccountNumber>
</xsl:when>
<xsl:when ISParent='"../../inp1:ISParent" = "false"'>
<top:meruAccountNumber>
<xsl:value-of select="../../inp1:MERUAccountNumber"/>
</top:meruAccountNumber>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when ISParent='"../../inp1:ISParent" = "true"'>
<top:siebelRowId>
<xsl:value-of select="../../inp1:MERUParentAccountId"/>
</top:siebelRowId>
</xsl:when>
<xsl:when ISParent='"../../inp1:ISParent" = "false"'>
<top:siebelRowId>
<xsl:value-of select="../../inp1:MERUAccountId"/>
</top:siebelRowId>
</xsl:when>
</xsl:choose>
<!-- Above has been added -->
<!-- Following have been removed
<top:meruAccountNumber>
<xsl:value-of select="../../inp1:MERUAccountNumber"/>
</top:meruAccountNumber>
<top:siebelRowId>
<xsl:value-of select="../../inp1:MERUAccountId"/>
</top:siebelRowId>
Above been removed -->
<top:description>
<xsl:value-of select="../../inp1:Objective"/>
</top:description>
</top:XmeruArCampaignBilling>
</xsl:for-each>
</top:XmeruArCampaignBillingCollection>
</xsl:template>
</xsl:stylesheet>
INPUT XML for Test
<?xml version="1.0" encoding="UTF-8" ?>
<ListOfMeruCampaignRevenueIntegrationIo xmlns="http://www.siebel.com/xml/MERUCampaignBilling">
<Campaign>
<ListOfRevenue>
<Revenue>
<MERUBillingDays>30</MERUBillingDays>
<MERUBillingEnd>03/27/2011</MERUBillingEnd>
<Price>750</Price>
<Revenue2>500</Revenue2>
<VIN>MH02WA8975</VIN>
<Product>EB Doors</Product>
<Date>02/26/2011</Date>
<BillRefNo>121-02262011</BillRefNo>
</Revenue>
<Revenue>
<MERUBillingDays>40</MERUBillingDays>
<MERUBillingEnd>06/28/2011</MERUBillingEnd>
<Price>800</Price>
<Revenue2>300</Revenue2>
<VIN>MH06FA8978</VIN>
<Product>EB Doors</Product>
<Date>04/29/201</Date>
<BillRefNo>121-02262011</BillRefNo>
</Revenue>
</ListOfRevenue>
<ISParent>true</ISParent>
<MERUParentAccount>VVF Limite</MERUParentAccount>
<MERUParentAccountId>1-MIQQO</MERUParentAccountId>
<MERUParentAccountNumber>1-37826016</MERUParentAccountNumber>
<MERUAccount>VVF Limited</MERUAccount>
<MERUReleaseOrderNumber>121</MERUReleaseOrderNumber>
<PrimaryOrganization>Mumbai</PrimaryOrganization>
<MERUCorporateId>232</MERUCorporateId>
<MERUAccountId>1-MIQQO</MERUAccountId>
<MERUAccountNumber>1-37826016</MERUAccountNumber>
<MERUBillingPeriodEndDate>06/28/2011</MERUBillingPeriodEndDate>
<Objective>236</Objective>
</Campaign>
</ListOfMeruCampaignRevenueIntegrationIo>

There was problem with the <XSL:when> syntax , i was using ISParent which is wrong.
U have to use test.
Also no double quetion required ("") in xsl <xsl:when ISParent='*"*../../inp1:ISParent*"* = "true"'>
<xsl:choose>
<xsl:when ISParent='"../../inp1:ISParent" = "true"'>
<top:meruAccountNumber>
<xsl:value-of select="../../inp1:MERUParentAccountNumber"/>
</top:meruAccountNumber>
</xsl:when>
<xsl:when ISParent='"../../inp1:ISParent" = "false"'>
<top:meruAccountNumber>
<xsl:value-of select="../../inp1:MERUAccountNumber"/>
</top:meruAccountNumber>
</xsl:when>
</xsl:choose>

Similar Messages

  • XSLT transformation in XML to ABAP: special characters issue

    Hi,
    I am parsing well-formed XML file that has the following data (:
    <projects><project><name>Wallis &amp; Futuna</name></project></projects>
    I use XSLT transformation:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:template match="projects">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
            <PROJECTS>
              <xsl:for-each select="project">
                <PROJECT>
                  <NAME>
                    <xsl:value-of select="name"/>
                  </NAME>
                </PROJECT>
              </xsl:for-each>
            </PROJECTS>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>
    If I use the above example without &amp;amp; everything works fine, but the original XML fails with exception CX_XSLT_DESERIALIZATION_ERROR and message "Error during deserialization". Googling around did not give an answer.
    Any words of wisdom?
    Edited by: Alexei Isaev on Apr 26, 2011 5:04 AM
    Edited by: Alexei Isaev on Apr 26, 2011 5:05 AM

    Hi,
    Please visit the following link for reference.
    http://help.sap.com/abapdocu_70/en/ABAPCALL_TRANSFORMATION.htm
    Thanks & Regards,
    Harish

  • Dynamic XSLT Transformation for ABAP

    Hi Team,
    I have a simple requirement, but could not get it to work. Tried different posts but need some help.
    I have an input XML file as follows:
    <ITEM>
       <ITEMQUALF>
       <MATERIAL>
       <UPC>
       <VENDORMATERIAL>
    <ITEM>
    I created my internal table with the exact fields as above and created a transformation which works fine. The problem is, there are scenario's where only one tag "MATERIAL", "UPC", OR "VENDORMATERIAL" is passed in the input XML. Empty tags are not passed. For E.G.
    <ITEM>
      <ITEMQUALF>
      <UPC>
    <ITEM>
    My transformation fails in this scenario because it does not finds the MATERIAL and VENDORMATERIAL tags. I tried using the <tt:cond/> tag, but no luck. I have some specific questions:
    1) How to take care of this scenario where empty tags are not passed? (I have the Superset of all the Tags available in an XSD). A quick Sample would help me a lot because I have spent weeks breaking my head with this.
    2) Is there any other method or Option to parse a very larger input file (~40 MB) as above? I have seen the iXML ABAP methods but don't know if we should use XSLT or iXML or is there any other method. We don't have XI in our landscape. Our system is ECC 6.0, ABAP 7.0 - SP 17, Enhancement Pack 3.
    Any pointers would help a lot. Thanks for your time.
    Regards
    Sanjay

    Hello Sanjay
    In such a scenario I usually make pre-transformation filling the missing elements before the main mapping.
    Input:
    <?xml version="1.0" encoding="utf-8"?>
    <List>
      <ITEM>
        <ITEMQUALF/>
        <MATERIAL/>
        <UPC/>
        <VENDORMATERIAL/>
      </ITEM>
      <ITEM>
        <ITEMQUALF/>
        <UPC/>
      </ITEM>
      <ITEM>
        <MATERIAL/>
      </ITEM>
    </List>
    XSLT Mapping (XML to XML):
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
        <xsl:template match="*">
            <List>
                <xsl:for-each select="ITEM">
                    <xsl:element name="ITEM">
                        <xsl:element name="ITEMQUALF">
                            <xsl:value-of select="ITEMQUALF"/>
                        </xsl:element>
                        <xsl:element name="MATERIAL">
                            <xsl:value-of select="MATERIAL"/>
                        </xsl:element>
                        <xsl:element name="UPC">
                            <xsl:value-of select="UPC"/>   
                        </xsl:element>
                        <xsl:element name="VENDORMATERIAL">
                            <xsl:value-of select="VENDORMATERIAL"/>   
                        </xsl:element>
                    </xsl:element>
                </xsl:for-each>
            </List>
        </xsl:template>
    </xsl:stylesheet>
    Resulting XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <List>
        <ITEM>
            <ITEMQUALF/>
            <MATERIAL/>
            <UPC/>
            <VENDORMATERIAL/>
        </ITEM>
        <ITEM>
            <ITEMQUALF/>
            <MATERIAL/>
            <UPC/>
            <VENDORMATERIAL/>
        </ITEM>
        <ITEM>
            <ITEMQUALF/>
            <MATERIAL/>
            <UPC/>
            <VENDORMATERIAL/>
        </ITEM>
    </List>
    Regards
      Uwe

  • Change xslt transformer

    How can I change the xslt transformer that OC4J is using? I am trying to use the Maverick MVC framework in my web app and am receiving the following exception from oracle.xml.jaxp.JXTransformer.transform(). It looks like the oracle XSL library isn't capable of transforming from a DOMSource. I would like to configure OC4J to use Xalan for doing the transformations.
    For now I am using the standalone OC4J 9.0.3 for development but will deploy on a full 9iAS server.
    javax.xml.transform.TransformerException: XSL-1101: (Fatal Error) DOMSource node as this type not supported.
         at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:725)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:196)
         at org.infohazard.maverick.transform.XSLTransform$Step.go(XSLTransform.java:250)
         at org.infohazard.maverick.opt.view.DomifyViewFactory$DomifyView.go(DomifyViewFactory.java:111)
         at org.infohazard.maverick.flow.ViewWithTransforms.go(ViewWithTransforms.java:39)
         at org.infohazard.maverick.flow.CommandBase.go(CommandBase.java:57)
         at org.infohazard.maverick.Dispatcher.service(Dispatcher.java:237)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:721)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)

    I've just had a situation where we've added that line to the JVM for a container which houses an app that uses the Xalan processor. A developer undeployed the application and restarted the container, but the container wouldn't come back.
    Actually, the container was the home container, and the entire console didn't come back, but it happens on other containers as well.
    After some attempted restarts, I was getting the following error:
    08/06/24 10:50:09 Start process
    08/06/24 10:50:14 WARNING: Application.setConfig Application: default is in failed state as initialization failed.
    javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl could not be instantiated: java.lang.NullPointerException
    08/06/24 10:50:14 Error initializing server: Application: default is in failed state as initialization failed
    08/06/24 10:50:16 Fatal error: server exiting
    Now, as far as I can tell, if you add that line to the container's JVM, unless the container finds the library with Xalan on startup, it won't start. Which means you have to have the application deployed whenever you restart the container.
    I shouldn't need to remove that line every time I want to restart a container that doesn't contain the right application for it's dependencies.
    So, while this is a quick fix, perhaps a shared-lib solution would be better for all concerned?
    http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html

  • Error in ABAP XSLT transformation

    Hi,
    Im trying to upload some data from XML to abap. But Im getting an error while transforming xml data to internal table.
    Here are the details.
    XML:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
      <!--  Edited by XMLSpy® -->
    <?xml-stylesheet type="text/xsl" href="ABAP1.xsl"?>
    <conceptRevDecisionXml>
    <projectInfo>
    <projectId>P000755</projectId>
    <stage>CON</stage>
    <country>Ethiopia</country>
    <region>AFRICA</region>
    <teamleader>Priya Agarwal</teamleader>
    <teamleaderfirstname>Priya</teamleaderfirstname>
    <teamleaderlastname>Agarwal</teamleaderlastname>
    <actionType>X</actionType>
    </projectInfo>
    </conceptRevDecisionXml>
    XSLT: Transformation
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sapxsl="http://www.sap.com/sapxsl"
    >
    <xsl:strip-space elements="*"></xsl:strip-space>
    <xsl:template match="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <PROJID>
              <xsl:apply-templates select="//conceptRevDecisionXml"></xsl:apply-templates>
            </PROJID>
          </asx:values>
        </asx:abap>
    </xsl:template>
    <xsl:template match="conceptRevDecisionXml">
          <xsl:for-each select="projectInfo">
           <xsl:value-of select="projectId"></xsl:value-of>
           <xsl:value-of select="stage"></xsl:value-of>
           <xsl:value-of select="country "></xsl:value-of>
           <xsl:value-of select="region"></xsl:value-of>
           <xsl:value-of select="teamleader"></xsl:value-of>
           <xsl:value-of select="teamleaderfirstname"></xsl:value-of>
           <xsl:value-of select="teamleaderlastname"></xsl:value-of>
            <xsl:value-of select="actionType"></xsl:value-of>
            </xsl:for-each>
        </xsl:template>
    </xsl:transform>
    Once I run the program...Im getting an error saying...ABAP XML Formatting error in XML node..
    Im new to ABAP-XML parsing..Pls help me where Im going wrong..
    Thanks in advance.
    Regards,
    Priya

    Hi Priya,
    you can try with the below,
    1) Create a local ITAB with the structure of the XML,
    TYPES: BEGIN OF t_data,
            projectid           TYPE char30,
            stage               TYPE char30,
            country             TYPE char30,
            region              TYPE char30,
            teamleader          TYPE char30,
            teamleaderfirstname TYPE char30,
            teamleaderlastname  TYPE char30,
            actiontype          TYPE char30,
           END OF t_data.
    2) Create an XSLT prog in "STRANS" with the below code,
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <L_DATA>
    <xsl:apply-templates select="//projectInfo"/>
    </L_DATA>
    </asx:values>
    </asx:abap>
    </xsl:template>
    <xsl:template match="projectInfo">
    <conceptRevDecisionXml>
    <PROJECTID>
    <xsl:value-of select="projectId"/>
    </PROJECTID>
    <STAGE>
    <xsl:value-of select="stage"/>
    </STAGE>
    <COUNTRY>
    <xsl:value-of select="country"/>
    </COUNTRY>
    <REGION>
    <xsl:value-of select="region"/>
    </REGION>
    <TEAMLEADER>
    <xsl:value-of select="teamleader"/>
    </TEAMLEADER>
    <TEAMLEADERFIRSTNAME>
    <xsl:value-of select="teamleaderfirstname"/>
    </TEAMLEADERFIRSTNAME>
    <TEAMLEADERLASTNAME>
    <xsl:value-of select="teamleaderlastname"/>
    </TEAMLEADERLASTNAME>
    <ACTIONTYPE>
    <xsl:value-of select="actionType"/>
    </ACTIONTYPE>
    </conceptRevDecisionXml>
    </xsl:template>
    </xsl:transform>
    3) Call the transformation as shown below,
    CALL TRANSFORMATION zxslt_project ---> "Name of the XSLT prog created above
    SOURCE XML l_xml_str                           ---> Source XML string
    RESULT l_data = l_data.                          ---> ITAB as in step 1 above
    Regards,
    Chen

  • Transport of Transformation failed with RC= 12 and job: RDDEXECL cancelled in Target sytem

    Gurus,
    When i am importing the workbench request from dev to qty.
    I am getting error : Program terminated (job: RDDEXECL, no.: 22321300).
    Transformation contains only Endroutine.
    Job log:
    Job started
    Step 001 started (program RDDEXECL, variant , user ID DDIC)
    All DB buffers of application server xxxxxx were synchronized
    The internal session was terminated with the runtime error UNCAUGHT_EXCEPTION (see ST2
    Job cancelled.
    When i see the dump it is througing errror at the method of following class.
    CL_RSO_TLOGO_PERSISTENCY-CHECK_INITIALIZED
    Could you please help. Thanks in advance.
    Ashok

    Hi Ashok,
    In QA use program "RSTRAN_ROUT_RSFO_CHECK" to check and remove any inconsistencies for the transformations. After that again transport those transformations in new TR and import in QA.
    Also you have to search "Transport of Transformation failed with RC= 12 and job: RDDEXECL canceled in Target system" by Dinesh Tiwari.
    Check the reply of Fun Sébastien in http://scn.sap.com/message/13795238#13795238.

  • Error when applying a XSLT transformation: No valid XSLT pro

    Dear All,
    I am getting following error when opening the "General Supplier Data" from Pre-Select Supplier.
    Error Message: "Error message: Error when applying a XSLT transformation: No valid XSLT program supplied"
    I have already read the related threads on SDN and checked the SAP Note 883896 and others. Even tried running the program UXS_DEL_NAVIGATION_NODE and UXS_ADD_MISSING_XSLT_NAME. But not able to solve the issue.
    Kindly Help.
    Regards,
    Sagar

    Hi Masa,
    Thanks for reply. I have checked this note. As note suggests, S_DEVELOP auth object is assigned to the user. and it has value *.
    Do I need to check anything else?
    Regards,
    Sagar

  • Error when applying a XSLT transformation

    central instance
    transaction SURVEY
    Extras->Target Group Hierarchy-> Import from file
    select file
    Error when applying a XSLT transformation
    dialog instance working

    Hello Andrey Kuryanov,
    Could make sure you describe the problem more clear as much as you can so that community can help you better.
    Please provide more details with more detailed steps and actual error messge.
    Thanks
    Raja Pamireddy
    Moderator

  • UTF-8 encoding in XSLT transformation

    Hello,
    I have a problem with a transformation of an ABAP structure into XML. I use the XSLT transformation for this.
    My XSLT starts like this:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:strip-space elements="*"/>
      <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
        <asx:values>
    I tried many settings I could find posted on the internet, but I did not find one that would allow encoding to UTF-8.
    It always encodes to iso-8859-1 which my interface partner cannot read.
    Does anyone know a way to force encoding to UTF-8?
    Adding a command like <xsl:output encoding="utf-8"/> did not help.
    Thanks a lot!
           J. Euler

    Hello!
    I think I just solved the problem taking a different approach.
    In a note here on SDN, a guy from SAP wrote, that the SAP XSLT processor is not able to code anything but the system's default to a string, BUT that it is able to code it to an xstring.
    All I did now is add the tag  
    <xsl:output encoding="utf-8" indent="yes" method="xml"/>
    to my xslt program and change the coding in the program accordingly.
    The program code is now:
      DATA: tempxstring TYPE xstring,
            temp_length TYPE i,
            conv      TYPE REF TO cl_abap_conv_in_ce.
      CLEAR tempxstring.
      TRY.
          CALL TRANSFORMATION
              zxxje_tst_xslt
            SOURCE omsregdatawebservice = wa_data
            RESULT XML tempxstring.
        CATCH cx_sy_conversion_base64.
        CATCH cx_sy_conv_illegal_date_time.
      ENDTRY.
      IF tempxstring IS NOT INITIAL.
        CLEAR: conv, temp_length, string_xml_result.
        conv = cl_abap_conv_in_ce=>create( input = tempxstring ).
        conv->read( IMPORTING data = string_xml_result len = temp_length ).
      ENDIF.
    Thanks anyways for all your help!
    regards,
          Johannes Euler

  • ABAP XSLT transformation - XML to deep structure/nested standard table

    Hi all,
    I was struggling with this topic recently and couldn't find a single working example or description of a possible solution. So now that I've sorted it out, I did a quick example to elustrate how it works. Here is the code with XML embeded in it and the XSLT follows:
    <HR>
    <PRE>
    *& Report  Z_XML2ABAP
    *& Author: Jayanta Roy
    *& Date: 03/02/2010
    REPORT  z_xml2abap.
    DATA input_xml TYPE string.
    TYPES: BEGIN OF t_address,
            house_no TYPE string,
            street_name TYPE string,
            city_name TYPE string,
            phone_no TYPE string,
          END OF t_address.
    TYPES: t_addresses TYPE STANDARD TABLE OF t_address with NON-UNIQUE KEY house_no.
    TYPES: BEGIN OF t_person,
            firstname TYPE string,
            surname TYPE string,
            addresses TYPE t_addresses,
          END OF t_person.
    input_xml = '&lt;Friends&gt;' &&
      '&lt;People&gt;' &&
        '&lt;FirstName&gt;Homer&lt;/FirstName&gt;' &&
        '&lt;Surname&gt;Simpson&lt;/Surname&gt;' &&
          '&lt;Address&gt;' &&
            '&lt;HouseNo&gt;123&lt;/HouseNo&gt;' &&
            '&lt;Street&gt;Evergreen Terrace&lt;/Street&gt;' &&
            '&lt;City&gt;Springfield&lt;/City&gt;' &&
            '&lt;PhoneNo&gt;011212321&lt;/PhoneNo&gt;' &&
          '&lt;/Address&gt;' &&
          '&lt;Address&gt;' &&
            '&lt;HouseNo&gt;7G&lt;/HouseNo&gt;' &&
            '&lt;Street&gt;Neuclear Power Plant&lt;/Street&gt;' &&
            '&lt;City&gt;Spring Field&lt;/City&gt;' &&
            '&lt;PhoneNo&gt;911&lt;/PhoneNo&gt;' &&
          '&lt;/Address&gt;' &&
      '&lt;/People&gt;' &&
      '&lt;People&gt;' &&
         '&lt;FirstName&gt;Bart&lt;/FirstName&gt;' &&
         '&lt;Surname&gt;Simpson&lt;/Surname&gt;' &&
           '&lt;Address&gt;' &&
             '&lt;HouseNo&gt;123x&lt;/HouseNo&gt;' &&
             '&lt;Street&gt;Evergreen Terracex&lt;/Street&gt;' &&
             '&lt;City&gt;Springfieldx&lt;/City&gt;' &&
             '&lt;PhoneNo&gt;011212321x&lt;/PhoneNo&gt;' &&
           '&lt;/Address&gt;' &&
       '&lt;/People&gt;' &&
    '&lt;/Friends&gt;' .
    DATA lt_person TYPE STANDARD TABLE OF t_person.
    TRY.
        CALL TRANSFORMATION xslt_person
        SOURCE XML input_xml
        RESULT  all_people = lt_person.
      CATCH cx_root.
        WRITE 'Problemo!'.
    ENDTRY.
    WRITE 'Now, debug the program to see the values read from the XML'.
    </PRE>
    <HR>
    and here is the XSLT Transformation program (xslt_person):
    <HR>
    <PRE>
    &lt;xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                        xmlns:sap="http://www.sap.com/sapxsl" version="1.0"&gt;
      &lt;xsl:strip-space elements="*"/&gt;
      &lt;xsl:template match="/"&gt;
        &lt;asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"&gt;
          &lt;asx:values&gt;
            &lt;ALL_PEOPLE&gt;
              &lt;xsl:apply-templates select="//People"/&gt;
            &lt;/ALL_PEOPLE&gt;
          &lt;/asx:values&gt;
        &lt;/asx:abap&gt;
      &lt;/xsl:template&gt;
      &lt;xsl:template match="People"&gt;
        &lt;ALLMYFRIENDS&gt;  &lt;!This element name is not relevent... needed to just group the loop&gt;
          &lt;FIRSTNAME&gt;
            &lt;xsl:value-of select="FirstName"/&gt;
          &lt;/FIRSTNAME&gt;
          &lt;SURNAME&gt;
            &lt;xsl:value-of select="Surname"/&gt;
          &lt;/SURNAME&gt;
          &lt;ADDRESSES&gt;
            &lt;xsl:for-each select="Address"&gt;
              &lt;ADDRESS&gt; &lt;!This element name is not relevent... needed to just group the loop&gt;
                &lt;HOUSE_NO&gt;
                  &lt;xsl:value-of select="HouseNo"/&gt;
                &lt;/HOUSE_NO&gt;
                &lt;STREET_NAME&gt;
                  &lt;xsl:value-of select="Street"/&gt;
                &lt;/STREET_NAME&gt;
                &lt;CITY_NAME&gt;
                  &lt;xsl:value-of select="City"/&gt;
                &lt;/CITY_NAME&gt;
                &lt;PHONE_NO&gt;
                  &lt;xsl:value-of select="PhoneNo"/&gt;
                &lt;/PHONE_NO&gt;
              &lt;/ADDRESS&gt;
            &lt;/xsl:for-each&gt;
          &lt;/ADDRESSES&gt;
        &lt;/ALLMYFRIENDS&gt;
      &lt;/xsl:template&gt;
    &lt;/xsl:transform&gt;
    </PRE>
    <HR>
    HTH,
    Jayanta.

    thanks a LOT Jayanta..
    I was looking for an XSLT example for some time.. this one atleast got me started in the right direction..
    THANKS

  • XSLT Transformation problem

    Hi,
    hope anybody can help.
    I try to transform a object to another object via XSLT transformation.
    Here is my coding :
      DATA: wa_transformation TYPE y0dpl_structures.
      DATA: obj_import TYPE abap_trans_srcbind_tab,
            wa_import TYPE abap_trans_srcbind.
      DATA: obj_export TYPE abap_trans_resbind_tab,
            wa_export TYPE abap_trans_resbind.
      DATA: obj_data TYPE REF TO data.
    * Get transformation data
      SELECT SINGLE *
      INTO wa_transformation
      FROM y0dpl_structures
      WHERE filetype = i_file_type.
    * Create table with internal structure
      CREATE DATA e_data TYPE (wa_transformation-structure_name).
      wa_import-name = 'IMPORT'.
      GET REFERENCE OF i_data INTO wa_import-value.
      APPEND wa_import TO obj_import.
    * Call transformation
      CALL TRANSFORMATION (wa_transformation-transformation)
      SOURCE (obj_import)
      RESULT (obj_export).
    i_data is a import parameter from type "ref to data".
    My problem is, that "Call transformation" makes a shortdump when calling them.
    Regards,
    Anton

    Found a solution for my problem. Now it works!
      DATA: wa_transformation TYPE y0dpl_structures.
      DATA: obj_import TYPE abap_trans_srcbind_tab,
            wa_import TYPE abap_trans_srcbind.
      DATA: obj_data TYPE REF TO data.
      DATA: wa_return TYPE bapiret2.
      FIELD-SYMBOLS: <data> TYPE ANY TABLE.
    * Get transformation data
      SELECT SINGLE *
      INTO wa_transformation
      FROM y0dpl_structures
      WHERE filetype = i_file_type.
      IF sy-subrc IS INITIAL.
    * Create table with internal structure
        CREATE DATA e_data TYPE STANDARD TABLE OF (wa_transformation-structure_name).
        ASSIGN i_data->* TO <data>.
        wa_import-name = 'IMPORT'.
        GET REFERENCE OF <data> INTO wa_import-value.
        APPEND wa_import TO obj_import.
    * Call transformation
        CALL TRANSFORMATION (wa_transformation-transformation)
        SOURCE (obj_import)
        RESULT export_data = e_data.
      ELSE.
        MOVE:  'Y0_DPL' TO wa_return-id,
               'E'      TO wa_return-type,
               '108'    TO wa_return-number.
        APPEND wa_return TO e_return.
        CLEAR: wa_return.
      ENDIF.

  • BI Admin Tool and XSLT transformation for XML data source - How it works ?

    Hello,
    There is a possibility to import data from XML data source using BI Admin Tool.
    In the import window we can point XSLT file. What is the purpose of that XSLT field?
    Why I am asking ?
    I thought it is smth like XSLT processor, but simply it doesnt work.
    What I did:
    - I pointed XML data source file
    - I pointed XSLT transformation file
    - Click OK, and still get the message that the XML file structure is not supported
    After that I transformed that XML file with some desktop XSLT processor using the same XSLT file, and I tried to connect that file directly using BI Admin tool.Then it works. So it means that the transformation is ok.
    So basically one question comes to my mind in that situation:
    What is the purpose of XSLT field in BI Admin Tool when it comes to XML data source ?
    (it doesnt look like XSLT processor)
    Greetings
    /Michal

    Hi Mariano
    Why you need to use XSLT for transforming XML file into ABAP table
    Code is a part of some ABAP report. Looks like it is reading a file from file system and updating table after transformation
    If you have requirement like you need to read XML file and then insert the data into a SAP table
    You can use
    File to RFC
    File to Proxy scenario using SAP PI.
    Please provide more inputs on requirement to help
    Thanks
    Gaurav

  • XSLT transformation for XML to ABAP internal table

    Hi, can anyone please tell me how it should be the xslt tranformation to conver this xml
    <Embargos_ARBA_DOC>
         <ns:Embargos_ARBA_MT
              xmlns:ns="un:swissmedical:sap:proxy:embargos_arba:file">
              <Embargos_ARBA_MT>
                   <FECHA>20081101</FECHA>
                   <CUIT>50000002124</CUIT>
                   <MONTO>0000013794090</MONTO>
                   <RAZON_SOCIAL>RAUL ARMANDO CUNQUEIRO S.A.C.I.</RAZON_SOCIAL>
              </Embargos_ARBA_MT>
              <Embargos_ARBA_MT>
                   <FECHA>20081101</FECHA>
                   <CUIT>55000001456</CUIT>
                   <MONTO>0000001144410</MONTO>
                   <RAZON_SOCIAL>PARODI ESTEBAN ARMANDO</RAZON_SOCIAL>
              </Embargos_ARBA_MT>
         </ns:Embargos_ARBA_MT>
    </Embargos_ARBA_DOC>
    to this abap Table....
      DATA: BEGIN OF i_embargos_arba_doc occurs 0,
              fecha TYPE d,
              cuit TYPE char11,
              monto TYPE char13,
              razon_social(120),
            END OF i_embargos_arba_mt.
    so i can transform it with this sentence
          CALL TRANSFORMATION ('embargos_transformation')
            SOURCE XML source
            RESULT Embargos_ARBA_DOC = embargos.
    pls i need help because i am unable to create this xslt transformation...
    I will give the highest rewards points to the one who can help me.
    thanks!
    mariano

    Hi Mariano
    Why you need to use XSLT for transforming XML file into ABAP table
    Code is a part of some ABAP report. Looks like it is reading a file from file system and updating table after transformation
    If you have requirement like you need to read XML file and then insert the data into a SAP table
    You can use
    File to RFC
    File to Proxy scenario using SAP PI.
    Please provide more inputs on requirement to help
    Thanks
    Gaurav

  • XSLT Transformation

    Hi,
    I am trying to upload one xml file and filling an internal table with the content and a XSLT transformation. After uploading the file and make the first transformation i obtein one string with all the fields without tags and separated by #. so when i try to call transformation for filling the internal table i obtein the exception cx_xslt_exception with the message 'No valid source context supplied'.
    I would like to know if i am having poroblems with unicode characters. Is there any example made in sap that i can test or does anybody have had any similar problem?.
    My string
    <?xml version="1.0" encoding="utf-16"?>#######S####L####08##2######
    Thanks in advance
    regards

    Hi Verma,
    You're not transforming anything from your input to the output shown. You're actually constructing a new Output. I don't see anything being transformed from input to output.
    Anyway, if you need a XSLT to be used to get the above Output in map, following XSLT shall help you:
    <?xml version="1.0" encoding="UTF-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0" version="1.0" xmlns:s0="http://xmlns.service/1" xmlns:ns1="http://xmlns.types/1.0" xmlns:ns0="http://xmlns.OutService/2">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="/">
    <xsl:apply-templates select="/s0:Request" />
    </xsl:template>
    <xsl:template match="/s0:Request">
    <Output xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://xmlns.OutService/2">
    <outContext xmlns:ns0="http://xmlns.OutService/2" xsi:type="ns0:ReferenceContext" xmlns="http://xmlns.types/1.0" />
    </Output>
    </xsl:template>
    </xsl:stylesheet>
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • XSLT Transformation Question

    Hi together!
    Hope anybody can help.
    I have the follow XML structure :
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">¶
    <asx:values>¶
    <IMPORT>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>222358   1NU    480350    29102007VENDA DE MERCADORIA        30</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>35403474</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>35403822</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>4480350</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>220089</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>3540347</DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    <DATA>4480351 </DATA>¶
    </Y0DPL_LATAM_INV_FILE_UPLOAD>¶
    </IMPORT>¶
    </asx:values>¶
    </asx:abap>
    After the XSLT Transformation i need the data in this structure :
    <data>
         <invoice>
               <id>222358</id>
               <item>35403474</item>
               <item>35403822</item>
               <code>4480350</code>
         </invoice>
         <invoice>
               <id>220089</id>
               <item>35403474</item>
               <code>4480351</code>
         </invoice>
    </data>
    I tried to group the data with the tag "xsl:for-each-group". But i get no result.
    Regards,
    Anton

    Hi,
    no one with a good hint?
    Regards,
    Anton

Maybe you are looking for

  • Disk Utility Erase - Default Setting?

    Hi everyone, what is the default setting when erasing the HD from Disk Utility? Is it 'Don't Erase Data' option? I didn't check the Security Options before erasing but after it did erase the first time, I went back and used the 7 pass option. Is it s

  • Freezing White Screen in the beginning

    I installed Snow Leopard after I bought my Mac last night, but accidentally fell asleep while it was downloading. I woke up to the initial white screen with the apple and the loading wheel. I have tried several times to restart, but it never makes it

  • Pre-requistes for work S-Curves

    Hi, Request experts to clarify the below points. What are the Pre-requistes which need to be fulfilled before we can execute the S-Curves for a network activity, WBS element or Project? Is progress analysis mandatory to draw S-Curves? If not, how to

  • Why does Adobe Premiere CS6 slow playback after importing some audio?

    Adobe Premiere CS6.0 v6.0.2 Mac Pro: 1, 4 core - 3.2ghz CPU 16gb ram (4 sticks of 4gb @ 1066 MHz) 1 Tb dive with OS/Apps on 2Tb 7200 RPM media drive ATI Radeon HD 5770 Sequence: 30Fps 1920x1080 Media: mostly .MFX files from a Canon XF100 however thes

  • TS4062 songs appear gray and won't play

    Songs appear gray instead of black and will not play.  This is happening to newly downloaded songs from itunes as well as some older songs already on my device and in the library.