cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT transformation format-number into strange characters

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

This problem is confirmed as defect of X64 implementation.

Former Member
0 Kudos

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