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: 

Inserting inverted comma in constant

Former Member
0 Kudos

Hi

I have to include an inverted comma in text literal.

How to do this.

The text is 'MSD Int' l Services B.V.'

Note the comma after "int" in above text

if i declare like this

constants:c_1048_text TYPE char40 VALUE 'MSD Int' l Services B.V.'.

this is giving error.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

constants:c_1048_text TYPE char40 VALUE `MSD Int' l Services B.V.`.

note write ur text within ` ` not ' ' if u have to use ' in ur text

now it won't give error

Cheers,

Will.

4 REPLIES 4

Former Member
0 Kudos

HI,

write like this.

constants:c_1048_text TYPE char40 VALUE 'MSD Int'' l Services B.V.'.

immediate single quotation in abap is treated as inverted comma

rgds,

bharat.

Former Member
0 Kudos

Hi Ajay,

You can write (so 2 inverted commas):

constants:c_1048_text TYPE char40 VALUE 'MSD Int'' l Services B.V.'.

Regards,

John.

Former Member
0 Kudos

Hi,

constants:c_1048_text TYPE char40 VALUE `MSD Int' l Services B.V.`.

note write ur text within ` ` not ' ' if u have to use ' in ur text

now it won't give error

Cheers,

Will.

0 Kudos

Yes Will it worked.

Thanks a lot to all and specially WILL.

Full marks