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

assigning apostrophe ( ' ) to a variable

Former Member
0 Likes
2,935

Hi,

I have forgotten one of the basic principles of abap,

so could anybody tell me how does one assign an apostrophe to a variable i.e how does one assign the character ' to a variable??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,624

Hi,

REPORT ZSRITEST.

<b>DATA: lv_quote.

lv_quote = ''''.</b>

WRITE lv_quote.

Hope this helps..

Sri

2 REPLIES 2
Read only

Former Member
0 Likes
1,625

Hi,

REPORT ZSRITEST.

<b>DATA: lv_quote.

lv_quote = ''''.</b>

WRITE lv_quote.

Hope this helps..

Sri

Read only

Former Member
0 Likes
1,624

Hi arup,

its simple !

1. sample code (just copy paste)

report abc.

data : var(10) type c.

var = 'amit'''.

write 😕 var.

2. ********************

use TWO single quotes continuosuly

to tell abap to consider it as

single quote for string purpose.

regards,

amit m.