Reg - XSLT Mapping using stylesheet exception during test

Hi experts,
I am new to SAP PI. Currently i am working on PI's XSLT Mapping using Stylusstudio.
I got error *Transformer Configuration Exception occurred when loading XSLT <name>.xsl; details: Could not compile stylesheet*.
I tried test by selecting SAP XML TOOLKIT too, then i am facing
*com.sap.engine.lib.xml.parser.NestedSAXParseException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: Prefix 'a' is not mapped to a namespace (:main:, row:4, col:15)(:main:, row=4, col=15) -> com.sap.engine.lib.xml.parser.ParserException: XMLParser: Prefix 'a' is not mapped to a namespace (:main:, row:4, col:15)*.
Kindly help me to overcome this issue.

Hi,
Simply your XSLT file is not a well-formed XML. Check your syntax. You could also use the XML Tools plugin to Notepad++ to help you determine where the syntax error is precisely.
Moreover, this error "Prefix 'a' is not mapped to a namespace" might mean that you are using a tag: <a:something>, but "a" is not properly declared as a namespace, for instance like: xmlns:a="something.sap.com".
Hope this helps,
Greg

Similar Messages

  • XSLT Mapping, Transformer configuration exception occurred when loading

    Hi,
    My source message is an IDOC HRMD, I need my target message to include exactly
    <EPERSON xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ContextPersonMessage">
    I have therefore suggested to use XSLT mapping.
    Here is the test_mapping.xsl that I Imported as Zip in Imported Archives.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://polyright.com/xi/HR">
         <xsl:template match="/">
              <EPERSON xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ContextPersonMessage">
                          <xsl:for-each select="HRMD_A07/IDOC/E1PLOGI">
                <CONTEXTPERSON personid="" id="">
                      <PERSON action="add">
                               <TITLE></TITLE>
                               <FIRSTNAME><xsl:value-of select="E1PITYP/E1P0002/VORNA"/></FIRSTNAME>
                               <SECONDNAME></SECONDNAME>
                               <NAME><xsl:value-of select="E1PITYP/E1P0002/NACHN"/></NAME>
                               <ADDRESS1></ADDRESS1>
                               <ADDRESS2></ADDRESS2>
                               <POSTALCODE></POSTALCODE>
                               <CITY></CITY>
                               <COUNTRY></COUNTRY>
                               <COUNTRYID></COUNTRYID>
                               <PROFESSION></PROFESSION>
                               <LANGUAGE></LANGUAGE>
                               <LANGUAGEID></LANGUAGEID>
                               <PERSONTYPEID></PERSONTYPEID>
                               <CREATIONDATE></CREATIONDATE>
                               <BIRTHDATE></BIRTHDATE>
                               <CATEGORY></CATEGORY>
                             </PERSON>
                      </xsl:for-each>
              </EPERSON>
         </xsl:template>
    </xsl:stylesheet>
    When I test the Interface mapping, I get the following error:
    Transformer configuration exception occurred when loading XSLT test_mapping.xsl (http://polyright.com/xi/HR, 783938d1-4463-11dd-b136-e03ac0a80c15, -1)
    Searching through the forum, it is probably an namespace issue, but I have no idea of what needs to be changed. Any suggestions ?

    Try running end-to-end scenario and check if you could get detailed error message.
    Also check if the problem arises from the "ns0" usage.
    Regards,
    Prateek

  • Not in class path - XSLT Mapping using Stylus studio

    Hello,
    I am using Stylus studio for XSLT mapping. I have written a JAVA function and when I tried to execute, I am getting an error " ...... not inclasspath".
    I have put JAVA file in the classpath as expained in the Stylus studio help documentation.
    Can anyone help me on how to place the Java class file in the proper class path and how that java file has to be called from main XML program.
    Regards and Thanks in Advance
    Arvind

    Hello sabarish,
    I have tried already as explained in the link you have mentioned. But still not working. In fact i was thinking to zip xsl, class and java files together and upload to XI. But I want to ensure whether i have called the java extension properly from XSL file.
    Request you check this:
    Java file
    package com.eds.ehro.ximapping;
    import java.util.Map;
    //import com.sap.aii.mapping.api.AbstractTrace;
    //import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.*;
    import java.text.*;
    public class Concat_Employee_Sydate_Sytime {
                 public static String concat(String empno)
                 return empno + "-" + System.currentTimeMillis();
    XSL file
    <?xml version='1.0' ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://www.gemsconsult.com/idoctofile/employee"
      xmlns:javamap="com.eds.ehro.ximapping.Concat_Employee_Sydate_Sytime">
         <xsl:template match="/">
              <ns1:SetEmployeesDemographics_R xmlns:ns1="urn:EmpDemoVi">
                   <ns1:demographics0>
                        <ns2:address xmlns:ns2="urn:com.sap.eds_ehro.besrv.demographics">
                             <ns2:adressLine>
                                  <xsl:value-of select="concat(ns0:MT_EMPDETAILS/AddressLine1,ns0:MT_EMPDETAILS/AddressLine2)"/>
                             </ns2:adressLine>
                             <ns2:countyCode>
                                  <xsl:value-of select="ns0:MT_EMPDETAILS/Country"/>
                             </ns2:countyCode>
                             <ns2:postalCode>
                                  <xsl:value-of select="ns0:MT_EMPDETAILS/Zipcode"/>
                             </ns2:postalCode>
                        </ns2:address>
                        <ns2:clientID xmlns:ns2="urn:com.sap.eds_ehro.besrv.demographics">200</ns2:clientID>
                        <ns2:employeeID xmlns:ns2="urn:com.sap.eds_ehro.besrv.demographics">
                             <xsl:param name="empno">
                                  <xsl:value-of select="ns0:MT_EMPDETAILS/EmployeeNo"/>
                             </xsl:param><!xsl:value-of select="ns0:MT_EMPDETAILS/EmployeeNo"/>
                             <xsl:if test="ns0:MT_EMPDETAILS/EmployeeNo">
                                  <xsl:value-of select="javamap:concat($empno)"/>
                             </xsl:if>
                        </ns2:employeeID>
                        <ns2:personName xmlns:ns2="urn:com.sap.eds_ehro.besrv.demographics">
                             <ns2:firstName>
                                  <xsl:value-of select="ns0:MT_EMPDETAILS/FirstName"/>
                             </ns2:firstName>
                             <ns2:middleName>
                                  <xsl:value-of select="ns0:MT_EMPDETAILS/LastName"/>
                             </ns2:middleName>
                        </ns2:personName>
                   </ns1:demographics0>
              </ns1:SetEmployeesDemographics_R>
         </xsl:template>
    </xsl:stylesheet>

  • Exception During Testing WebDynpro Application in Developer Studio

    Hi,
    I am trying to test webdynpro application in developer studio as they have mentioned in the url -<b>http://help.sap.com/saphelp_nw04/helpdata/en/c1/c6213e225f9a0be10000000a114084/frameset.htm</b>
    <b>1)</b>During Recording i am getting successful result as follows
    Application Url: http://pawanm:50100/webdynpro/dispatcher/sap.com/compositeapp~webdynpro/MyApplication
    Port: 12000
    The Server is ready to accept Xml files from the Web Dynpro Runtime on Port 12000
    -->Client Connected....
    XML file received from runtime
    The Server is closed and it will not accept any more Xml documents from the Web Dynpro Runtime.
    The script has been stored on the local file system.
    <b>2)</b>But when i am trying to reply the script generated by recording then i am getting
    following error in console
    ->Contacting XML Client on Server to get initial XML document.
    ERROR: Contacted the Xml client on the J2EE Server, but did not receive an Xml document from it.
    <b>And in log viewer i am getting following error</b>
    Date : 03/30/2007
    Time : 20:44:47:481
    Message : Cannot send an HTTP error response [500 Application error occurred during request processing. (details: java.lang.NullPointerException: null)].
    The error is: com.sap.engine.services.servlets_jsp.server.exceptions.WebIOException: The stream is closed.
    Exception id: [0014222FC3E20052000009490000077C00042CE65506EC3A]
    Severity : Error
    Category : /System/Server/WebRequests
    Location : com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl
    Application : sap.com/tcwddispwda
    Thread : SAPEngine_Application_Thread[impl:3]_10
    Datasource : 17409750:C:\usr\sap\J2E\JC01\j2ee\cluster\server0\log\defaultTrace.trc
    Message ID : 0014222FC3E200520000094B0000077C00042CE65506EF1F
    Source Name : com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl
    Argument Objs :
    Arguments :
    Dsr Component :
    Dsr Transaction :
    Dsr User :
    Indent : 0
    Level : 0
    Message Code :
    Message Type : 0
    Relatives : /System/Server/WebRequests
    Resource Bundlename :
    Session : 0
    Source : com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl
    ThreadObject : SAPEngine_Application_Thread[impl:3]_10
    Transaction :
    User : Guest
    So anyony please help me by giving some guideline or send me some document or url from where i can get usefull document.
    And also please let me know that how to test CAF application by using some tool provided by SAP.  
    Thanks in Advance
    Pawan Mishra

    Hi Pawan
    Is your engine functioning properly.I mean go to http://localhost:port/index.html then chech out the webdynpro links and other links available on this page .I am suggesting this so that we can check if <b>sap.com/tcwddispwda</b>
    is working fine.Then we can look into the speacific application you are working on
    Reward suitable points

  • Error in Muenchian method in XSLT mapping using sapxmltoolkit.jar

    Hi,
    The following example produces a different result in SAP from that of Altova, Microsoft providers. It is a resonably complex Muenchian transformation that I have reduced this to the core issue:
    Have tried with SP14 but same result on every delivered version of sapxmltoolit.jar
    I am trying to extract a unique set of locationCodes to assemble an IDOC for each locationCode - breaking out the relevant order lines.
    <b>My question is twofold:</b>
    a) is the behaviour of sapxmltoolkit errannt to the spec?
    b) is there another way to produce this list or work around?
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" version="1.0" indent="yes"/>
      <xsl:key name="partner-ids" match="PRODQNTY/LOCNQNTY" use="locationCode"/>
      <xsl:template name="buildIdoc" match="ORDER">
        <ORDERS05>
          <xsl:for-each select="PRODQNTY/LOCNQNTY[count(.|key('partner-ids',locationCode)[1])=1]">
            <xsl:sort select="locationCode" data-type="number"/>
            <xsl:comment><xsl:value-of select="locationCode"/> Location Code</xsl:comment>
            <xsl:comment><xsl:value-of select="../lineNo"/> Line Number</xsl:comment>
            <IDOC BEGIN="1"></IDOC>
          </xsl:for-each>
        </ORDERS05>
      </xsl:template>
    </xsl:stylesheet>
    <b>Sample input document:</b>
    ?xml version="1.0"?>
    <ORDER loops-id="ORDER">
      <PRODQNTY loops-id="PRODQNTY">
        <lineNo>1</lineNo>
        <productCode>9990007454</productCode>
        <LOCNQNTY>
          <locationCode>001</locationCode>
          <quantityOrdered>6</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>004</locationCode>
          <quantityOrdered>3</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>005</locationCode>
          <quantityOrdered>2</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>006</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>007</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>009</locationCode>
          <quantityOrdered>3</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>021</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>082</locationCode>
          <quantityOrdered>2</quantityOrdered>
        </LOCNQNTY>
        <unDefData></unDefData>
        <segmentCount>0</segmentCount>
      </PRODQNTY>
      <PRODQNTY loops-id="PRODQNTY">
        <lineNo>2</lineNo>
        <productCode>1864503696</productCode>
        <LOCNQNTY>
          <locationCode>001</locationCode>
          <quantityOrdered>4</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>004</locationCode>
          <quantityOrdered>2</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>005</locationCode>
          <quantityOrdered>2</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>006</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>007</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>009</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>021</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>082</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
      </PRODQNTY>
    </ORDER>
    <b>Expected Output:</b> - from Altova - 1 record per locationCode
    <?xml version="1.0" encoding="UTF-8"?>
    <ORDERS05>
         <!--001 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--004 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--005 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--006 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--007 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--009 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--021 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--082 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
    </ORDERS05>
    <b>Output from sapxmltoolkit.jar</b> - 1 record per locationCode per PRODQNTY line so I get a non unique set of locationCodes: (every location twice in this example - and with 16 order lines, every location 16 times and 128 IDOCs (instead of 8 IDOCs).
    <?xml version="1.0" encoding="utf-8"?>
    <ORDERS05>
      <!--001 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--001 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--004 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--004 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--005 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--005 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--006 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--006 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--007 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--007 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--009 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--009 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--021 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--021 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--082 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--082 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
    </ORDERS05>

    A bit more heartache & trials and I solved it
    The key defition is unstable in XSLT the way I defined it
    Simple change to the XSLT: remove the PRODQNTY node reference from the match attribute:
    <b>incorrect key:</b>
    <xsl:key name="partner-ids" match="PRODQNTY/LOCNQNTY" use="locationCode"/>
    <b>correct key:</b>
    <xsl:key name="partner-ids" match="LOCNQNTY" use="locationCode"/>
    And the "group-by or Muenchian method" loop statement:
    <xsl:for-each select="PRODQNTY/LOCNQNTY[count(.|key('partner-ids',locationCode)[1])=1]">
    Hopes this helps someone else....
    Regds Doug.

  • Easy RFC lookup from XSLT mapping using a java class (getting Error)

    Hi All,
    I am trying to implement the sample scenario for calling RFC from xslt with the help of wrapper class. I am getting following error.
    com.sap.aii.mapping.lookup.LookupException: Internal lookup service is not registered. Invoking the lookup service is only supported in the Integration Builder test environment or in the Integration Server runtime environment. at com.sap.aii.mapping.lookup.LookupService.getService(LookupService.java:400) at com.sap.aii.mapping.lookup.LookupService.getChannel(LookupService.java:285) at com.sap.aii.mapping.lookup.LookupService.getChannel(LookupService.java:318) at dk.applican.xi.mapping.lookup.RfcLookup.execute(RfcLookup.java:55) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.lib.xsl.xpath.functions.JLBFunction.execute(JLBFunction.java:145) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:110) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:54) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:41) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:49) at com.sap.engine.lib.xsl.xslt.XSLVariable.process(XSLVariable.java:125) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:228) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:256) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.callTemplate(XSLStylesheet.java:1310) at com.sap.engine.lib.xsl.xslt.XSLCallTemplate.process(XSLCallTemplate.java:102) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:228) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:241) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:228) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:241) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:228) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:256) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:445) at com.sap.engine.lib.xsl.xslt.XSLApplyTemplates.process(XSLApplyTemplates.java:158) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:228) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:256) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:445) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:381) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:392) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:234) at com.sap.aii.ibrun.server.mapping.MappingTransformer.transform(MappingTransformer.java:153) at com.sap.aii.ibrun.server.mapping.XSLTMapping.executeStep(XSLTMapping.java:67) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:91) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:77) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:88) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:63) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:80) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0.processFunction(MappingServiceObjectImpl0.java:131) at sun.reflect.GeneratedMethodAccessor482.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy22.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:95) at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequestInternal(RFCJCOServer.java:113) at com.sap.engine.services.rfcengine.RFCJCOServer$ApplicationRunnable.run(RFCJCOServer.java:171) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162
    I am SAP XI 3.0 SP-9

    Hello,
    I have the same issue as stated above.
    At runtime sometimes the mapping fails however when executing the mapping from ESR (test operation mapping) with the same payload it is executed succesfully (lookup is to system that is the senderservice of the scenario).
    Anybody a clue.
    Also clearing mapping cache etc. did not solve the problem.
    Thanks,
    Emile

  • Reg:xslt mapping

    Hi,
    If the source structure is
    <bookstore>
      <books>
         <author>
         <title>
         <subject>
      </books>
    </bookstore>
    And in the target structure i need to copy all the fields below <books> node in to another node in the target structure
    for eg,
    <Bookstore>
      //add two other nodes with values from the source node which is done
      <books>
        //copy all the fields from the source <book> node.
      </books>
    </Bookstore>
    So how will copy all the fields from the source node to target node???
    regards
    jithesh

    Hi Jithesh,
      We ofcourse are dealing at the place, where you get "books". atleast, when we write syntax. (You can make an overall for-each on bookstore, which makes it available)
    But the idea is. in the copy-of command, if you provide the node (ofcourse it should be reachable), then you get a complete copy.
    Try it and let me know
      Hope this clarifies.
    Regards
    Vishnu

  • Exception during processing the payload in RFC Lookup through XSLT

    Hi All,
    We are working on a scenario which does a RFC lookup through the XSLT mapping.
    While testing the XSL in he Interface mapping an Exception is generated:
    19:06:32 Start of test
    Call XSLT processor with stylsheet UKMGetKeyMapLatest.xsl.
    START APPLICATION TRACE ***
    reqNode<?xml version="1.0" encoding="UTF-8"?><rfc:UKM_GET_KEY_MAPPINGS xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><UKM_GET_KEY_MAPPING_Request>
    <b><b><b>LookupException com.sap.aii.mapping.lookup.LookupException: Exception during processing the payload.Problem when calling an adapter by using communication channel RFC_RCV_UKMS_TO_ISV_CSV_CSV (Party: , Service: RM_DEV_PI_ISV_001, Object ID: c09e707cfb253c8997dc2451cb83e3cd) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception</b></b></b>: (130) JCO_ERROR_XML_PARSER: Unexpecting end of buffer after <UKM_GET_KEY_MAPPING_Request>'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Unexpecting end of buffer after <UKM_GET_KEY_MAPPING_Request>'. com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel RFC_RCV_UKMS_TO_ISV_CSV_CSV (Party: , Service: RM_DEV_PI_ISV_001, Object ID: c09e707cfb253c8997dc2451cb83e3cd) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Unexpecting end of buffer after <UKM_GET_KEY_MAPPING_Request>'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Unexpecting end of buffer after <UKM_GET_KEY_MAPPING_Request>'. at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.process(AdapterProxyLocal.java:96) at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.call(SystemAccessorInternal.java:47) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:141) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:74) at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169) at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211) at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.af.service.api.AFException: XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Unexpecting end of buffer after <UKM_GET_KEY_MAPPING_Request>'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Unexpecting end of buffer after <UKM_GET_KEY_MAPPING_Request>'. at com.sap.aii.af.service.api.AdapterAccess.sendMsg(AdapterAccess.java:214) at com.sap.aii.af.service.api.AdapterAccess.call(AdapterAccess.java:99) at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.process(AdapterProxyLocal.java:87) at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.call(SystemAccessorInternal.java:47) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:141) at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:74) at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169) at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211) at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496) at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    END APPLICATION TRACE ***
    TransfromerException during XSLT processing:
    javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: Illegal number of arguments or types of arguments in a call of function 'lookup:getNodeContent'. at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:251) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150) at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: com.sap.engine.lib.xml.util.NestedException: Illegal number of arguments or types of arguments in a call of function 'lookup:getNodeContent'. at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:106) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLValueOf.process(XSLValueOf.java:76) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:431) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:394) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) ... 18 more -
    com.sap.engine.lib.xml.util.NestedException: Illegal number of arguments or types of arguments in a call of function 'lookup:getNodeContent'. at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:106) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLValueOf.process(XSLValueOf.java:76) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:248) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:272) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:463) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:431) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:394) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:398) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingTransformer.transform(RepMappingTransformer.java:150) at com.sap.aii.ibrep.server.mapping.ibrun.RepXSLTMapping.execute(RepXSLTMapping.java:81) at com.sap.aii.ibrep.server.mapping.ibrun.RepMappingHandler.run(RepMappingHandler.java:80) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:107) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInterfaceMapping(ServerMapService.java:127) at com.sap.aii.ibrep.server.mapping.ServerMapService.transform(ServerMapService.java:104) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.transform(MapServiceBean.java:40) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.transform(MapServiceRemoteObjectImpl0_0.java:167) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:104) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    19:06:42 End of test <b></b>
    Can any one please help in sorting this out?
    Thanks in advance.
    Sri..

    check with this:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14</a>

  • Use XSLT mapping for multiple payloads

    Lydia,
    Do you mean multiple mapping as
    <message1>
    Payload1
    </message1>
    <message2>
    Payload2
    </message2>
    If you are generating XSLT mapping using any tool then you have can take xsd from the messagemapping and just map it.
    in you  target structure message1, message2 should be there.
    Gaurav Jain
    Reward Points if answer is helpful

    Thank you for your response.  I tried several variations - including this one - but I can't seem to get the results to match your screen shot.  Also, I am not sure if the tag should be 'Content-Type' or content_type ....
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:ns0="urn:sap-com:document:sap:rfc:functions" xmlns:ns="http://sap.com/xi/XI/Mail/30">
         <xsl:output method="xml" encoding="utf-8" indent="no" omit-xml-declaration="yes"/>
         <xsl:template match="/">
              <xsl:apply-templates select="ORDERS02"/>
         </xsl:template>
         <xsl:template match="ORDERS02">
              <ns:Mail>
                   <Subject>
                        <xsl:text>Purchase Order: </xsl:text>
                   </Subject>
                   <From>
                        <xsl:text>mail.com</xsl:text>
                   </From>
                   <To>
                        <xsl:text>mail.com</xsl:text>
                   </To>
                   <Content_Type>
                        <xsl:text>multipart/mixed; boundary="b1"</xsl:text>
                   </Content_Type>
                   <Content><xsl:text>--b12&#10;</xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>Content-Type: text/plain; charset=us-ascii </xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>Content-Transfer-Encoding: 7bit </xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>My Order</xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>--b1</xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>Content-Type: text/plain; charset=us-ascii</xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>Content-Transfer-Encoding: 7bit</xsl:text>
                   <xsl:text>&#10;</xsl:text>
                   <xsl:text>Content-Disposition: attachment; filename="order.dc"</xsl:text>
                   <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:value-of select="IDOC/E1EDK01/BELNR"/>
                        <xsl:text>A </xsl:text>
                        <xsl:text>ORD 238            </xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:value-of select="IDOC/E1EDK01/BELNR"/>
                        <xsl:text>B</xsl:text>
                        <xsl:text>The Wolf Organization        </xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:value-of select="IDOC/E1EDK01/BELNR"/>
                        <xsl:text>C</xsl:text>
                        <xsl:text>PO Box 2044                  </xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:text>D</xsl:text>
                        <xsl:text>York, PA  17404-2044         </xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:text>E</xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:text>F</xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:text> </xsl:text>
                        <xsl:text>G</xsl:text>
                        <xsl:text>&#10;</xsl:text>
                        <xsl:apply-templates select="IDOC/E1EDP01"/>
                        <xsl:text> </xsl:text>
                   </Content>
                   <xsl:text>--b1--</xsl:text>
              </ns:Mail>
         </xsl:template>
         <xsl:template match="IDOC/E1EDP01">
              <xsl:text>Z</xsl:text>
              <xsl:text>                </xsl:text>
              <xsl:text>&#10;</xsl:text>
         </xsl:template>
    </xsl:stylesheet>

  • I want to genarate fixed legth file using XSLT mapping

    Hi Experts,
    I am doing File to Mail scenario, text file as an attachmetachment in reciver side, i have successfully send the text file as an attachment in the mail. but i need fixed length fields in the file.
    I know we can do it in XSLT mapping using <xsl:if> or <xsl:choose> but i dont know how to use it.
    Can anybody please tell how can i use those statements in XSLT.
    Kind Regards,
    Praveen.

    Hi Stefan,
    This is my XSLT mapping, I am not expert in XSLT please can you help me, i want to do fixed length for "cust_name" field below.
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ns0="http://www.Coj.co.za/SapIsuToABSA/DirectDebitFile">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:variable name="break">&lt;br/&gt;</xsl:variable>
    <xsl:variable name="space"> </xsl:variable>
    <xsl:variable name="newline"><xsl:text></xsl:text></xsl:variable>
    <xsl:template match="/">
    <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
    <Subject>Please Check Attached Direct Debit File</Subject>
    <From>joburg</From>
    <To>PraveenG</To>
    <Content_Type>text/plain</Content_Type>
    <Content>
    <xsl:for-each select="MT_SapIsuToABSA_DirectDebitFile/DirectDebitRec/Body">
    <xsl:value-of select="Space1"/>
    <xsl:value-of select="Cust_AccNo"/>
    <xsl:value-of select="Reserve_1"/>
    <xsl:value-of select = "Cust_name" />
    <xsl:value-of select="Cust_Name1"/>
    <xsl:value-of select="Cust_Bank_AccNo"/>
    <xsl:text>          </xsl:text>
    <xsl:value-of select="Space2"/>
    <xsl:value-of select="Cust_Bank_BranchNo"/>
    <xsl:value-of select="Reserve_2"/>
    <xsl:text>   </xsl:text>
    <xsl:value-of select="Space3"/>
    <xsl:value-of select="Cust_AccNo_1"/>
    <xsl:text>       </xsl:text>
    <xsl:value-of select="Space4"/>
    <xsl:value-of select="Reserve_3"/>
    <xsl:value-of select="Deduction_Amnt"/>
    <xsl:text>           </xsl:text>
    <xsl:value-of select="Space5"/>
    <xsl:value-of select="Reserve_4"/>
    <xsl:value-of select="Space6"/>
    <xsl:text>                      </xsl:text>
    <xsl:value-of select="Action_Date"/>
    <xsl:value-of select="Space7"/>
    <xsl:text>        </xsl:text>
    <xsl:value-of select="Reserve_5"/>
    <xsl:text>
    </xsl:text>
    </xsl:for-each>
    </Content>
      </ns1:Mail>
      </xsl:template>
      </xsl:stylesheet>

  • Exception during mapping Execution

    Hi Experts
    an Matmas05 xml is coming from MDM system. & it should be posted as Matmas05 in R/3.
    i imported the MDM content in IR. but the fields order in coming Matmas05 xml file and the fields order in
    Matmas05 Idoc  are Not same.
    while Executing Mapping it  throws 'Exception during mapping execution'
    so pls give solution How can i solve...this error
    pls ....urgent.
    thanks & regards
    swapna

    HI swapna,
    The XMl coming from MDM have the different sequence than the original Matmas05 IDOC that you have imported in IR,.
    Lets take it this way as the Original Matmas IDOC structre is not matched up with the sender side Structure.
    You can change the sequence of IDOC XSD file with some tools like Altova xmlSpy and make it same as sender side. Then import the modified XSD file as external defination and use it on sender side.
    On Receiver side your Matmas05 structre sequence should have to be original one.
    Now map the corresponding fields and execute the scenario.
    thanks
    Swarup

  • XSLT Mapping : RFC Lookup using java helper class

    Hi All,
    I am doing RFC Lookup in xslt mapping using java helper class. I have found blog for the same (http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14) However this blog is very advanced.
    Can anybody help me with step by step approach for the same?
    My basic questions are not answered in the blog as:
    1) where to add the jar file of the java class used in xslt mapping.
    I have added zip file of XSLT mapping in imported archived and using that in mapping.
    Thanks in advace.
    Regards,
    Rohan

    Hi,
    Can u please have look at this in detail , u can easily point out yourself the problem...
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/content.htm
    Please observe the line,
    xmlns:javamap="java:com.company.group.MappingClass
    in XSLT mapping..
    The packagename of class and class name and XSLT namespace should be matching...
    Babu
    Edited by: hlbabu123 on Sep 29, 2010 6:04 PM

  • How can i access value mapping table using xslt mapping

    Hi All,
    I have maintained value mapping table in integration directory.I want to access the data from the value mapping table in XSLT mapping using java function.PLease suggest me to do this.
    Thanks
    Pullarao.

    Value mapping that thread should solve your query !!!

  • Java Error in RFC Lookup in XSLT Mapping usinf Java helper class

    Hi All,
    I am doing RFC Lookup in XSLT Mapping using Java Helper class.
    The Lookup works fine when called one RFC at a time However my requirement is I want to do 2 Lookups.
    Both Lookups works when done individually however when I call both lookups in one mapping I get following error "javax.xml.transform.TransformerException: DOMSource whose Node is null."
    Following is the code I have written in XSLT for the lookup:
         <xsl:template name="Lookup_1">
              <xsl:param name="STDPN"/>
                   <rfc:RFC_READ_TABLE>
                        <QUERY_TABLE>KNA1</QUERY_TABLE>
                        <OPTIONS><item><TEXT>
                                  <xsl:value-of select="$STDPN"/>
                             </TEXT></item>
                        </OPTIONS>
                        <FIELDS>
                             <item>
                                  <FIELDNAME>KUNNR</FIELDNAME>
                             </item>
                        </FIELDS>
                   </rfc:RFC_READ_TABLE>
              </xsl:variable>
              <xsl:variable name="response" xmlns:lookup="java:urn.mt.pi" select="lookup:execute($request, 'BS_D, 'cc_RfcLookup', $inputparam)"/>
              <xsl:element name="STDPN">
                   <xsl:value-of select="$response//DATA/item/WA"/>
              </xsl:element>
         </xsl:template>
         <xsl:template name="Lookup_2">
              <xsl:param name="BELNR"/>
                   <xsl:variable name="Query">AGMNT = '<xsl:value-of select="$BELNR"/>'</xsl:variable>
                   <xsl:variable name="request1">
                        <rfc:RFC_READ_TABLE>
                             <QUERY_TABLE>ZTABLE</QUERY_TABLE>
                             <OPTIONS><item><TEXT>
                                  <xsl:value-of select="$Query"/>
                                  </TEXT></item>
                             </OPTIONS>
                             <FIELDS>
                                  <item>
                                       <FIELDNAME>KUNAG</FIELDNAME>
                                  </item>
                             </FIELDS>
                        </rfc:RFC_READ_TABLE>
                   </xsl:variable>
                   <xsl:variable name="response1" xmlns:lookup="java:urn.mt.pi" select="lookup:execute($request1, 'BS_D','cc_RfcLookup', $inputparam)"/>
                   <xsl:element name="BELNR">
                        <xsl:value-of select="$response1//DATA/item/WA"/>
                   </xsl:element>
         </xsl:template>
    My Question: Am I doing anything wrong? Or Is it possible to call multiple lookups in one XSLT?
    Thanks and Regards,
    Atul

    Hi Atul,
    I had the same problem like you had.
    The main Problem is that with the example code the request variable is created as NodeList object. In XSLT a variable is somekind of a constant and can't be changed. As the request object is empty after the first request the programm fails at the following line:
    Source source = new DOMSource(request.item(0));
    So I've created a workaround for this problem.
    In the call of the template I've put the request as a parameter object at the template call:
    <xsl:with-param name="req">
    <rfc:PLM_EXPLORE_BILL_OF_MATERIAL xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <APPLICATION>Z001</APPLICATION>
      <FLAG_NEW_EXPLOSION>X</FLAG_NEW_EXPLOSION>
      <MATERIALNUMBER><xsl:value-of select="value"/></MATERIALNUMBER>
      <PLANT>FSD0</PLANT>
      <VALIDFROM><xsl:value-of select="//Recordset/Row[name='DTM-031']/value"/></VALIDFROM>
      <BOMITEM_DATA/>
    </rfc:PLM_EXPLORE_BILL_OF_MATERIAL>
    </xsl:with-param>
    With this change the request will be provided as a String object and not as a NodeList object.
    Afterwards the RfcLookup.java has to be changed to the following:
    package com.franke.mappings;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.lookup.Channel;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.lookup.RfcAccessor;
    import com.sap.aii.mapping.lookup.LookupService;
    import com.sap.aii.mapping.lookup.XmlPayload;
    * @author Thorsten Nordholm Søbirk, AppliCon A/S
    * Helper class for using the XI Lookup API with XSLT mappings for calling RFCs.
    * The class is generic in that it can be used to call any remote-enabled
    * function module in R/3. Generation of the XML request document and parsing of
    * the XML response is left to the stylesheet, where this can be done in a very
    * natural manner.
    * TD:
    * Changed the class that request is sent as String, because of IndexOutOfBound-exception
    * When sending multiple requests in one XSLT mapping.
    public class RfcLookup {
         * Execute RFC lookup.
         * @param request RFC request - TD: changed to String
         * @param service name of service
         * @param channelName name of communication channel
         * @param inputParam mapping parameters
         * @return Node containing RFC response
         public static Node execute( String request,
                 String service,
                 String channelName,
                 Map inputParam)
              AbstractTrace trace = (AbstractTrace) inputParam.get(StreamTransformationConstants.MAPPING_TRACE);
              Node responseNode = null;
              try {
                  // Get channel and accessor
                  Channel channel = LookupService.getChannel(service, channelName);
                  RfcAccessor accessor = LookupService.getRfcAccessor(channel);
                   // Serialise request NodeList - TD: Not needed anymore as request is String
                   /*TransformerFactory factory = TransformerFactory.newInstance();
                   Transformer transformer = factory.newTransformer();
                   Source source = new DOMSource(request.item(0));
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   StreamResult streamResult = new StreamResult(baos);
                   transformer.transform(source, streamResult);*/
                    // TD: Add xml header and remove linefeeds for the request string
                    request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+request.replaceAll("[\r\n]+", ""); 
                    // TD: Get byte Array from request String to send afterwards
                    byte[] requestBytes = request.getBytes();
                   // TD: Not used anymore as request is String
                    //byte[] requestBytes = baos.toByteArray();
                    trace.addDebugMessage("RFC Request: " + new String(requestBytes));
                    // Create input stream representing the function module request message
                    InputStream inputStream = new ByteArrayInputStream(requestBytes);
                    // Create XmlPayload
                    XmlPayload requestPayload =LookupService.getXmlPayload(inputStream);
                    // Execute lookup
                    XmlPayload responsePayload = accessor.call(requestPayload);
                    InputStream responseStream = responsePayload.getContent();
                    TeeInputStream tee = new TeeInputStream(responseStream);
                    // Create DOM tree for response
                    DocumentBuilder docBuilder =DocumentBuilderFactory.newInstance().newDocumentBuilder();
                    Document document = docBuilder.parse(tee);
                    trace.addDebugMessage("RFC Response: " + tee.getStringContent());
                    responseNode = document.getFirstChild();
              } catch (Throwable t) {
                   StringWriter sw = new StringWriter();
                   t.printStackTrace(new PrintWriter(sw));
                   trace.addWarning(sw.toString());
              return responseNode;
         * Helper class which collects stream input while reading.
         static class TeeInputStream extends InputStream {
               private ByteArrayOutputStream baos;
               private InputStream wrappedInputStream;
               TeeInputStream(InputStream inputStream) {
                    baos = new ByteArrayOutputStream();
                    wrappedInputStream = inputStream;
               * @return stream content as String
               String getStringContent() {
                    return baos.toString();
              /* (non-Javadoc)
              * @see java.io.InputStream#read()
              public int read() throws IOException {
                   int r = wrappedInputStream.read();
                   baos.write(r);
                   return r;
    Then you need to compile and upload this class and it should work.
    I hope that this helps you.
    Best regards
    Till

  • RuntimeException in Message-Mapping transformation: Runtime exception durin

    Hi Friends,
    Iam going test Message Mapping, i got the error like
      RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:LeapIndent_R3_MT/Recordset/RowData/QTY_TNS. The message is: Exception:[java.lang.NumberFormatException: empty String] in class com.sap.aii.mappingtool.flib3.Arithm method formatNumber[, com.sap.aii.mappingtool.tf3.rt.Context@27f972cf]
    Pls help me ..
    Thanks & Regards,
    Nvr

    Hi Ravi,
      Thanks for ur reply, the problem is solved, the Date field is Mandaratory, they are not mention the data field, so that way the problem is coming.
    Thanks & Regards,
    NVR

Maybe you are looking for