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

reports

Former Member
0 Likes
791

Hi all,

My requirment is to make

LEGGETT <(>&<)> PLATT to

LEGGETT & PLATT .how to replace <(>&<)> with &.CAn anyone give a sample code to get this..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
764

Is it stored in a variable?

DATA v_str(30) TYPE c.

v_str = 'LEGGETT <(>&<)> PLATT'.

REPLACE '<(>&<)>' IN v_str WITH '&'.

WRITE v_str.

Regards

Wenceslaus.

6 REPLIES 6
Read only

anversha_s
Active Contributor
0 Likes
764

hi,

REPLACE all occurances of '<(>&<)>' WITH  '&' INTO wf_char.

rgds

Anver

Read only

Former Member
0 Likes
765

Is it stored in a variable?

DATA v_str(30) TYPE c.

v_str = 'LEGGETT <(>&<)> PLATT'.

REPLACE '<(>&<)>' IN v_str WITH '&'.

WRITE v_str.

Regards

Wenceslaus.

Read only

Former Member
0 Likes
764

try this

REPLACE <(>&<)> WITH & INTO wa

regards

aswin

Read only

Former Member
0 Likes
764

hi,

u can do this way also:

str1 = LEGGETT <(>&<)> PLATT

v_del = ' '.

split str1 at v_del into v1 v2 v3 .

v_sym = '&'.

concatenate v1 v_sym v3 into str2.

regards,

keerthi

Read only

Former Member
0 Likes
764

hi Alex,

try this code:

data : v_ch(25) type c value'LEGGETT <(>&<)> PLATT'.

REPLACE all occurences of '<(>&<)>' in v_ch WITH '&' .

write : v_ch.

*Dont forget to reward if helpful

Read only

Former Member
0 Likes
764

Execute this coding u will get ur output.

DATA : C(40) VALUE 'LEGGETT <(>&<)> PLATT'.

TRANSLATE C USING '< ( > < ) '.

CONDENSE C.

WRITE C.