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

to extracte a value.

Former Member
0 Likes
831

is there a simple way to extracte a string between to caracters ,

exemple i need ; " mydata " so i need to extract mydata.

thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
800

Hi,

Using PATTERN also u can retrieve.

Regards,

Deepthi.

7 REPLIES 7
Read only

Former Member
0 Likes
800

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.

Read only

Former Member
0 Likes
800

One way is to use

REPLACE ALL OCCURENCES OF '"' with ''.

Hope this helps!

Regards,

Prashant

Read only

JozsefSzikszai
Active Contributor
0 Likes
800

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

Read only

Former Member
0 Likes
801

Hi,

Using PATTERN also u can retrieve.

Regards,

Deepthi.

Read only

0 Likes
800

there is any other solution medata is between two caracters;

>mydata> so i need to Recover mydata.

thank you.

Read only

0 Likes
800

between

>mydata>

Read only

0 Likes
800

hi,

You can use condense statement

condense <variablename>

You can delete trailing spaces

regards

padma