Skip to Content
avatar image
Former Member

XSLT transformation format-number into strange characters

Hi, Experts,

When I excute following code to translate a string number DEBIT TYPE C(60) into xml, the result has strange characters.

<xsl:value-of select="format-number(sap:if(string(number(DEBIT))!='NaN',DEBIT,0),'0.0000000000')" />

If DEBIT is empty, the correct result should be:

0x3000 0x2E00 (0x3000)*10 = 0.0000000000

but actually, the result will be following in some cases:

0x3000 0x2E00 (0x0F77)*10

in some cases the result will be

0x3000 0x2E00 (0x2600 0x2300 0x3000 0x3B00)*10

What I mean in some cases, I ran the same code on different NW system. I also changed the user profile by NW menu System->User Profile->Own Data, the result won't change whether I use American Comma-Dot or European Dot-Comma.

Can anyone give some advice on the code? Or there is some patch to solve it?

Thanks and Regards

Davin

Edited by: Davin Wang on Jul 17, 2008 3:15 PM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 17, 2008 at 11:23 AM

    Hi Davin,

    do chk the condition it is not correct

    <xsl:value-of select="format-number(sap:if(string(number(DEBIT))!='NaN',DEBIT,0),'0.0000000000')" />

    do chk it

    Thanx

    Sampath

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 22, 2008 at 05:06 AM

    This problem is confirmed as defect of X64 implementation.

    Add comment
    10|10000 characters needed characters exceeded