Skip to Content
0
Former Member
Oct 27, 2009 at 12:44 PM

FM to Remove Characters

1561 Views

Hi Fellas ...

I need a FM to remove all kind of characters in a char variable. See the example.

DATA: lv_char TYPE char10 VALUE 'ABC123',
            lv_num  TYPE char 10.

  lv_num = lv_char+3(3).

That is one possibility, however, I also can have:

DATA: lv_char TYPE char10 VALUE 'A1B2C3',
            lv_num  TYPE char 10.

How I can separate the lv_char to have the same 123 in variable lv_num ?

I can have all kind of possibilities of numbers and characters scrambled.

Thx.