on 09-18-2008 3:30 PM
Hi,
Need to map IDOC field DOCNUM to DocID and i need to remove the leading zeroes for the result.
Pls suggest me which function i need to use
Thanks & Regards,
Y.Raj
Use the Arithmetic function multiply or divide by 1.
DOCNUM & Constant(1) -
> Divide or Multiply -
> target
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your valuable replies....
Regards,
Y.Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use this UDF code
Here input field name is IDTNR
int n = idtnr.length();
String str = idtnr;
for(int i=0; i< n; i++)
{
If(!idtnr<i>.equals('0'))
{
str = idtnr.subString(i,n);
break;
}
}
return str;
(or)
String y=idtnr;
while(idtnr.startsWith("0"))
{
y=idtnr.replaceFirst("0","");
}
return y;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
create UDF with one input and use this code..
String docNum = //ur UDF input...
int index=0;
for(int i=0;i<docNum.length();i++) {
char temp ='0';
char c = docNum.charAt(i);
if(temp==c) {
index=index+1;
}
else break;
Thanks
Farooq
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can use rtrim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can also try with UDF
//write your code here
String output = input.replaceFirst("^0+","");
return output;
Cheers
Agasthuri Doss
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.