I'm more familiar with the PSQL database but in Map Designer you can use RIFL script (
VB Script like scription) to manipulate the field when it comes from the source and before it is written to the target.
You'll need to do something like the following (pseudo-code):
1. Convert the value to string.
2. Determine length of the value (50 is 2, 500 is 3, 5000 is 4, etc).
3. Concatenate a string of zeros appropriate for the length. ( "0000" + "50", "000" + "500", etc).
4. Write the value to the target as a string.