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

Escape sequence for character apostrophe

Former Member
0 Likes
6,648

Hi,

I want to have character apostrophe in a character data type variable. How can we do this??? Is there any escape sequence for character apostrophe???

Regards,

Niranjan

1 ACCEPTED SOLUTION
Read only

former_member435013
Active Participant
0 Likes
2,052

Hi,

DATA:

apostr TYPE c VALUE ''''.

P.S.: Escape is apostrophe itself!

regards

Walter Habich

Edited by: Walter Habich on Jun 3, 2008 11:17 AM

Hi,

I want to have character apostrophe in a character data type variable. How can we do this??? Is there any escape sequence for character apostrophe???

Regards,

Niranjan

7 REPLIES 7
Read only

former_member435013
Active Participant
0 Likes
2,053

Hi,

DATA:

apostr TYPE c VALUE ''''.

P.S.: Escape is apostrophe itself!

regards

Walter Habich

Edited by: Walter Habich on Jun 3, 2008 11:17 AM

Read only

0 Likes
2,052

Hi, I cant get this question. CAn you please explain me ?

Read only

0 Likes
2,052

Hey,

Even i am facing the problem of escaping a apostrophe . Can you please provide a solution?

Thanks & Regards,

Lata

Read only

0 Likes
2,052

Hey,

Just check out the solution I'm using down below

Read only

0 Likes
2,052

Hey,

Just check out the solution I'm using down below

Read only

Former Member
2,052

Hi.

To escape an apostrophe, just put an additional apostrophe.

Example:

WRITE / 'THIS LINE HAS AN APOSTROPHE '' IN IT!'.

Output

THIS LINE HAS AN APOSTROPHE ' IN IT!


Read only

Former Member
0 Likes
2,052

Hi ,

Use | | instead. like below.

DATA(lv_new_searchstring) = |*002*|.

DATA(l_stmt) = |SELECT * | &&
|FROM factory | &&
|WHERE upper(factory_name) LIKE '{ lv_new_searchstring }' | &&
|OR upper(factory_id) LIKE '{ lv_new_searchstring }'|.