2008 Jul 15 11:58 AM
Hi all,
We have a requirement to pick up only numeric characters from a string which contains both numeric and non-numeric characters.e.g If string contains value 12345abc,we need to pick only 12345.Are there any function modules for this or any methods. Any inputs will be highly appreciated with points.
Thanks and regards
Kiran
2008 Jul 15 12:00 PM
hi,
you can move those values to variables which is of data type N.It will move only numeric values.
Regards,
Veeresh
2008 Jul 15 12:00 PM
hi,
you can move those values to variables which is of data type N.It will move only numeric values.
Regards,
Veeresh
2008 Jul 15 12:03 PM
data: lv_char type c length 20 value '12ab34c5'.
data: lv_num type n length 10.
lv_num = lv_data.
write lv_num.
thats it.
2008 Jul 15 12:05 PM
hi,
do this way ..
data: v_char(15) value '12345abcd'.
translate v_char using 'a b c d '.
condense v_char no-gaps.
write : v_char.
Regards.
Santosh