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: 

Problem in search because of consecutive single quotes.

Former Member
0 Kudos

Hi,

I have to search for this statemnt in a program <data> TYPE x VALUE '09'.While passing the values in an internal table i have to declare it as follows

wa_tab1-command = '<data> TYPE x VALUE '09''.This statement gives an error ,may be because of consecutive single quotes.

So I am unable to search for the entire statement.Can anyone tell me how to do that.

Regards

Jyothsna

1 ACCEPTED SOLUTION

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

Please remember in ABAP there is an escape character for single quote(') which is single quote itself

In simple language, for every single quote you have to add an additional quote.

Build your stmt as :

DATA: CMD TYPE STRING.

CMD = '<data> TYPE x VALUE ''09'''.

WRITE CMD.

Hope i am clear.

BR,

Suhas

3 REPLIES 3

Former Member
0 Kudos

Deleted

Edited by: Vikranth.Reddy on Oct 6, 2009 3:14 PM

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

Please remember in ABAP there is an escape character for single quote(') which is single quote itself

In simple language, for every single quote you have to add an additional quote.

Build your stmt as :

DATA: CMD TYPE STRING.

CMD = '<data> TYPE x VALUE ''09'''.

WRITE CMD.

Hope i am clear.

BR,

Suhas

former_member222860
Active Contributor
0 Kudos

You can declare like this:

data: wa_tab1-command type string value '''<data> TYPE x VALUE ''09"'.

write:/ wa_tab1-command.

Pl. see double (") after 09 and followed with single (') quote

Edited by: Mahesh Reddy on Oct 6, 2009 11:55 AM