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

concatenate string

Former Member
0 Likes
969

How I can concatenate chracter ' to a string .

example-

string = 123

I want result as

string = '123'

Please suggest.

Edited by: Rohit Kumar on Feb 20, 2009 1:58 PM

Edited by: Rohit Kumar on Feb 20, 2009 2:00 PM

9 REPLIES 9
Read only

Former Member
0 Likes
944

Hi,

As per ur ques,concatenate will delete the spaces.

so u can use like CONCATENATE S1 S2 into S3.

Regards,

jaya

Read only

christine_evans
Active Contributor
0 Likes
944

Put the ' into a text element and use that with your CONCATENATE instead of '.

Read only

Former Member
0 Likes
944

Hi,

Check the below code.

data: v_string type string value '123'.

concatenate '''' v_string '''' into v_string.

write:/ v_string.

Regards,

Sunil

Read only

Former Member
0 Likes
944

Hi,

Use four '

So,


CONCATENATE '''' '123' '''' INTO W_FIELD

Regards,

Nick

Read only

viquar_iqbal
Active Contributor
0 Likes
944

Hi

you need to use 5 '

CONCATENATE ''''' '123' ''''' INTO ABC

This should work

Read only

former_member222860
Active Contributor
0 Likes
944

Hi,

Use this

data: val type string.

VAL = 'ABC'.
REPLACE 'ABC' WITH '''ABC''' INTO VAL.

WRITE:/ VAL.

Read only

Former Member
0 Likes
944

You can use Text Elements --> Text symbols.

In the Text symbols, create a new text-001 with open quotes '

string = 123.
CONCATENATE text-001 string text-001 INTO string.

The result would be

string = '123'.

Text symbol

Text-001 is '

Hope this will work..

Read only

Former Member
0 Likes
944

Hi Rohith,

try with this below syntax .

concatenate '''' lf_str '''' into lf_str.

hope this will help you .

Regards

Babumiya Mohammad

Read only

Former Member
0 Likes
944

Duplicate post locked.

Rob