<?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 SELECT statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942259#M1152697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;raymond, i initially took the same approach as u suggested, but i am running into performance issues as both tables are very large...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1158653"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Dec 2008 15:25:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-11T15:25:39Z</dc:date>
    <item>
      <title>Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942246#M1152684</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;My ABAP statement is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select b1~fa a1~fb 
INTO CORRESPONDING FIELDS OF TABLE it_1 
from (table_nm) as a1 inner join db_tab2 as b1 
on a1~fb = b1~fb.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this statement it gives me following error in syntax check:&lt;/P&gt;&lt;P&gt;*Wrong expression "INNER" in FROM clause. WHERE condition.	*	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;CD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:00:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942246#M1152684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942247#M1152685</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;/P&gt;&lt;P&gt;Check this&lt;/P&gt;&lt;P&gt;select b1&lt;SUB&gt;fa a1&lt;/SUB&gt;fb &lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_1 &lt;/P&gt;&lt;P&gt;from (table_nm) as a1 inner join &lt;STRONG&gt;on&lt;/STRONG&gt; db_tab2 as b1 &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where&lt;/STRONG&gt; a1&lt;SUB&gt;fb = b1&lt;/SUB&gt;fb.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:02:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942247#M1152685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942248#M1152686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;still the same error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:04:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942248#M1152686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942249#M1152687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT VBRK~VBELN AS VBELN&lt;/P&gt;&lt;P&gt;         VBRK~VKORG AS VKORG&lt;/P&gt;&lt;P&gt;         VBRK~VTWEG AS VTWEG&lt;/P&gt;&lt;P&gt;         VBRP~PRODH AS PRODH&lt;/P&gt;&lt;P&gt;         VBRK~FKDAT AS FKDAT&lt;/P&gt;&lt;P&gt;         SUM( VBRP~FKLMG ) AS FKLMG&lt;/P&gt;&lt;P&gt;         SUM( VBRP~NETWR ) AS NETWR&lt;/P&gt;&lt;P&gt;         INTO CORRESPONDING FIELDS OF WA_TAB FROM VBRK AS VBRK JOIN VBRP AS VBRP&lt;/P&gt;&lt;P&gt;         ON VBRK&lt;SUB&gt;VBELN = VBRP&lt;/SUB&gt;VBELN&lt;/P&gt;&lt;P&gt;         WHERE  VBRP~MATNR = WA_TAB-MATNR&lt;/P&gt;&lt;P&gt;         AND VBRP~WERKS = WA_TAB-WERKS&lt;/P&gt;&lt;P&gt;         AND VBRK~FKDAT BETWEEN S_DATE-LOW AND S_DATE-HIGH&lt;/P&gt;&lt;P&gt;         AND VBRK~VKORG IN S_VKORG&lt;/P&gt;&lt;P&gt;         AND VBRK~VTWEG IN S_VTWEG&lt;/P&gt;&lt;P&gt;         AND VBRK~FKSTO NE 'X'&lt;/P&gt;&lt;P&gt;         AND VBRK~FKART EQ 'ZBI1'&lt;/P&gt;&lt;P&gt;         AND  ( VBRK&lt;SUB&gt;VBTYP EQ'M' OR VBRK&lt;/SUB&gt;VBTYP EQ 'P'  OR VBRK&lt;SUB&gt;VBTYP  EQ 'O' OR VBRK&lt;/SUB&gt;VBTYP EQ '6'&lt;/P&gt;&lt;P&gt;         OR VBRK~VBTYP EQ '5'  )&lt;/P&gt;&lt;P&gt;          GROUP BY VBRK&lt;SUB&gt;VBELN VBRK&lt;/SUB&gt;VKORG VBRK&lt;SUB&gt;VTWEG VBRP&lt;/SUB&gt;PRODH VBRK&lt;SUB&gt;FKDAT VBRP&lt;/SUB&gt;FKLMG.&lt;/P&gt;&lt;P&gt;         WA_TAB-VAR0 = ( ( WA_TAB-VAR0 + WA_TAB-FKLMG ) ).&lt;/P&gt;&lt;P&gt;         WA_TAB-VAR34 = ( WA_TAB-VAR34 + WA_TAB-NETWR ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is how you join statements&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:04:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942249#M1152687</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942250#M1152688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the use of where clause mandatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am following the syntax exactly as here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb39c4358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb39c4358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but still get the error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:06:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942250#M1152688</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942251#M1152689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes its mandatory as you need to provide a contion for it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:12:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942251#M1152689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942252#M1152690</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;I think the problem it can't do a INNER JOIN dynamic, u need to insert the name of all tables used in the select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So u can write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables: vbak, vbap.

