‎2008 Sep 02 2:09 PM
is there a simple way to extracte a string between to caracters ,
exemple i need ; " mydata " so i need to extract mydata.
thank you.
‎2008 Sep 02 2:15 PM
‎2008 Sep 02 2:11 PM
Hello,
You can use the SPLIT command.
Example:
The text field text is separated at its blank characters, into the three strings str1, str2, and str3, and then into an internal table with the line type string. As the three strings are not sufficient for all seven parts, after the separation, str3 contains "drag it is getting old", while the internal table contains seven lines; one for each word in text.
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.
Regards.
‎2008 Sep 02 2:12 PM
One way is to use
REPLACE ALL OCCURENCES OF '"' with ''.
Hope this helps!
Regards,
Prashant
‎2008 Sep 02 2:13 PM
sorry it is not absolutely clear for me, but if you want a leading and a trailing space, than you can do:
CONCATENATE space 'mydata' space INTO ... RESPECTING BLANKS.
-pls. note RESPECTING BLANKS is 6.0 syntax
hope this helps
ec
‎2008 Sep 02 2:15 PM
‎2008 Sep 02 3:17 PM
there is any other solution medata is between two caracters;
>mydata> so i need to Recover mydata.
thank you.
‎2008 Sep 02 3:18 PM
‎2008 Sep 02 3:21 PM
hi,
You can use condense statement
condense <variablename>
You can delete trailing spaces
regards
padma