Application Development 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: 

Special character ' in the string variable

Former Member
0 Kudos
3,417

Hi,

I need to insert in the string veriable the special character '. How should I do it ?

variable = '''.

It does not work ...

BR

Wojcieh

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos
479

Hello,

Try as

data: L_COM VALUE ''''.

regards,

Naimesh

5 REPLIES 5

naimesh_patel
Active Contributor
0 Kudos
480

Hello,

Try as

data: L_COM VALUE ''''.

regards,

Naimesh

Former Member
0 Kudos
479

hi, Try this,

DATA A.

A = ''''.

WRITE:/ A.

Former Member
0 Kudos
479

1)Declare a variable and assign the special character to that variable.

2)Then use the CONCATENATE option to get the value in the string variable.

Just copy and execute this code.


REPORT zztest.

<b>DATA : temp(1) VALUE ''''.</b> Decalare your special character 

DATA : variable TYPE string.

START-OF-SELECTION.

  BREAK-POINT.

  variable = 'SDNSAP'.

  CONCATENATE temp variable temp INTO variable.



  WRITE : / variable.


<b>The output is</b>

'SDNSAP'

Regards,

AS.

Former Member
0 Kudos
479

Hi,

Check this stmt.

concatenate '''' 'PRAKASH' '''' into var1.

write var1

Rgds,

Prakash

Former Member
0 Kudos
479

Hi,

Store the special variable value in text Element and then assign to variable.

that is.

variable = TEXT-001.

double click on TEXT-001 and store the value.

<b>Reward Points & Mark Helpful Answers</b>