on 08-03-2011 9:04 AM
Hi,
My Interface is outbound Interface.
Suppose source field named 'MobNumber' is mapped with Target field named 'MobileNumber'.Condition is AS IS(Right-justified and left zero-filled).
How should i do this mapping?
Thanks,
Sanghamitra
Use this code for your requirement.
public static String zerofill(String str)
{
final int fieldLength=30;
char filler='0';
str=str.trim();
int i=str.length();
while(i<fieldLength)
{
str=filler+str;
i++;
}
return str;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sanghamitra,
Similar question ahs been answered earlier in this thread
just replace the filler variable by zero in my post
One small request, if you think your questions are being answered correctly and properly, please kindly, if possible, close down the threads. This way forum members/users who later look up for solutions to similar problem, they know for sure that the problem was finally solved, with the solutions provided in the thread.
regards
Anupam
Edited by: anupamsap on Aug 3, 2011 11:27 AM
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 use FormatNum standard function and you can provide it as many zero's are you required.
Regards,
P.Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
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.