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

string operations

Former Member
0 Likes
642

cn anyone help me regarding the string operations . string splitting.

i need to split the valur from a field of a table into three parts

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
612

Hi,

U can use the 'SPLIT' keyword.

Eg: SPLIT 'STOP Two STOP Three STOP ' AT 'STOP' INTO TABLE ITAB.

Reward if helpful,

Regards,

Esha Raj

6 REPLIES 6
Read only

Former Member
0 Likes
613

Hi,

U can use the 'SPLIT' keyword.

Eg: SPLIT 'STOP Two STOP Three STOP ' AT 'STOP' INTO TABLE ITAB.

Reward if helpful,

Regards,

Esha Raj

Read only

0 Likes
612

could you explain me the syntax with an example.. i couldn understand

Read only

Former Member
0 Likes
612

Hi Madhumita,

Use Key word SPLIT.

Sample code:

DATA: str1 TYPE string,

str2 TYPE string,

str3 TYPE string,

itab TYPE TABLE OF string,

text TYPE string.

text = 'What a drag it is getting old'.

SPLIT text AT space INTO: str1 str2 str3,

TABLE itab.

Kindly Reward Points If You Found The Reply Helpful,

Cheers,

Chaitanya.

Read only

0 Likes
612

SPLIT text AT space INTO: str1 str2 str3, TABLE itab. -- why do you use the table parameter here?

i don't understand its relevance. can you explain

Read only

Former Member
0 Likes
612

give me the syntax.. 'm new to abap.. unable to understand

Read only

0 Likes
612

Here is the sytax


SPLIT dobj AT sep INTO 
      { {result1 result2 ...} | {TABLE result_tab} } 
      [ IN {BYTE|CHARACTER} MODE ].

you can decide if you want to insert it in an internal table or into variables