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

Split with a string with a special character

former_member215107
Active Participant
0 Likes
1,678

Dear All,

I have a string like this:

String = 'TOTO¤TITI¤TATA'

The ASCII code of character ¤ is = 0xA4.

I can't use the Split function with the character '¤'.

I search methods in forum but without success...

Any Help ?

Thanks a lot,

Rodolphe.

1 ACCEPTED SOLUTION
Read only

rainer_hbenthal
Active Contributor
0 Likes
1,300

I cnat see why you cant use the character for splitting.

Dear All,

I have a string like this:

String = 'TOTO¤TITI¤TATA'

The ASCII code of character ¤ is = 0xA4.

I can't use the Split function with the character '¤'.

I search methods in forum but without success...

Any Help ?

Thanks a lot,

Rodolphe.

6 REPLIES 6
Read only

Former Member
0 Likes
1,300

use

FM "DSVAS_TEXTE_ASCII_LINE_BREAK"

Regards,

Srinivas

Read only

rainer_hbenthal
Active Contributor
0 Likes
1,301

I cnat see why you cant use the character for splitting.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,300

Hello Rainer,

I think the OP has given this as an example

For him the spl. character may be dynamic.

BR,

Suhas

Read only

0 Likes
1,300

Split command does not care if this is a constant or a variable.

Read only

former_member215107
Active Participant
0 Likes
1,300

Thanks it works!

Rodolphe.

Edited by: Rodolphe LALOUX on Oct 30, 2009 10:22 AM

Read only

Former Member
0 Likes
1,300

Hi,

Check the below code.

data: fs_string(15) type c VALUE 'TOTO¤TITI¤TATA'.

DAta: c_hextab(1) type c VALUE '¤'.

data: tcode(10) type c,

comp(10) type c,

seq(10) type c.

data: tcode1(10) type c,

comp1(10) type c,

seq1(10) type c.

SPLIT fs_string

AT c_hextab

INTO tcode

comp

seq.

move tcode to tcode1.

move comp to comp1.

move seq to seq1.

write:/ tcode1,

comp1,

seq1.

Regards

VEnk@