XSLT Coding in XI

Hi Experts,
developing the new scenario for XSLT.
Here i need to write the condition in XSLT. Pls let me know if you have any idea on this....
Condition : i<10 and i>1
Note : Here i need to know inplace and postion..like how to write the code in XSLT.
Reward points for helpful answers...
Regards,
Yeswanth.

Hi Yeswanthraj,
For XSLT mapping, please try to create msg types for sender and recv, import these two into XML Mapforces (This is a software which enables us to do mapping this you can download from altova mapforce site) , do mapping in that mapforce , late click on XSLT icon , one XSLT file will be c reated that file , prepare zip and late come to xi , import under imported archieves,do Interface mapping by selecting the XSLT mapping option, select imported archieve..
See below examples..
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
http://www.troobloo.com/tech/xslt.toc.shtml
http://www.w3schools.com/xsl/
http://www.w3.org/TR/xslt
http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/generic%20xslt%20mapping%20in%20sap%20xi%2c%20part%20i.pdf
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
Required XSLT Mapping tips!
Reward points if helpful.
Regards
Vani.

Similar Messages

  • How to write XSLT codeing in file to file using XSLT mapping?

    Hi ,
    Experts,
    I am new to XSLT coding as iam doing File to File XSLT Mapping for i have created IR and ID part and i have wriiten XSLT codeing which is not working.
    source structure:                     Target structure
    Fname                                    Name  = (Fname+Lname)
    Lname
    maths   
    science                                   Total_marks = (mathssciencesocial)
    social   
    <?xml version='1.0' ?>
    <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:aash="http://xlst.file2file" xmlns:ns0="http://xlst.file2file">
    <xsl:template match="/">                                               |
    <aash:mt_student_result>                                      this is my Naming Space
    <Data>
    <Name>
    <xsl:value-of select="concat(ns0:mt_student/data/FName,ns0:mt_student/data/LName)"/>
    </Name>
    <Marks>
    <Total_Marks>
    <xsl:value-of select="(ns0:mt_student/data/Marks/Maths)(ns0:MT_Student/Data/Marks/Science)(ns0:mt_student/data/Marks/Social)"/>
    </Total_Marks>
    </Marks>
    </Data>
    </aash:mt_student_result>
    </xsl:template>
    </xsl:transform>
    while testing in Interface mapping the values are not comming into result side please verify the code and suggest me the correct one.
    Thanks in advance
    shabeer ahmed.

    Hi Shabeer,
    PFB, the corrected XSL.
    try using it, it would work.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:aash="http://xlst.file2file" xmlns:ns0="http://xlst.file2file">
    <xsl:template match="/"> |
    <aash:mt_student_result> this is my Naming Space
    <Data>
    <Name>
    <xsl:variable name="vFName" select="ns0:mt_student_result/Data/FName"/>
    <xsl:variable name="vLName" select="ns0:mt_student_result/Data/LName"/>
    <xsl:value-of select="concat($vFName,$vLName)"/>
    </Name>
    <Marks>
    <Total_Marks>
    <xsl:variable name="vMaths" select="ns0:mt_student_result/Data/Marks/Maths"/>
    <xsl:variable name="vScience" select="ns0:mt_student_result/Data/Marks/Science"/>
    <xsl:value-of select="concat($vMaths,$vScience)"/>
    </Total_Marks>
    </Marks>
    </Data>
    </aash:mt_student_result>
    </xsl:template>
    </xsl:transform>
    I have given input as,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt_student_result xmlns:ns0="http://xlst.file2file">
              <Data>
                   <FName>FName</FName>
                   <LName>LName</LName>
                   <Marks>
                   <Maths>M</Maths>
                   <Science>S</Science>
                   </Marks>
              </Data>
    </ns0:mt_student_result>
    Output was,
    <?xml version='1.0' ?>
    |
    <aash:mt_student_result xmlns:sap="http://www.sap.com/sapxsl" xmlns:ns0="http://xlst.file2file" xmlns:aash="http://xlst.file2file"> this is my Naming Space
    <Data><Name>FNameLName</Name><Marks><Total_Marks>MS</Total_Marks></Marks></Data></aash:mt_student_result>
    It worked.Try it out.
    Regards,
    Swetha.

  • XSLT coding help

    Hi,
    XSLT Code.
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ns0="http://peoplesoft.com/APC_WORKER2_CI" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:template match="/">
              <ns1:Z_HPA_357_PROVISION_USER_IMS.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
                   <SUCCESS>
                        <xsl:value-of select="soap:Envelope/ soap:Body/ Create__CompIntfc__APC_WORKER2_CIResponse/ notification"/>
                   </SUCCESS>
    ----pseudo code starts-------------
    if SUCCESS eq 1,
    then move "Y" to SUCCESS.
    elseif SUCCESS eq 0,
    then move "N" to SUCCESS
    ----pseudo code ends-------------
              </ns1:Z_HPA_357_PROVISION_USER_IMS.Response>
         </xsl:template>
    </xsl:stylesheet>
    Could someone help to put the  pseudo code in XSLT syntax.
    Thanks,
    -santosh
    Edited by: santosh koraddi on Mar 24, 2011 1:23 AM

    Below is the solution......
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ns0="http://peoplesoft.com/APC_WORKER2_CI" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:template match="/">
              <ns1:Z_HPA_357_PROVISION_USER_IMS.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
                   <SUCCESS>
    <xsl:choose>
              <xsl:when test = "soap:Envelope/ soap:Body/ Create__CompIntfc__APC_WORKER2_CIResponse/ notification  = 1">
          <SUCCESS>Y</SUCCESS>
              </xsl:when>
              <xsl:when test = "soap:Envelope/ soap:Body/ Create__CompIntfc__APC_WORKER2_CIResponse/ notification =  0">
          <SUCCESS>N</SUCCESS>
              </xsl:when>
         </xsl:choose>                    
                   </SUCCESS>
              </ns1:Z_HPA_357_PROVISION_USER_IMS.Response>
         </xsl:template>
    </xsl:stylesheet>

  • Current date in xslt mapping

    Hi,
    I've tried to get the current date in my xslt mapping.
    I've used the following xslt coding:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:date="http://exslt.org/dates-and-times" extension-element-prefixes="date">
    <xsl:template match="/">
    <xsl:variable name="now" select="current-date()"/>
    </xsl:template>
    </xsl:stylesheet>
    In stylus studio everything is OK and i retrieve the current date.
    When i import the xslt in the mapping tool and test the mapping i get the following error:
    javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: Function with name 'current-date' not found in context library. at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:251)
    While directly using the current date functionality within the message mapping everything is OK too.
    Does anyone know which date-functionality is used within the message mapping within the Integration Builder and/or wich mapping to be used in xslt for a working scenario?
    Thnx in advance!

    Ok thnx, these anwers where very helpfull for me to solve this problem.
    I've awarded points for all your answers.
    For anyone interested later on, I needed the date in my XSLT mapping in the following format ddMMMyy.
    Finnally I used the following xslt to achieve this:
         <xsl:template name="currentDate" xmlns:cal="java:java.util.GregorianCalendar">
              <xsl:variable name="now" select="cal:getInstance()" />
              <xsl:variable name="day" select="cal:get($now, 5)" />
              <xsl:variable name="month" select="cal:get($now, 2) + 1" />
              <xsl:variable name="year" select="substring(string(cal:get($now, 1)), 3, 2)" />
              <xsl:variable name="month">
                   <xsl:choose>
                        <xsl:when test="$month=1">Jan</xsl:when>
                        <xsl:when test="$month=2">Feb</xsl:when>
                        <xsl:when test="$month=3">Mar</xsl:when>
                        <xsl:when test="$month=4">Apr</xsl:when>
                        <xsl:when test="$month=5">May</xsl:when>
                        <xsl:when test="$month=6">Jun</xsl:when>
                        <xsl:when test="$month=7">Jul</xsl:when>
                        <xsl:when test="$month=8">Aug</xsl:when>
                        <xsl:when test="$month=9">Sep</xsl:when>
                        <xsl:when test="$month=10">Oct</xsl:when>
                        <xsl:when test="$month=11">Nov</xsl:when>
                        <xsl:when test="$month=12">Dec</xsl:when>
                        <xsl:otherwise>INVALID MONTH</xsl:otherwise>
                   </xsl:choose>
              </xsl:variable>
              <xsl:choose>
                   <xsl:when test="$day &lt; 10">
                        <xsl:value-of select="concat(concat(concat('0',$day), $month), $year)"/>
                   </xsl:when>
                   <xsl:otherwise>
                        <xsl:value-of select="concat(concat($day, $month), $year)"/>
                   </xsl:otherwise>
              </xsl:choose>
         </xsl:template>

  • XSLT Mapping - replacing attribute value of a specific node

    Hi,
    I want to replace the value of an attribute for a specific node. Can you please tell me how this can be achieved using XSLT coding?
    The input file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope">
         <EnvelopeVersion>2.0</EnvelopeVersion>
         <Header>
              <MessageDetails>
                   <Class>IR-PAYE-MOV</Class>
                   <Qualifier>request</Qualifier>
                   <Function>submit</Function>
                   <CorrelationID/>
                   <Transformation>XML</Transformation>
                   <GatewayTimestamp/>
              </MessageDetails>
              <SenderDetails>
                   <IDAuthentication>
                        <SenderID>isv142</SenderID>
                        <Authentication>
                             <Method>MD5</Method>
                             <Value>1L2xFE8WqHHI5iVMGhixAg==</Value>
                        </Authentication>
                   </IDAuthentication>
              </SenderDetails>
         </Header>
         <GovTalkDetails>
              <Keys>
                   <Key Type="TaxOfficeNumber">123</Key>
                   <Key Type="TaxOfficeReference">MD345</Key>
              </Keys>
              <ChannelRouting>
                   <Channel>
                        <URI>0142</URI>
                   </Channel>
              </ChannelRouting>
         </GovTalkDetails>
         <Body>
              <IRenvelope xmlns="http://www.govtalk.gov.uk/taxation/PAYE/MOV/09-10/1">
                   <IRheader>
                        <Keys>
                             <Key Type="TaxOfficeNumber">123</Key>
                             <Key Type="TaxOfficeReference">MD345</Key>
                        </Keys>
                        <PeriodEnd>2009-09-29</PeriodEnd>
                        <DefaultCurrency>GBP</DefaultCurrency>
                        <IRmark Type="generic">03Bfkipk6UDWSXLj77ObBVoK894=</IRmark>
                        <Sender>Company</Sender>
                   </IRheader>
                   <InYearMovements>
                        <EmployerName>form p60</EmployerName>
                        <P46 Statement="A">
                             <Name>
                                  <Fore>Smith</Fore>
                                  <Sur>John</Sur>
                             </Name>
                             <Address>
                                  <Line>Sterling Residency</Line>
                                  <Line>Gehde</Line>
                                  <Line>Hedge End</Line>
                                  <Line>Southampton</Line>
                                  <PostCode>12345678</PostCode>
                             </Address>
                             <WorksNumber>20090030</WorksNumber>
                             <NINO>NP258719D</NINO>
                             <BirthDate>1985-07-11</BirthDate>
                             <Gender>male</Gender>
                             <StartDate>2009-04-20</StartDate>
                             <TaxCodeInUse>647L</TaxCodeInUse>
                        </P46>
                   </InYearMovements>
              </IRenvelope>
         </Body>
    </GovTalkMessage>
    I want to replace the value 'http://www.govtalk.gov.uk/taxation/PAYE/MOV/09-10/1' of attribute xmlns belonging to the node 'IRenvelope' with the value 'http://www.govtalk.gov.uk/taxation/PAYE/MOV/10-11/1'
    So the output of the mapping should be:
    <?xml version="1.0" encoding="UTF-8"?>
    <GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope">
         <EnvelopeVersion>2.0</EnvelopeVersion>
         <Header>
              <MessageDetails>
                   <Class>IR-PAYE-MOV</Class>
                   <Qualifier>request</Qualifier>
                   <Function>submit</Function>
                   <CorrelationID/>
                   <Transformation>XML</Transformation>
                   <GatewayTimestamp/>
              </MessageDetails>
              <SenderDetails>
                   <IDAuthentication>
                        <SenderID>isv142</SenderID>
                        <Authentication>
                             <Method>MD5</Method>
                             <Value>1L2xFE8WqHHI5iVMGhixAg==</Value>
                        </Authentication>
                   </IDAuthentication>
              </SenderDetails>
         </Header>
         <GovTalkDetails>
              <Keys>
                   <Key Type="TaxOfficeNumber">123</Key>
                   <Key Type="TaxOfficeReference">MD345</Key>
              </Keys>
              <ChannelRouting>
                   <Channel>
                        <URI>0142</URI>
                   </Channel>
              </ChannelRouting>
         </GovTalkDetails>
         <Body>
              <IRenvelope xmlns="http://www.govtalk.gov.uk/taxation/PAYE/MOV/10-11/1">
                   <IRheader>
                        <Keys>
                             <Key Type="TaxOfficeNumber">123</Key>
                             <Key Type="TaxOfficeReference">MD345</Key>
                        </Keys>
                        <PeriodEnd>2009-09-29</PeriodEnd>
                        <DefaultCurrency>GBP</DefaultCurrency>
                        <IRmark Type="generic">03Bfkipk6UDWSXLj77ObBVoK894=</IRmark>
                        <Sender>Company</Sender>
                   </IRheader>
                   <InYearMovements>
                        <EmployerName>form p60</EmployerName>
                        <P46 Statement="A">
                             <Name>
                                  <Fore>Smith</Fore>
                                  <Sur>John</Sur>
                             </Name>
                             <Address>
                                  <Line>Sterling Residency</Line>
                                  <Line>Gehde</Line>
                                  <Line>Hedge End</Line>
                                  <Line>Southampton</Line>
                                  <PostCode>12345678</PostCode>
                             </Address>
                             <WorksNumber>20090030</WorksNumber>
                             <NINO>NP258719D</NINO>
                             <BirthDate>1985-07-11</BirthDate>
                             <Gender>male</Gender>
                             <StartDate>2009-04-20</StartDate>
                             <TaxCodeInUse>647L</TaxCodeInUse>
                        </P46>
                   </InYearMovements>
              </IRenvelope>
         </Body>
    </GovTalkMessage>
    Thanks & Regards,
    Aditi Naik

    Hi,
    You get name of an attribute by this code
    <xsl:for-each select="@*">
        <xsl:text>Value of </xsl:text>
               <xsl:value-of select="name(.)"/>
        <xsl:text> is </xsl:text><xsl:value-of select="."/>
    </xsl:for-each>
    Change value by providing new value in <xsl:value-of select="."/>
    Regards
    suraj

  • XSLT Mapping code

    i want to produce correct output, which is mentioned in the the blog /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    i think there was an error in the XSLT coding.
    i modified the code as follows:
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sap="http://www.sap.com/sapxsl"
      xmlns:p2="urn://Mapping">
    <xsl:template match="/">
    <p2:MT_STUD>
    <Records>
            <xsl:for-each select="p2:MT_STUD_SORC/Records/Student_ID">                    
                <Student_ID>
                <Name>
                     <xsl:value-of select="concat(concat (p2:MT_STUD_SORC/Records/Student_ID/Fname,' '),p2:MT_STUD_SORC/Records/Student_ID/Lname)"/>
                </Name>
                <Year_Birth>
                    <xsl:value-of select="substring(p2:MT_STUD_SORC/Records/Student_ID/DOB,1,4)"/>
                                   </Year_Birth>
                                   <Month_Birth>
                                   <xsl:value-of select="substring(p2:MT_STUD_SORC/Records/Student_ID/DOB,5,2)"/>
                                   </Month_Birth>
                                   <Date_Birth>
                                   <xsl:value-of select="substring(p2:MT_STUD_SORC/Records/Student_ID/DOB,7,8)"/>
                                   </Date_Birth>
                                   <Marks>
                                          <Science>
                                          <xsl:value-of select="p2:MT_STUD_SORC/Records/Student_ID/Marks/Science"/>
                                          </Science>
                                          <Maths>
                                          <xsl:value-of select="p2:MT_STUD_SORC/Records/Student_ID/Marks/Maths"/>
                                          </Maths>
                                          <Language>
                                          <xsl:value-of select="p2:MT_STUD_SORC/Records/Student_ID/Marks/Language"/>
                                          </Language>
                                           <Total_Marks>
                                           <xsl:value-of select="sum(p2:MT_STUD_SORC/Records/Student_ID/Marks/Sciense, p2:MT_STUD_SORC/Records/Student_ID/Marks/Maths, p2:MT_STUD_SORC/Records/Student_ID/Marks/Language)"/>
                                           </Total_Marks>
                                 </Marks>
                            </Student_ID>
           </xsl:for-each>
                          <No_Students>
                          <xsl:value-of select="count(p2:MT_STUD_SORC/Records/Student_ID)"/>
                          </No_Students>
            </Records>
           </p2:MT_STUD>
      </xsl:template>
    </xsl:transform>
    here inthis i got two errors, one is SUM function have improper arguments,
    and the second one is, i am unable to produce the multiple students at the receiver side.
    can any body modify and correct this code?
    Thanks ,
    kumar

    hi this is the input file at interface mapping testing:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_STUD_SORC xmlns:ns0="urn://Mapping">
       <Records>
          <Student_ID>
             <Fname>a</Fname>
             <Lname>s</Lname>
             <DOB>19961203</DOB>
             <Mail_ID>w</Mail_ID>
             <Marks>
                <Science>23</Science>
                <Maths>34</Maths>
                <Language>45</Language>
             </Marks>
          </Student_ID>
          <Student_ID>
             <Fname>we</Fname>
             <Lname>op</Lname>
             <DOB>19961203</DOB>
             <Mail_ID>w</Mail_ID>
             <Marks>
                <Science>23</Science>
                <Maths>34</Maths>
                <Language>45</Language>
             </Marks>
          </Student_ID>
       </Records>
    </ns0:MT_STUD_SORC>
    but i am not able to see the multiple no of students at out put.
    and it is saying that "sum" function have improper arguments.
    Thanks,
    kumar
    Edited by: kumar kumar on Mar 16, 2009 2:20 PM
    Edited by: kumar kumar on Mar 16, 2009 2:22 PM

  • JDBC to Mail scenario with XSLT mapping

    Hi all,
    I am working on JDBC to Mail scenario. We have to pick the data from Oracle system and mail has to be sent with an attached Excel file.
    I am doing this scenario by using of following blog.
    eMail Report as Attachment (Excel/Word)
    I am getting the output as an attachment but iam not getting the data.
    the same xslt coding iam using which has given in blog.
    any idea........
    Thanks,
    Sreedhar Goud.

    Hi Gaurav,
    JDBC is picking the data.In SXMB_MONI outbound payload iam able to see the data but in inbound payload there is no data.i think the problem is in XSLT code only.
    My source structure:
      <?xml version="1.0" encoding="utf-8" ?>
      <ns:MT_ORMS_Errors xmlns:ns="http://mg.adityabirla.com/mg/orms/mail">
        <row>
            <INTERFACE_NAME>MG_SAP_RMS_ITEM_PKG</INTERFACE_NAME>
            <RECORD_DETAIL>Item</RECORD_DETAIL>
            <ERROR>item</ERROR>
            <CREATE_DATE>2008-11-03 00:00:00.0</CREATE_DATE>
            <MAIL_SENT>N</MAIL_SENT>
        </row>
      </ns:MT_ORMS_Errors>
    XSLT code:
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
      <xsl:variable name="break">&lt;br&gt;</xsl:variable>
      <xsl:variable name="tableB">&lt;table&gt;</xsl:variable>
      <xsl:variable name="tableE">&lt;/table&gt;</xsl:variable>
      <xsl:variable name="trB">&lt;tr&gt;</xsl:variable>
      <xsl:variable name="trE">&lt;/tr&gt;</xsl:variable>
      <xsl:variable name="tdB">&lt;td&gt;</xsl:variable>
      <xsl:variable name="tdE">&lt;/td&gt;</xsl:variable>
      <xsl:variable name="nbsp">&amp;nbsp;</xsl:variable>
      <xsl:variable name="thB">&lt;tr BGCOLOR="#CCCC99"&gt;</xsl:variable>
      <xsl:template match="/">
       <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
        <Subject>Deliveries from XI</Subject>
        <From></From>
        <To></To>
        <Content_Type>application/vnd.ms-excel</Content_Type>
        <Content>
         <xsl:text xsl:space="preserve">These deliveries has been completed:</xsl:text>
         <xsl:value-of select="$break"/>
         <xsl:value-of select="$break"/>
         <xsl:value-of select="$tableB"/>
         <xsl:value-of select="$thB"/>
         <xsl:value-of select="$tdB"/>
         <xsl:text xsl:space="preserve">INTERFACE_NAME</xsl:text>
         <xsl:value-of select="$nbsp"/>
         <xsl:value-of select="$tdE"/>
         <xsl:value-of select="$tdB"/>
         <xsl:text xsl:space="preserve">RECORD_DETAIL</xsl:text>
         <xsl:value-of select="$nbsp"/>
         <xsl:value-of select="$tdE"/>
         <xsl:value-of select="$tdB"/>
         <xsl:text xsl:space="preserve">ERROR</xsl:text>
         <xsl:value-of select="$nbsp"/>
         <xsl:value-of select="$tdE"/>
         <xsl:value-of select="$tdB"/>
         <xsl:text xsl:space="preserve">CREATE_DATE</xsl:text>
         <xsl:value-of select="$nbsp"/>
         <xsl:value-of select="$tdE"/>
         <xsl:value-of select="$trE"/>
        <xsl:for-each select="MT_ORMS_Errors/row">
          <xsl:value-of select="$trB"/>
          <xsl:value-of select="$tdB"/>
          <xsl:value-of select="INTERFACE_NAME"/>
          <xsl:value-of select="$nbsp"/>
          <xsl:value-of select="$tdE"/>
          <xsl:value-of select="$tdB"/>
          <xsl:value-of select="RECORD_DETAIL"/>
          <xsl:value-of select="$nbsp"/>
          <xsl:value-of select="$tdE"/>
          <xsl:value-of select="$tdB"/>
          <xsl:value-of select="ERROR"/>
          <xsl:value-of select="$nbsp"/>
          <xsl:value-of select="$tdE"/>
          <xsl:value-of select="$tdB"/>
          <xsl:value-of select="CREATE_DATE"/>
          <xsl:value-of select="$nbsp"/>
          <xsl:value-of select="$tdE"/>
          <xsl:value-of select="$trE"/>
         </xsl:for-each>
         <xsl:value-of select="$tableE"/>
        </Content>
       </ns1:Mail>
      </xsl:template>
    </xsl:stylesheet>
    Thanks,
    Sreedhar Goud.

  • XSLT Mapping: how to calculate Week number of the year from given date

    Hi,
    I  have input as date, i need to know the Week number from that date in XSLT Coding.
    for Eg: if date is 29-12-2009 it should give 53rd week of the year.
    All answers will be appreciated.
    Regards,
    Mayank

    Hi add this statement to your XSLT Mappping
    <xsl:stylesheet version="1.0" xmlns:java="http://xml.apache.org/xslt/java" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="java">
    and use <xsl:template name="GetDateInLocal" xmlns:cal="xalan://java.util.GregorianCalendar"> in XSLT Mapping , write your logic.
    cheers,
    Raj

  • ABAP to XML conversion...need help for XSTL coding

    Hi,
    I am trying to convert ABAP internal table to XML format. I am using CALL TRANSFORMATION command. But i am not getting the exact conversion of my internal table data as i am lagging in perfection of XSLT coding that i have to maintain(in call transformation command).
    I am passing the data with internal table which has deep structuring( 2 other internal tables(table types) inside it).
    i am facing issue in writing the XSLT format coding(Tcode:XSLT_TOOL). I need some help on this.
    Thanks,
    Mahidhar.

    Hi,
    Can you please share the XSLT program that you have created and also your ABAP structure that is going to hold the data.
    Thanks,
    Aanand.

  • Module processor usage in File ADapter

    Hi all,
    I have a scenario  Idoc->Xi->File to be in Xi 3.0.
    There is already an XI 2.0 system up and running wherin they have used dispatcher classes for the File Adapter Configuration.They have used the Transform Class "com.sap.aii.messaging.adapter.XSLTConversion" and have added the particular XSLT mapping Program in "namespace1.XSLTService.XSLTConversion.XSLTFileName=
    convert.xsl".
    When I want to configure these in XI 3.0 as a Receiver File Adapter, documentation says that we need to specify these in Module Processor as a sevice. For this the precursor is that we need to deploy the Java Classes in SDM.
    But my question is whether we have to include the XSLT coding too in the Archive and Deply it in the SDM? Is it not that its required only for the Java Classes to be Deployed using SDM or else the XSLT Codings too in a JAR File?

    Hi Stefan,
    Thanks a lot for your reply.
    I already tried this way by storing the file in the File system of the server.
    But for example,the XSLT file is this path of the Server,
    F:\usr\sap\D49\SYS\global\tech_adapter\xslt\DR11_adapter_exit.xsl
    Then, what exactly should be the path specification in the XSLT Sevice filename....Now its exactly as I have mentioned above and the file is stored physically over there....
    The error log was like this,
    2005-02-16 11:54:37 Success output 1108572877484 The message was successfully received by the messaging system. Profile: XI URL: http://cmis147:50000/MessagingSystem/receive/AFW/XI
    2005-02-16 11:54:37 Success output 1108572877484 Using connection AFW. Trying to put the message into the receive queue.
    2005-02-16 11:54:37 Success SAPEngine_Application_Thread[impl:3]_0 1108572877500 The message was successfully retrieved from the receive queue.
    2005-02-16 11:54:39 Success SAPEngine_Application_Thread[impl:3]_0 1108572879093 The message status set to DLNG.
    2005-02-16 11:54:39 Success SAPEngine_Application_Thread[impl:3]_0 1108572879109 Delivering to channel: FILE_DR11_Outbound
    2005-02-16 11:54:39 Error SAPEngine_Application_Thread[impl:3]_0 1108572879125 Exception caught by adapter framework: failed to configure the transformation object
    2005-02-16 11:54:39 Error SAPEngine_Application_Thread[impl:3]_0 1108572879125 Delivery of the message to the application using connection AFW failed, due to: failed to configure the transformation object.
    2005-02-16 11:54:39 Success SAPEngine_Application_Thread[impl:3]_0 1108572879125 The asynchronous message was successfully scheduled to be delivered at Wed Feb 16 11:59:39 EST 2005.
    2005-02-16 11:54:39 Success SAPEngine_Application_Thread[impl:3]_0 1108572879140 The message status set to WAIT.
    But when I see the monitoring for the AdapterFramework it says its ok.
    So I thought the path is probably invalid.
    Your opinions please...
    Thanks in Advance,
    Romit.

  • Pdf reports in APEX

    Hi,
    I need to generate pdf reports using interactive reports feature in oracle APEX. But everytime, I am getting error like print server is not configured and like this. Can any one help me over this?
    Is there any other way of generating pdf reports in oracle APEX without using pdf printing.
    Also,do we need BI publisher for simple/standard pdf printing? Please suggest.
    Thanks and Regards
    VG.

    While you can enable simple APACHE FOP printing in APEX 3.1 and beyond, it is not easy and not very robust. Oracle recommends BI Publisher for a reason (besides wanting to make money!)
    Here are links with information:
    http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html
    Marc has an excellent APEX Blog that includes this:
    http://marcsewtz.blogspot.com/2008/06/heres-another-posting-on-pdf-printing.html
    Marc made this presentation - slide 15 shows the APACHE FOP architecture:
    http://www.nyoug.org/Presentations/2008/Dec/Sewtz_Advanced%20Printing.pdf
    I am sure you can find more info if you Google. But I will share our experiences. We installed APEX 3.1 but were not going to be buying BI Publisher. We had previous success with integrating Oracle Reports (web) into APEX 3.0 and liked that but wanted to explore the APACHE FOP solution mentioned in the APEX documentation.
    We installed APEX 3.1 in an Oracle 10g Database. We used the included HTTP Webserver (Apache, I think?) that comes with APEX then installed the APACHE FOP piece in an OC4J container. We aren't Apache experts - more DBAs - so maybe people with lots of experience in OC4J and Apache would have an easier time. We did not and were not able to get much support from Oracle Support. They kept citing BI Publisher solutions - which we weren't using.
    Anyway, we get the whole thing installed and running to find out that APACHE FOP has limitations (memory issues, rendering issues, layout issues). I think if we learn XSLT coding enough to make custom layouts, we might get past the layout issues but the memory usage is of more concern.
    We are now revisiting Oracle Reports. BI Publisher might be great but we already own Oracle Reports licenses and don't have a budget to purchase something new.

  • SOAP adapter Header data

    This is SOAP to PROXY
    We are getting userid information in SOAP Header . This information has to be captured and pass to receiver.
    1) How to access the SOAP header data
    2) Can I Map it to target strcture, if so how target structure shud be formed.
    Please Note I cannot use XSLT as I donot have skils in XSLT coding/mapping.
    Edited by: Viswanath on Sep 30, 2008 10:55 PM

    Hi Viswanath,
    Please go through the Note-856597 for accessing SOAP header data in XI.
    Thanks,
    Jag

  • Please Help for this scenario

    Hello,
    Suppose i have a input xml:
    <Name>XYZ</Name>
    <Roll>12</Roll>
    <Class>3</Class>
    Now I want output as:
    <Header>XYZ</Header>
    <Body><![CDATA[<Name>XYZ</Name>
               <Roll>12</Roll>
               <Class>3</Class>]]>      
    </Body>
    Please help how will I do that......whole payload is going in Body also some value in above payload is mapping.
    Can anyone give me UDF to send whole payload in one node
    Thanks and Regards
    Hemant

    this can be achieved easily by aXSLT mapping....also can be achieved by using grahical mapping
    For XSLT coding:
    creation of CDATA with message mapping
    For graphical + XSLT: /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    Regards,
    Abhishek.

  • Wrong coding of german umlaut in XML/XSLT output

    I'm using Oracle 8.1.5 with XSQL Servlet.
    The contents of my database contains german
    umlaut. Visiting the HTML output using
    Netscape/WinNT seems to be correct, but when
    I save the page the saved page contains a
    unknown (for me!) hex conversion of the
    umlaut and not '&auml;' etc. The stylesheet
    uses enconding ISO-8859-1.
    I think, the problem will be found in the
    stylesheet, but I don't know where.

    Hi,
    I test on my Lync client and there is no issue about it.
    Please update to the latest version for Lync Server 2013 (the latest version is 5.0.8308.815) and then test again.
    http://support2.microsoft.com/kb/2809243
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • XSLT Mapping of Adapter-Specific Message Attributes

    Hi,
    We have the requirement to build a soap request with a custom soap envelop/header which contains a sessionId.
    Therefore we developed a xlst mapping which is called directly after a graphical mapping.
    In the graphical mapping the session id is written to the dynamic configuration.
    The goal is to read this session id in the xslt mapping from the dynamic configuration using XSLT Mapping of Adapter-Specific Message Attributes. We used  [this|http://help.sap.com/saphelp_nwpi711/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/content.htm] documentation as an example.
    But we are getting the following error: TransformerConfigurationException triggered while loading XSLT mapping. The error is raised at this node: <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />
    This is the coding of the xslt transformation:
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          xmlns:ns1="urn:enterprise.soap.sforce.com"
          xmlns:map="java:java.util.Map"
          xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
          xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:output indent="no" />
    <xsl:param name="inputparam"/>
    <xsl:template match="/">
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com">
    <soapenv:Header>
    <urn:SessionHeader>
    <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />
    <xsl:variable name="dynamic-key" select="key:create('http://sap.com/xi/XI/System/SOAP', 'sessionId')" />
    <xsl:variable name="dynamic-value" select="dyn:get($dynamic-conf, $dynamic-key)" />
    <urn:sessionId><xsl:value-of select="$dynamic-value"></xsl:value-of></urn:sessionId>
    </urn:SessionHeader>
    </soapenv:Header>
    <soapenv:Body>
    <xsl:copy-of select="*"/>
    </soapenv:Body>
    </soapenv:Envelope>
    </xsl:template>
    </xsl:stylesheet>
    Any help will be highly appreciated.
    Regards, Henk

    Hi, yes we did try that and lot's of other combination.
    The results of those trials are that it seems to go wrong with <xsl:variable name="dynamic-conf" select="map:get($inputparam, 'DynamicConfiguration')" />
    When we enclose it with <xsl:if test="function-available('map:get')"> the transformation is not dumping, but the function is not available.
    Regards, Henk

Maybe you are looking for

  • AMD Trinity A10-5800K with MSI FM2-A85XA-G65! OC'ed on Air

    Here is something to share with you guys today, the new APU “Trinity” Processor together with the latest FM2 Socket Motherboard from MSI “FM2-A85XA-G65”.  Let us start with the Trinity. The APU’s cores are composed of 2nd Generation Bulldozer core or

  • My weather forecast does not work!

    My weather forecast does not work, the animation background catching this. This equals the image of the print, it does not move.

  • Declarative component stops working after taskflow-call-in-popup

    Hi! JDev 11.1.1.3.0 I need a component, much like the commandToolbarButton, but I have the requirement that the user should still be able to select from the popup even if the button is disabled. So I created a declarative component, combining two but

  • Raw Text for IFrame in Configurator

    Hi, I have a requirement of displaying a external HTML content as Iframe in the Oracle configurator. For this, I have created a Raw Text (as suggested in developer guide), but when I give text expression containing world IFrame, it gives below error:

  • Delivery qunatitiy can't be greater than STO qnty .

    Is there are any standard setting to prevent delivery qunatity below or equal to STO (stock transport order ) Qunatity .?? Currenlty my delivery quantity can be made more tha STO quantity ,which leading problem in day to day busniess ... Sourav singh