<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424972#M1997508</link>
    <description>&lt;P&gt;You're lucky Sandra came here fast. The next time, just read the error message, it's clear enough.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jul 2021 06:53:59 GMT</pubDate>
    <dc:creator>VXLozano</dc:creator>
    <dc:date>2021-07-26T06:53:59Z</dc:date>
    <item>
      <title>Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424967#M1997503</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
  &lt;P&gt;I'm getting below syntax error while saving the program. Kindly share your inputs.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Error : "if the new open SQL syntax is used, it must be used throughout. This includes @ to escape host variables.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Getting error in line "&lt;/STRONG&gt;INTO TABLE IT_mseg".&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;tables : bkpf , acdoca , mseg.

types : begin of ty_mseg,
          bukrs type bkpf-bukrs,
          belnr type bkpf-belnr,
          mblnr type mseg-mblnr,
          blart type bkpf-blart,
          hsl   type  acdoca-hsl,
        end of ty_mseg.

data : it_mseg type table of ty_mseg,
       wa_mseg type ty_mseg.

select-options :  s_bukrs for bkpf-bukrs,
                  s_gjahr for bkpf-gjahr,
                 s_blart for bkpf-blart.

start-of-selection.

  select  bkpf~bukrs , acdoca~belnr , mseg~mblnr , bkpf~blart , acdoca~hsl
          from bkpf inner join acdoca
          on bkpf~belnr = acdoca~belnr
          inner join mseg
          on bkpf~xblnr = mseg~mblnr
          INTO TABLE IT_mseg
          where bkpf-bukrs in s_bukrs
          and  bkpf-gjahr in s_gjahr
          and  bkpf-blart in s_blart.

  loop at : it_mseg into wa_mseg.

    write : / wa_mseg-bukrs , wa_mseg-belnr , wa_mseg-mblnr , wa_mseg-blart , wa_mseg-hsl.
  endloop.

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Jul 2021 15:57:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424967#M1997503</guid>
      <dc:creator>former_member656987</dc:creator>
      <dc:date>2021-07-24T15:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424968#M1997504</link>
      <description>&lt;P&gt;&lt;BR /&gt;Can you correct it to&lt;/P&gt;&lt;P&gt;where bkpf~bukrs in s_bukrs &lt;/P&gt;&lt;P&gt;         and  bkpf~gjahr in s_gjahr &lt;/P&gt;&lt;P&gt;and  bkpf~blart in s_blart.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jul 2021 16:05:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424968#M1997504</guid>
      <dc:creator>subhajit</dc:creator>
      <dc:date>2021-07-24T16:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424969#M1997505</link>
      <description>&lt;P&gt;I say like Subhajit and concerning &lt;STRONG&gt;Error : "if the new open SQL syntax is used, it must be used throughout. This includes @ to escape host variables. &lt;/STRONG&gt;&lt;STRONG&gt;Getting error in line "&lt;/STRONG&gt;INTO TABLE IT_mseg".&lt;/P&gt;&lt;P&gt;This is due to using commas between column names.&lt;/P&gt;&lt;P&gt;Solution (NB: INTO must be at the end):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;where bkpf~bukrs in @s_bukrs
  and bkpf~gjahr in @s_gjahr
  and bkpf~blart in @s_blart&lt;BR /&gt;INTO TABLE @IT_mseg&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Jul 2021 16:11:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424969#M1997505</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-07-24T16:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424970#M1997506</link>
      <description>&lt;P&gt;It worked. Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jul 2021 07:32:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424970#M1997506</guid>
      <dc:creator>former_member656987</dc:creator>
      <dc:date>2021-07-25T07:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424971#M1997507</link>
      <description>&lt;P&gt;Just to escape the variables will fix the error. The INTO position has no effect here (I always put my INTO after the SELECT because I'm used to it).&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 06:53:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424971#M1997507</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-07-26T06:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424972#M1997508</link>
      <description>&lt;P&gt;You're lucky Sandra came here fast. The next time, just read the error message, it's clear enough.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 06:53:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424972#M1997508</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-07-26T06:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424973#M1997509</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;vicen.lozano&lt;/SPAN&gt; Oh, you're right for the INTO. Sometimes the syntax checker requires to place it at the end, not here (I should learn what the exact positioning rules are :-p).&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 07:24:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424973#M1997509</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-07-26T07:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424974#M1997510</link>
      <description>&lt;P&gt;Thanks for the feedback. Please use the COMMENT button for comments, questions, adding details, replying to a comment or a proposed solution or to the OP question, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 07:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424974#M1997510</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-07-26T07:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424975#M1997511</link>
      <description>&lt;P&gt;Yup... I remembered it because sometimes the checker asks me to do that, and then I become upset XD&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 07:32:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/12424975#M1997511</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-07-26T07:32:22Z</dc:date>
    </item>
  </channel>
</rss>