data: vbeln like vbak-vbeln, posnr like vbap-posnr.

select A~VBELN B~POSNR into (vbeln, posnr)
   from VBAK as A inner join VBAP as B
     on A~VBELN = B~VBELN
      where A~vbeln &amp;gt; '10000000000'.
endselect.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but u don't write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables: vbak, vbap.

data: vbeln like vbak-vbeln, posnr like vbap-posnr.

data: table(100).

select A~VBELN B~POSNR into (vbeln, posnr)
   from (TABLE) as A inner join VBAP as B
     on A~VBELN = B~VBELN
      where A~vbeln &amp;gt; '10000000000'.
endselect.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:13:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942252#M1152690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942253#M1152691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi CD,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where clause is mandatory when you are using Inner Join.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:13:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942253#M1152691</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942254#M1152692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think we are allowed to use a dynamic table name in the JOIN expression of the SELECT statement in old version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look under SE38 at the SELECT online help on YOUR system, in the JOIN table names must have the same form as in variant 1 (constants) or are themselves join expressions, not as variable which is variant 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform first a dynamic selection with the variable table name, and then perform a SELECT with the clause FOR ALL ENTRIES from the second table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On which EXACT version do you run?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:15:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942254#M1152692</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-12-11T15:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942255#M1152693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Where clause is mandatory when you are using Inner Join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not correct. All joined tables and on-conditions need to be included in the dynamic (dbtab_syntax) expression, see F1 help for SELECT - source.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:16:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942255#M1152693</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-12-11T15:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942256#M1152694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; yes its mandatory as you need to provide a contion for it&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Incorrect. It's good to have a where, but not "mandatory".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:17:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942256#M1152694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942257#M1152695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the hint, the db name from variable was the culprit. I replaced it with a fixed DB name and it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem here is that this table name will be different for me in all the 3 systems in the landscape (dev, qa and prod). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what approach should i take in this case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:18:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942257#M1152695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942258#M1152696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
concatenate table_nm ' as a1 inner join db_tab2 as b1 on a1~fb = b1~fb' into dbtab_syntax.
select b1~fa a1~fb 
from (dbtab_syntax)
INTO CORRESPONDING FIELDS OF TABLE it_1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:25:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942258#M1152696</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-12-11T15:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942259#M1152697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;raymond, i initially took the same approach as u suggested, but i am running into performance issues as both tables are very large...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1158653"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:25:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942259#M1152697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942260#M1152698</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;Try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF ITAB OCCURS 0,
        A,
        B,
      END   OF ITAB.


DATA: TABLENAME(30).

DATA: WA_FTAB(72) TYPE C,
      FTAB        LIKE TABLE OF WA_FTAB.


WA_FTAB = 'A'.   APPEND WA_FTAB TO FTAB.

SELECT (FTAB) FROM (TABLENAME) INTO TABLE ITAB.

LOOP AT ITAB.
  SELECT SINGLE A FRO &amp;lt;TABLE 2&amp;gt; 
    INTO ITAB-B
    WHERE A = ITAB-A.
  MODIFY ITAB.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF ITAB OCCURS 0,
        VBELN LIKE VBAK-VBELN,
        POSNR LIKE VBAP-POSNR,
        VKORG LIKE VBAK-VKORG,
      END   OF ITAB.


DATA: TABLENAME(30) VALUE 'VBAP'.

DATA: WA_FTAB(72) TYPE C,
      FTAB        LIKE TABLE OF WA_FTAB.


WA_FTAB = 'VBELN'.   APPEND WA_FTAB TO FTAB.
WA_FTAB = 'POSNR'.   APPEND WA_FTAB TO FTAB.

SELECT (FTAB) UP TO 10 ROWS FROM (TABLENAME) INTO TABLE ITAB.

LOOP AT ITAB.
  SELECT SINGLE VKORG FROM VBAK INTO ITAB-VKORG
    WHERE VBELN = ITAB-VBELN.
  MODIFY ITAB.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:33:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942260#M1152698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error in SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942261#M1152699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; the problem here is that this table name will be different for me in all the 3 systems in the landscape (dev, qa and prod). &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; what approach should i take in this case.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You could create views in each of the instances and determine the one to use dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:39:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-select-statement/m-p/4942261#M1152699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T15:39:19Z</dc:date>
    </item>
  </channel>
</rss>

