Skip to Content
author's profile photo Former Member
Former Member

Inserting inverted comma in constant

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 11:06 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 11:02 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 11:04 AM

    Hi Ajay,

    You can write (so 2 inverted commas):

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

    Regards,

    John.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.