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

text and integer split

Former Member
0 Likes
466

Hi ,

Is their any function module available to split alphabets and number from a given string?

Thanks.

2 REPLIES 2
Read only

Former Member
0 Likes
395

do like this.

data : text(40) type c value 'as1232ws5r',

num(20),

chr(20),

pos type i,

len type i,

dat.

len = strlen( text ).

do len times.

dat = text+pos(1).

if dat ca sy-abcde.

concatenate chr dat into chr.

elseif dat ca '0123456789'.<or you can use else>

concatenate num dat into num.

endif.

pos = pos + 1.

enddo.

regards

shiba dutta

Read only

Former Member
0 Likes
395

Check for each character one by one with CA '0123456789' & then get it in different variable.

sandeep