on 09-02-2016 12:29 PM
Hello All,
We have a requirement of adding leading zeroes to a number in xslt mapping.
We tried like this but it's not working
<ns0:when test="$kunnr-length >0">
<ns0:value-of-select="substring(../../KUNNR,1,4)"/>
<ns0:value-of-select="formatnumber(12345678,'00000000')"/>
Any ideas how to do this.
Thanks,
Sateesh
Hi Sateesh!
Maybe I don't get your requirement exactly, but why not to just concat "0000" and your substring?
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sateesh,
try with below statement
<xsl:value-of select="format-number(substring(../../KUNNR,1,4),'00000000')"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sateesh,
Try like below
<ns0:when test="$kunnr-length >0">
<ns0:value-of-select="substring(../../KUNNR,1,4)"/>
<ns0:value-of-select="format-number(12345678,'00000000')"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.