<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Syntax error while writing a select query. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323533#M1226933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To add to what Naren has pointed out: the ABAP syntax checker always looks for an even number of quotes in code and if it finds an odd number, it assumes that the last one was never closed and goes over multiple lines. The double quotes is a trick that goes back quite a while to fool the syntax checker.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Mar 2009 21:21:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-13T21:21:54Z</dc:date>
    <item>
      <title>Syntax error while writing a select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323529#M1226929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement where I have to pick a value if the text for that value is &lt;/P&gt;&lt;P&gt;MYCARu2019S Lovliest Car.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And so I wrote a query that &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT	RUECK INTO XRUECK FROM AFVC WHERE ltxa1 = ' MYCARu2019S Lovliest Car'.
                ENDSELECT.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it gives me a syntax error saying	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u201CLiterals taking up more than one line not permittedu201D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can some one tell me what is wrong. I need to select RUECK value from AFVC  table if &lt;/P&gt;&lt;P&gt;ltxa1 value is ' MYCARu2019S Lovliest Car'.&lt;/P&gt;&lt;P&gt;Kindly help what is going wrong...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jessica Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 21:06:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323529#M1226929</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T21:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error while writing a select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323530#M1226930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give two single quotes..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT  rueck INTO xrueck FROM afvc WHERE ltxa1 = ' MYCAR''S Lovliest Car'.
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 21:10:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323530#M1226930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T21:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error while writing a select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323531#M1226931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the below code in the where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' MYCARu2019'S Lovliest Car'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mathews&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 21:17:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323531#M1226931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T21:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error while writing a select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323532#M1226932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Mathew and Narendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solved with your suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jessica Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 21:21:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323532#M1226932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T21:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error while writing a select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323533#M1226933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To add to what Naren has pointed out: the ABAP syntax checker always looks for an even number of quotes in code and if it finds an odd number, it assumes that the last one was never closed and goes over multiple lines. The double quotes is a trick that goes back quite a while to fool the syntax checker.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 21:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323533#M1226933</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T21:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error while writing a select query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323534#M1226934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Narendran&lt;/STRONG&gt; is right use two single quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also careful wile comparing string. i think as you write &lt;STRONG&gt;ltxa1 value is ' MYCARu2019S Lovliest Car'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so while comparing you must not use space just before staring use the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT  rueck INTO xrueck FROM afvc WHERE ltxa1 = 'MYCAR''S Lovliest Car'. " Not use Space before M
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 21:22:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-while-writing-a-select-query/m-p/5323534#M1226934</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-03-13T21:22:35Z</dc:date>
    </item>
  </channel>
</rss>

