‎2008 Apr 03 9:57 AM
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
‎2008 Apr 03 10:00 AM
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
‎2008 Apr 03 10:00 AM
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
‎2008 Apr 03 10:03 AM
could you explain me the syntax with an example.. i couldn understand
‎2008 Apr 03 10:05 AM
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.
‎2008 Apr 03 10:09 AM
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
‎2008 Apr 03 10:10 AM
‎2008 Apr 03 10:27 AM
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