on 09-09-2005 9:05 PM
Hi,
I am trying to pad a field with leading zeros during mapping. I am going from an IDOC to a flat file. Is there a function in the message mapping of XI that will help me do this?
For example: the value of "91423" is passed in to a field of length 10. i want the value to look like this on the flat file "0000091423".
Is this possible?
Thanks,
Nate
Hi Nathan,
yes this is possible:
one way - create a user defined function
with one input value (your field)
and check it's length and add (10 - length) zeros
second way - without user defined function
and use length and concat functions (build into graphical mapping functions) and if statement
if length = 9 then string concat 0
else if length = 8 then string concat 00 ...
the first way it better but if you don't want to use java you can use the second one
Regards,
michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
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.