<?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: Problem in select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344570#M517092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When ever you are doing an OUTER JOIN you cannot use fields from the right hand side table in the WHERE CLAUSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is include this field in the JOIN ON statement and then use the left handle table's field in the WHERE CLAUSE. But I am not sure if you have the same field in the left hand table. if you have it then add that to JOIN ON and add the to the WHERE CALUSE the left hand table's entry as lef~erdat &amp;lt;&amp;gt; ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE if the field does not exist in the left hand side table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is remove this from SELECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And add the DELETE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2007 06:47:15 GMT</pubDate>
    <dc:creator>seshatalpasai_madala</dc:creator>
    <dc:date>2007-06-14T06:47:15Z</dc:date>
    <item>
      <title>Problem in select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344564#M517086</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 am getting error in the  following select st &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select partner2&lt;/P&gt;&lt;P&gt;         vkont&lt;/P&gt;&lt;P&gt;         gpart&lt;/P&gt;&lt;P&gt;         dfkkop~opbel&lt;/P&gt;&lt;P&gt;         xblnr&lt;/P&gt;&lt;P&gt;         budat&lt;/P&gt;&lt;P&gt;         betrw&lt;/P&gt;&lt;P&gt;         sctax&lt;/P&gt;&lt;P&gt;         betrh&lt;/P&gt;&lt;P&gt;         bukrs&lt;/P&gt;&lt;P&gt;         pymet&lt;/P&gt;&lt;P&gt;         opupk&lt;/P&gt;&lt;P&gt;         waers&lt;/P&gt;&lt;P&gt;         mwskz&lt;/P&gt;&lt;P&gt;         c~erdat&lt;/P&gt;&lt;P&gt;         spzah   &lt;/P&gt;&lt;P&gt;         opupw  &lt;/P&gt;&lt;P&gt;         opupz   &lt;/P&gt;&lt;P&gt;         from dfkkop&lt;/P&gt;&lt;P&gt;         inner join but050&lt;/P&gt;&lt;P&gt;         on dfkkop&lt;SUB&gt;gpart = but050&lt;/SUB&gt;partner1&lt;/P&gt;&lt;P&gt;         left outer join zonebillfailure as c on&lt;/P&gt;&lt;P&gt;         dfkkop&lt;SUB&gt;opbel = c&lt;/SUB&gt;opbel &lt;/P&gt;&lt;P&gt;         into table iDfkkop                    &lt;/P&gt;&lt;P&gt;       where   partner2 in rPayers                          &lt;/P&gt;&lt;P&gt;         and   blart &amp;lt;&amp;gt; 'ZZ'                               &lt;/P&gt;&lt;P&gt;         and   reltyp = 'Z1BILL'&lt;/P&gt;&lt;P&gt;         and   xblnr in rConsInv&lt;/P&gt;&lt;P&gt;         and   augst = space                            &lt;/P&gt;&lt;P&gt;         and   hvorg in rhvorg&lt;/P&gt;&lt;P&gt;         and   c~erdat eq '  '.                         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to resolve this probelm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 06:29:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344564#M517086</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T06:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344565#M517087</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;What is the error that you are getting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 06:32:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344565#M517087</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-06-14T06:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344566#M517088</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;When you select the fields using join you have to refer which table with ~..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MARA&lt;SUB&gt;MATNR MARC&lt;/SUB&gt;WERKS&lt;/P&gt;&lt;P&gt;             INTO TABLE T_MATERIAL&lt;/P&gt;&lt;P&gt;             FROM MARA INNER JOIN MARC&lt;/P&gt;&lt;P&gt;             ON MARA&lt;SUB&gt;MATNR = MARC&lt;/SUB&gt;MATNR&lt;/P&gt;&lt;P&gt;             WHERE MATNR IN SO_MATNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&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>Thu, 14 Jun 2007 06:33:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344566#M517088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T06:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344567#M517089</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 am getting the below error &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"No fields from the right hand table of a LEFT_OUTER JOIN may appear in where condition ."ERDAT" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually after the select statement he follng statemt is coming&lt;/P&gt;&lt;P&gt;   'delete idfkkop where not erdat is initial. '&lt;/P&gt;&lt;P&gt;To avoid this delete statement I have added erdat field in where condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 06:41:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344567#M517089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T06:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344568#M517090</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;we should write inner join select statement like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;select kna1~kunnr&lt;/P&gt;&lt;P&gt;          kna1~name1&lt;/P&gt;&lt;P&gt;          kna1~ort01&lt;/P&gt;&lt;P&gt;          ekk0~ebeln&lt;/P&gt;&lt;P&gt;          into table itab&lt;/P&gt;&lt;P&gt;          from kna1 inner join ekko&lt;/P&gt;&lt;P&gt;          on kna1&lt;SUB&gt;kunnr = ekko&lt;/SUB&gt;kunnr&lt;/P&gt;&lt;P&gt;           where kunnr in s_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try in such a manner then u cant get any syntax errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;seshu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 06:43:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344568#M517090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T06:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344569#M517091</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;Yes..if you are using LEFT OUTER JOIN then you cannot have that table field in the WHERE clause..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the select..as you have mentioned...use the DELETE statement to remove the records&lt;/P&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>Thu, 14 Jun 2007 06:43:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344569#M517091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T06:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344570#M517092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When ever you are doing an OUTER JOIN you cannot use fields from the right hand side table in the WHERE CLAUSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is include this field in the JOIN ON statement and then use the left handle table's field in the WHERE CLAUSE. But I am not sure if you have the same field in the left hand table. if you have it then add that to JOIN ON and add the to the WHERE CALUSE the left hand table's entry as lef~erdat &amp;lt;&amp;gt; ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE if the field does not exist in the left hand side table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is remove this from SELECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And add the DELETE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 06:47:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344570#M517092</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-06-14T06:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344571#M517093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes . we know that. it is giving performance problem.&lt;/P&gt;&lt;P&gt;How to fine tune this select statement to improve the performance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 06:47:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344571#M517093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T06:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344572#M517094</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;first solution dont give c~fldname in where clause.  bcoz it is from left outer joined table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;secodly to improve performmacne.. divide above select stmt into 2 select stmt and in first dont use left outer join and instead select into tab and use FOR ALL ENTRIES...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 07:40:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-select-statement/m-p/2344572#M517094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T07:40:09Z</dc:date>
    </item>
  </channel>
</rss>

