<?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 classical report in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208336#M472750</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guru's,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i need to write the select statement as nestedselect.and is there any possibility to use for all entries in the following code.if it is then how?wat is the diff b/w inner join and join key word.i need all clarificationc.then full points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx&lt;/P&gt;&lt;P&gt;yogi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : lfa1,ekko,ekpo,mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : vendor like lfa1-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;lifnr like lfa1-lifnr,&lt;/P&gt;&lt;P&gt;ebeln like ekko-ebeln,&lt;/P&gt;&lt;P&gt;ebelp like ekpo-ebelp,&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select lfa1&lt;SUB&gt;lifnr ekko&lt;/SUB&gt;ebeln ekpo&lt;SUB&gt;ebelp mara&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;from lfa1 &lt;/P&gt;&lt;P&gt;inner join ekko on lfa1&lt;SUB&gt;lifnr = ekko&lt;/SUB&gt;lifnr&lt;/P&gt;&lt;P&gt;inner join ekpo on ekko&lt;SUB&gt;ebeln = ekpo&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;inner join mara on ekpo&lt;SUB&gt;matnr = mara&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;where lfa1~lifnr eq vendor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;write : / itab-lifnr ,itab-ebeln,itab-ebelp,itab-matnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 May 2007 07:06:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-01T07:06:22Z</dc:date>
    <item>
      <title>classical report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208336#M472750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guru's,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i need to write the select statement as nestedselect.and is there any possibility to use for all entries in the following code.if it is then how?wat is the diff b/w inner join and join key word.i need all clarificationc.then full points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx&lt;/P&gt;&lt;P&gt;yogi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : lfa1,ekko,ekpo,mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : vendor like lfa1-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;lifnr like lfa1-lifnr,&lt;/P&gt;&lt;P&gt;ebeln like ekko-ebeln,&lt;/P&gt;&lt;P&gt;ebelp like ekpo-ebelp,&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select lfa1&lt;SUB&gt;lifnr ekko&lt;/SUB&gt;ebeln ekpo&lt;SUB&gt;ebelp mara&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;from lfa1 &lt;/P&gt;&lt;P&gt;inner join ekko on lfa1&lt;SUB&gt;lifnr = ekko&lt;/SUB&gt;lifnr&lt;/P&gt;&lt;P&gt;inner join ekpo on ekko&lt;SUB&gt;ebeln = ekpo&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;inner join mara on ekpo&lt;SUB&gt;matnr = mara&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;where lfa1~lifnr eq vendor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;write : / itab-lifnr ,itab-ebeln,itab-ebelp,itab-matnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 07:06:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208336#M472750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T07:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: classical report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208337#M472751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to split up the inner join you can use the FOR ALL ENTRIES addition, but why should you do it. 3 or 4 tables in a inner join is the limit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do ?&lt;/P&gt;&lt;P&gt;First get all relevant vendors in I_LFA1.&lt;/P&gt;&lt;P&gt;THen read the inner join for EKKO-EKPO and MARA FOR ALL ENTRIES in I_LFA1 where EKKO-LIFNR = I_LFA1-LIFNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN and JOIN is exactly the same. Default is INNER JOIN. See also the F1 for JOIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward all helpful answers !!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 07:11:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208337#M472751</guid>
      <dc:creator>h_senden2</dc:creator>
      <dc:date>2007-05-01T07:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: classical report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208338#M472752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi han's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; for the code which i h've mentiond , i need to write nested select statement.how can i?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx &lt;/P&gt;&lt;P&gt;yogi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 07:17:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208338#M472752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T07:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: classical report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208339#M472753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi han's ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; pls give me the detail code for for all enries so tht i can understand easily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx&lt;/P&gt;&lt;P&gt;loki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 07:18:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208339#M472753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T07:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: classical report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208340#M472754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try to avoid nested selects because of bad performance !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code with FOR ALL ENTRIES is something like :&lt;/P&gt;&lt;P&gt;tables : lfa1,ekko,ekpo,mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : vendor like lfa1-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;lifnr like lfa1-lifnr,&lt;/P&gt;&lt;P&gt;ebeln like ekko-ebeln,&lt;/P&gt;&lt;P&gt;ebelp like ekpo-ebelp,&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select lifnr into table i_lfa1&lt;/P&gt;&lt;P&gt;  from lfa1&lt;/P&gt;&lt;P&gt;  where lfa1 eq vendor.&lt;/P&gt;&lt;P&gt;check i_lfa1[] is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ekko&lt;SUB&gt;lifnr ekko&lt;/SUB&gt;ebeln ekpo&lt;SUB&gt;ebelp mara&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;from ekko &lt;/P&gt;&lt;P&gt;inner join ekpo on ekko&lt;SUB&gt;ebeln = ekpo&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;inner join mara on ekpo&lt;SUB&gt;matnr = mara&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES in i_lfa1&lt;/P&gt;&lt;P&gt;where ekko~lifnr eq I_LFA1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;write : / itab-lifnr ,itab-ebeln,itab-ebelp,itab-matnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But : &lt;/P&gt;&lt;P&gt;Internal table I_LFA1 only contains one entry, so do not use the I_LFA1 and FOR ALL ENTRIES, but you use :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ekko&lt;SUB&gt;lifnr ekko&lt;/SUB&gt;ebeln ekpo&lt;SUB&gt;ebelp mara&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;from ekko &lt;/P&gt;&lt;P&gt;inner join ekpo on ekko&lt;SUB&gt;ebeln = ekpo&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;inner join mara on ekpo&lt;SUB&gt;matnr = mara&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;where ekko~lifnr eq vendor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 07:45:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208340#M472754</guid>
      <dc:creator>h_senden2</dc:creator>
      <dc:date>2007-05-01T07:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: classical report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208341#M472755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;one internal table as i_lfa1.&lt;/P&gt;&lt;P&gt;second internal table as i_ekko&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select lifnr from lfa1 into i_lfa1&lt;/P&gt;&lt;P&gt;          where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not i_lfa1 is initial.&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;ebeln b&lt;/SUB&gt;ebelp b~matnr from ekpo&lt;/P&gt;&lt;P&gt;          into table i_ekko&lt;/P&gt;&lt;P&gt;          for all entries in i_lfa1&lt;/P&gt;&lt;P&gt;          a as ekko inner join b as ekpo&lt;/P&gt;&lt;P&gt;          on a&lt;SUB&gt;ebeln = b&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;          where a~lifnr = i_lfa1-lifnr.&lt;/P&gt;&lt;P&gt;          &lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 07:54:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208341#M472755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T07:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: classical report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208342#M472756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eswar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;In your SELECT query in where clause there is only one condition and for joining the tables we can write nested queries:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can nest subqueries, that is, the WHERE and HAVING clauses of subqueries can themselves contain a subquery. When a nested subquery in the WHERE clause uses fields from the previous query, it is known as a correlated query. The subquery is then processed for each line of the database table that satisfies the previous condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Detail description about For all entries with example:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;/people/rob.burbank/blog/2007/03/19/joins-vs-for-all-entries--which-performs-better&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Reward all helpful answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;V.Raghavender.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 08:04:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/classical-report/m-p/2208342#M472756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T08:04:06Z</dc:date>
    </item>
  </channel>
</rss>

