<?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: error in join in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732878#M1300224</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;Chk this example coding,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT a~vbeln
a~fkart
a~fkdat
a~inco1
a~inco2
a~land1
a~netwr
a~kunag
a~waerk
a~vkorg
a~vtweg
a~kunrg
b~kunnr
b~parvw
b~lifnr
b~adrnr
c~vgbel
c~aubel
A~KNUMV
d~addrnumber
d~city1
d~POST_CODE1
d~NAME1
e~kunnr
e~name1
INTO CORRESPONDING FIELDS OF TABLE It_data
FROM vbrk as a
inner join vbrp as c on a~vbeln = c~vbeln
inner join vbpa as b on a~vbeln = b~vbeln and parvw = 'WE'
inner join adrc as d on d~ADDRNUMBER = b~adrnr
inner join kna1 as e on e~kunnr = b~kunnr
WHERE a~vbeln in s_vbeln
 AND a~fkart in s_fkart
 AND a~fkdat in s_fkdat
 AND a~vkorg in s_vkorg
 AND a~vtweg in s_vtweg
 AND a~kunag in s_kunag.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont think you have selected the table from where you selecting field grsti..that i think comes from a different table so you have mentioned it as b.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nikhil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nikhil Kanegaonkar on Jun 3, 2009 9:27 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jun 2009 07:27:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-03T07:27:08Z</dc:date>
    <item>
      <title>error in join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732875#M1300221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT A&lt;SUB&gt;aufnr B&lt;/SUB&gt;gstri A&lt;SUB&gt;autyp A&lt;/SUB&gt;loekz A&lt;SUB&gt;kokrs A&lt;/SUB&gt;abkrs&lt;/P&gt;&lt;P&gt;             FROM AUFK AS A&lt;/P&gt;&lt;P&gt;             into table it_aufk&lt;/P&gt;&lt;P&gt;             INNER JOIN AFKO AS B&lt;/P&gt;&lt;P&gt;             ON A&lt;SUB&gt;erdat = B&lt;/SUB&gt;gstri&lt;/P&gt;&lt;P&gt;             WHERE B~gstri in s_date. "s_date is date from select options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the error is "wrong table name or table alias name "B". the field "B~gstri". Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 07:21:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732875#M1300221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T07:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: error in join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732876#M1300222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the "into table" is in the wrong place, try moving it before the "from aufk" line.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 07:23:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732876#M1300222</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-06-03T07:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: error in join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732877#M1300223</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 this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT A~aufnr 
             A~autyp 
             A~loekz 
             A~kokrs 
             A~abkrs
             B~gstri 
into table it_aufk
  FROM AUFK AS A
