on 2006 Oct 12 4:44 PM
How Can I supress Leding zeroes into target Structure?. Iam getting 10 digits filled zeros left justified and my target systems doesn't need zeros. Is there Standard function in Mapping I can use?
Ram,
Create a user defined funciton <i><b>zerosuppress</b></i> and take the <i><b>cache</b></i> as value and take one argument <i><b>input</b></i>. Then put the code below:
//write your code here
String output = input.replaceFirst("^0+","");
return output;
It will remove all your leading zeros. Let me know whether your issue is resolved or not?
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Satish - Your code is not working . It gives following errors:
E:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map1af8bf955eb611dba72f0014220cd5e0/source/com/sap/xi/tf/_testmapping_.java:83: cannot resolve symbol symbol : variable input location: class com.sap.xi.tf._testmapping_ String output = input.replaceFirst("^0+",""); ^ 1 error
User | Count |
---|---|
66 | |
11 | |
11 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.