<?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 Select with Join doesn't work in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872481#M930824</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi @ll,&lt;/P&gt;&lt;P&gt;can anybody say why I get the syntax error &lt;STRONG&gt;The column name "VKORG" has two meanings. ABAP/4 Open SQL statement.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT vtweg vmsta mtpos vkorg&lt;/P&gt;&lt;P&gt;    FROM MVKE&lt;/P&gt;&lt;P&gt;    INNER JOIN YMMARKET_CODE&lt;/P&gt;&lt;P&gt;    ON mvke&lt;SUB&gt;vkorg = ymmarket_code&lt;/SUB&gt;vkorg&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE i_mvke&lt;/P&gt;&lt;P&gt;    WHERE mvke~matnr = p_matnr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 May 2008 15:21:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-20T15:21:33Z</dc:date>
    <item>
      <title>Select with Join doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872481#M930824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi @ll,&lt;/P&gt;&lt;P&gt;can anybody say why I get the syntax error &lt;STRONG&gt;The column name "VKORG" has two meanings. ABAP/4 Open SQL statement.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT vtweg vmsta mtpos vkorg&lt;/P&gt;&lt;P&gt;    FROM MVKE&lt;/P&gt;&lt;P&gt;    INNER JOIN YMMARKET_CODE&lt;/P&gt;&lt;P&gt;    ON mvke&lt;SUB&gt;vkorg = ymmarket_code&lt;/SUB&gt;vkorg&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE i_mvke&lt;/P&gt;&lt;P&gt;    WHERE mvke~matnr = p_matnr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 15:21:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872481#M930824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T15:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Select with Join doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872482#M930825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;write as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT vtweg vmsta mtpos &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MVKE~vkorg&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM MVKE&lt;/P&gt;&lt;P&gt;INNER JOIN YMMARKET_CODE&lt;/P&gt;&lt;P&gt;ON mvke&lt;SUB&gt;vkorg = ymmarket_code&lt;/SUB&gt;vkorg&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE i_mvke&lt;/P&gt;&lt;P&gt;WHERE mvke~matnr = p_matnr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 15:23:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872482#M930825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T15:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Select with Join doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872483#M930826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because the column name vkorg has two meanings &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It must be either&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT vtweg vmsta mtpos mvke~vkorg
FROM MVKE
INNER JOIN YMMARKET_CODE
ON mvke~vkorg = ymmarket_code~vkorg
INTO CORRESPONDING FIELDS OF TABLE i_mvke
WHERE mvke~matnr = p_matnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT vtweg vmsta mtpos ymmarket_code~vkorg
FROM MVKE
INNER JOIN YMMARKET_CODE
ON mvke~vkorg = ymmarket_code~vkorg
INTO CORRESPONDING FIELDS OF TABLE i_mvke
WHERE mvke~matnr = p_matnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 15:24:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872483#M930826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T15:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Select with Join doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872484#M930827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi there...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the error is because in select, the system is unable to make out whose vkorg field u want to fetch as the field exists in both the tables.&lt;/P&gt;&lt;P&gt;Do like this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select .... a~vkorg from table1 as a inner join table2 as b where......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will make ur query work....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do reward and close the query or get bak if facing any more issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 15:25:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872484#M930827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T15:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Select with Join doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872485#M930828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this way...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a&lt;SUB&gt;vtweg a&lt;/SUB&gt;vmsta a&lt;SUB&gt;mtpos a&lt;/SUB&gt;vkorg&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE i_mvke&lt;/P&gt;&lt;P&gt;FROM MVKE &lt;STRONG&gt;AS A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN YMMARKET_CODE &lt;STRONG&gt;AS B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ON b&lt;SUB&gt;vkorg = a&lt;/SUB&gt;vkorg&lt;/P&gt;&lt;P&gt;WHERE a~matnr = p_matnr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 15:26:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872485#M930828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T15:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select with Join doesn't work</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872486#M930829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all of you for your help. Issue resolved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2008 15:31:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-with-join-doesn-t-work/m-p/3872486#M930829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-20T15:31:31Z</dc:date>
    </item>
  </channel>
</rss>

