Skip to Content
0
Former Member
Jul 17, 2008 at 07:13 AM

XSLT transformation format-number into strange characters

103 Views

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