2006 Jul 25 10:43 PM
hi guys,
I have the following requirement, i have a file which has account numbers which can be numeric as well as char. I have to find out the ones that are numeric only and then since the length should be 10 i need to add zeroes infront to make the length 10. Does anyone have any idea how this can be done??.
Thanks in advance,
David.
2006 Jul 25 10:48 PM
Please use CONVERSION_EXIT_ALPHA_INPUT, this will convert your values to internal format, if numeric, it will put the leading zeros, if not numeric, it will not put the zeros.
Regards,
Rich Heilman
2006 Jul 25 10:48 PM
2006 Jul 25 10:52 PM
Hi Rich,
I saw that function module the problem is it is adding 100's of zeroes infront, but i need only the total length to be just 10. Neidea what else can be done.
Thanks,
David.
2006 Jul 25 10:54 PM
2006 Jul 25 10:49 PM
Hi David,
take for instance the len is 8
IF strlen(field) < 10.
MOVE '00' TO field(8).
ELSE.
MOVE field to field.
ENDIF.
Hope this gives you a idea...
Please reward if its helpful...
Leo
2006 Jul 25 10:53 PM
if ws_num co '0123456789 '.
condense ws_num.
shift ws_num right deleting trailing space.
overlay ws_num with '0000000000'.
endif.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |