Skip to Content
avatar image
Former Member

XSLT mapping error

Hi ,

i am working on XSLT mapping. i have a requirment, in which i have to convert the date from ddMMyyyy to yyyyMMdd format. i have written a java function to do this.

when i test the scenario in interface mapping, i am getting the following error

Call XSLT processor with stylsheet Stock_Map1.xsl.

Unable to find resource XSLT/com/date/dateTransform.class

i have specified the namespace in xslt mapping.

can any one help me in resolving htis issue

points if useful 😊

Thanks

Deepika

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 01, 2008 at 01:28 PM

    Hi

    You do not need a Java function in XSLT.

    These statement should achieve the same, just pass 3 continuos value-of select statement as below.

    <FINALDATE>
    <xsl:value-of select="substring(INPUTDATE,5,4)"/>
    <xsl:value-of select="substring(INPUTDATE,3,2)"/>
    <xsl:value-of select="substring(INPUTDATE,1,2)"/>
    </FINALDATE>

    BR

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 01, 2008 at 12:58 PM

    Hi Deepika,

    You can also do this without Java function. See http://geekswithblogs.net/workdog/archive/2007/02/08/105858.aspx for some examples on how to format dates in XSLT.

    Kind regards,

    Koen

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 01, 2008 at 11:09 AM

    Why ain't u using the graphical mapping DateTrans fucntion?

    Regards,

    Prateek

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 01, 2008 at 11:23 AM

    Dear Deepika,

    I hope you can easily do this by Message Mapping.

    But if some thing is included apart from data formatting, and ur requirement is to use only xslt then u can go for it.

    Or if u want to just test XSLT mapping

    Make sure you give proper path in your .XSL file which are input and output fields.

    Plz use the correct XSD files of Data Types for XSLT Mapping

    Plz check the name spaces in the XSL file.

    Best Regards

    Praveen

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Praveen,

      what do u mean by "Make sure you give proper path in your .XSL file which are input and output fields".. can u plz elobrate a little more.

      Thanks

      Deepika

  • avatar image
    Former Member
    Aug 01, 2008 at 12:20 PM

    Hi Deepika,

    open the zip-file you uploaded.

    WinZip for e.g. shows you on the right side the path:

    SAP XI searches the XSL in Path

    XSLT/com/date

    Make sure that the path in WinZip is the same.

    If it is not the same you have to zip on a different hierachie-level in your windows explorer.

    Regards Mario

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 01, 2008 at 01:05 PM

    Hi Deepika,

    to ease your mapping: Why don't you use

    xsl:format-number

    http://www.w3schools.com/xsl/func_formatnumber.asp

    Or:

    See:

    http://geekswithblogs.net/workdog/archive/2007/02/08/105858.aspx

    Regards Mario

    Edited by: Mario Müller on Aug 1, 2008 9:08 AM

    Add comment
    10|10000 characters needed characters exceeded