‎2008 May 21 9:01 AM
HI ALL,
HOW DO WE SELECT CHARACTERS BETWEEN TWO WORDS LIKE.
IF I HAVE ABAPSAPABAP.
I WANNA SELECT SAP FROM THE ABOVE WORD .
THE LENGTH OF THE WORD IN BETWEEN MIGHT CHANGE
LIKE IT MIGHT BE
ABAPSADGABAP
ABAPSDFGGTGHABAP
‎2008 May 21 9:07 AM
hi,
I think there are more ways to go:
1.
REPLACE 'ABAP WITH '' IN string.
CONDENSE string NO-GAPS.
Now string contains only the middle word.
2.
SPLIT string AT 'ABAP' INTO itab.
Now itab has only one line with the middle word.
hope this helps
ec
‎2008 May 21 9:07 AM
hi,
I think there are more ways to go:
1.
REPLACE 'ABAP WITH '' IN string.
CONDENSE string NO-GAPS.
Now string contains only the middle word.
2.
SPLIT string AT 'ABAP' INTO itab.
Now itab has only one line with the middle word.
hope this helps
ec
‎2008 May 21 9:07 AM
Hi ,
Do you want SAP as a word or as diff characters .
Either you can use patterns CP
or you use CA 'SAP' .
Please elaborate about the requirements .
‎2008 May 21 9:08 AM
Hi,
You can use CS ( Compare string) operator to acheive this.
Shruthi
‎2008 May 21 9:08 AM
Hi ,
According to u first 4 digits and last 4 didgits are fixed.
so
1. find out the length of the string and make the first 4 digits and last 4 digits as blanks by using off set...and replace...
for example if u get string length as 10 .
replace string+0(4) by space.
replace string+6(4) by space.
condense string ...
u will get middle value of the string.
Thanks,
‎2008 May 21 9:29 AM