2008 Jul 14 1:48 AM
Hello,
I want the following kind of conversion.
0000000000.53 -> 0.53
0000000123.00 -> 123.00
0000000001.23 -> 1.23
0000000005400 -> 5400
Please help.
Regards,
Rajesh.
2008 Jul 14 2:12 AM
Is this what you are looking for.
PROGRAM ztest.
DATA:ts(100) TYPE c VALUE '0000000000.53'.
SHIFT ts LEFT DELETING LEADING '0'.
WRITE: ts.
For values with no decimals you can use conversion exits as well. For others just use SHIFT statement.
Amandeep
2008 Jul 14 2:12 AM
Is this what you are looking for.
PROGRAM ztest.
DATA:ts(100) TYPE c VALUE '0000000000.53'.
SHIFT ts LEFT DELETING LEADING '0'.
WRITE: ts.
For values with no decimals you can use conversion exits as well. For others just use SHIFT statement.
Amandeep
2008 Jul 14 3:21 AM
use function module:
for leading zeros
CONVERT_EXIT_ALPHA_OUTPUT
for adding zeros
CONVERT_EXIT_ALPHA_INPUT