INNER JOIN AFKO AS B ON A~erdat = B~gstri
WHERE B~gstri in s_date.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Smitha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 07:25:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732877#M1300223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T07:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: error in join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732878#M1300224</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;Chk this example coding,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT a~vbeln
a~fkart
a~fkdat
a~inco1
a~inco2
a~land1
a~netwr
a~kunag
a~waerk
a~vkorg
a~vtweg
a~kunrg
b~kunnr
b~parvw
b~lifnr
b~adrnr
c~vgbel
c~aubel
A~KNUMV
d~addrnumber
d~city1
d~POST_CODE1
d~NAME1
e~kunnr
e~name1
INTO CORRESPONDING FIELDS OF TABLE It_data
FROM vbrk as a
inner join vbrp as c on a~vbeln = c~vbeln
inner join vbpa as b on a~vbeln = b~vbeln and parvw = 'WE'
inner join adrc as d on d~ADDRNUMBER = b~adrnr
inner join kna1 as e on e~kunnr = b~kunnr
WHERE a~vbeln in s_vbeln
 AND a~fkart in s_fkart
 AND a~fkdat in s_fkdat
 AND a~vkorg in s_vkorg
 AND a~vtweg in s_vtweg
 AND a~kunag in s_kunag.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont think you have selected the table from where you selecting field grsti..that i think comes from a different table so you have mentioned it as b.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nikhil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nikhil Kanegaonkar on Jun 3, 2009 9:27 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 07:27:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732878#M1300224</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T07:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: error in join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732879#M1300225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT a~aufnr &lt;/P&gt;&lt;P&gt;             a~autyp&lt;/P&gt;&lt;P&gt;             a~loekz &lt;/P&gt;&lt;P&gt;             a~kokrs &lt;/P&gt;&lt;P&gt;             a~abkrs&lt;/P&gt;&lt;P&gt;             b~gstri&lt;/P&gt;&lt;P&gt;             INTO TABLE IT_AUFK &lt;/P&gt;&lt;P&gt;             FROM AUFK AS a INNER JOIN AFKO AS b&lt;/P&gt;&lt;P&gt;             ON a&lt;SUB&gt;erdat = b&lt;/SUB&gt;gstri&lt;/P&gt;&lt;P&gt;             WHERE b~gstri in s_date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 07:30:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732879#M1300225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T07:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: error in join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732880#M1300226</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;SELECT A&lt;SUB&gt;aufnr A&lt;/SUB&gt;autyp A&lt;SUB&gt;loekz A&lt;/SUB&gt;kokrs A&lt;SUB&gt;abkrs B&lt;/SUB&gt;gstri &lt;/P&gt;&lt;P&gt;into table it_aufk&lt;/P&gt;&lt;P&gt;FROM AUFK AS A &lt;/P&gt;&lt;P&gt;INNER JOIN AFKO AS B&lt;/P&gt;&lt;P&gt;ON A&lt;SUB&gt;erdat = B&lt;/SUB&gt;gstri&lt;/P&gt;&lt;P&gt;WHERE B~gstri in s_date. "s_date is date from select options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 07:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732880#M1300226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T07:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: error in join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732881#M1300227</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;Before using join please keep in mind that performance would be effected from it.&lt;/P&gt;&lt;P&gt;And eventhough you need to use it,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PLEASE SELECT THE DATA FRONM TABLE AUFK &amp;amp; AFKO IN THE ORDER GIVEN IN THE DB TABLE AND TRY TO FETCH ALL THE PRIMARY KEYS OF BOTH THE TABLE USED IN JOINS&lt;/STRONG&gt;( In ur case,primary keys from table AUFK &amp;amp; AFKO).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR IT_AUFK.&lt;/P&gt;&lt;P&gt;SELECT a~aufnr &lt;/P&gt;&lt;P&gt;             a~autyp&lt;/P&gt;&lt;P&gt;             a~loekz &lt;/P&gt;&lt;P&gt;             a~kokrs &lt;/P&gt;&lt;P&gt;             a~abkrs&lt;/P&gt;&lt;P&gt;             b~gstri&lt;/P&gt;&lt;P&gt;INTO TABLE IT_AUFK &lt;/P&gt;&lt;P&gt;FROM AUFK AS a INNER JOIN AFKO AS b&lt;/P&gt;&lt;P&gt;          ON a&lt;SUB&gt;erdat = b&lt;/SUB&gt;gstri&lt;/P&gt;&lt;P&gt;          WHERE b~gstri in s_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please close the thread as answered!!!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 08:08:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732881#M1300227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T08:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: error in join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732882#M1300228</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;use this code::-------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;aufnr b&lt;/SUB&gt;gstri a&lt;SUB&gt;autyp a&lt;/SUB&gt;loekz a&lt;SUB&gt;kokrs a&lt;/SUB&gt;abkrs into corresponding fields of &lt;/P&gt;&lt;P&gt;table it_aufk&lt;/P&gt;&lt;P&gt;from &lt;/P&gt;&lt;P&gt;aufk as a&lt;/P&gt;&lt;P&gt;inner join &lt;/P&gt;&lt;P&gt;afko as b&lt;/P&gt;&lt;P&gt;on&lt;/P&gt;&lt;P&gt;a&lt;SUB&gt;erdat = b&lt;/SUB&gt;gstri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b~gstri in s_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;group by a&lt;SUB&gt;aufnr b&lt;/SUB&gt;gstri a&lt;SUB&gt;autyp a&lt;/SUB&gt;loekz a&lt;SUB&gt;kokrs a&lt;/SUB&gt;abkrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vaneet Thakur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 08:21:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-join/m-p/5732882#M1300228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T08:21:57Z</dc:date>
    </item>
  </channel>
</rss>

