Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to extract string from ulphanum string....

naveenvishal
Contributor
0 Likes
507

How can i extract the Alpha chars from the following string:

eg.

0900000101135ABC

0900000101135DEFG

Is there a std fn mod for extracting ABC and DEFG from the above strings..???

Output

ABC

DEFG

1 ACCEPTED SOLUTION
Read only

Nkrish
Contributor
0 Likes
486

Hi,

You can use : STRING_SPLIT_AT_POSITION function module.

give value of string as the value provided. e.g 0900000101135ABC

give the position as the data size. I assume that the 90.... is a billing document number or a material document number.

So you can give the size as data size of document number,

Regards,

Narayani

3 REPLIES 3
Read only

Nkrish
Contributor
0 Likes
487

Hi,

You can use : STRING_SPLIT_AT_POSITION function module.

give value of string as the value provided. e.g 0900000101135ABC

give the position as the data size. I assume that the 90.... is a billing document number or a material document number.

So you can give the size as data size of document number,

Regards,

Narayani

Read only

Former Member
0 Likes
486

Hi Naveen

In case you do not find a FM then try this pseudo code...

cnt = 0.

DO 10 TIMES.

replace all occurences of cnt in your string with space. "please chk the right syntax for replace

cnt = cnt + 1.

ENDDO.

condense to remove spaces.

Read only

rainer_hbenthal
Active Contributor
0 Likes
486
  FIND ALL OCCURRENCES OF REGEX '(D*)'
    IN '0900000101135ABC' SUBMATCHES s1.

  write:/ s1.