<?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 optimizing the select query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-select-query/m-p/3437209#M825437</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know what would be alternate table or optimal way to make the following queries work in a more efficient manner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) select sfakn from vbrk into table tl_sfakn for all entries in tl_vbrp WHERE sfakn = tl_vbrp-vbeln.&lt;/P&gt;&lt;P&gt;2)   SELECT vbeln FROM vbrp INTO TABLE tl_vbrp  FOR ALL ENTRIES IN tl_vbap[]   WHERE vgbel = tl_vbap-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Feb 2008 19:07:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-16T19:07:21Z</dc:date>
    <item>
      <title>optimizing the select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-select-query/m-p/3437209#M825437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know what would be alternate table or optimal way to make the following queries work in a more efficient manner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) select sfakn from vbrk into table tl_sfakn for all entries in tl_vbrp WHERE sfakn = tl_vbrp-vbeln.&lt;/P&gt;&lt;P&gt;2)   SELECT vbeln FROM vbrp INTO TABLE tl_vbrp  FOR ALL ENTRIES IN tl_vbap[]   WHERE vgbel = tl_vbap-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Feb 2008 19:07:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-select-query/m-p/3437209#M825437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-16T19:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: optimizing the select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-select-query/m-p/3437210#M825438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friend i could see that you are working on mainly on VBRP and VBRK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try with the following Views for a better results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WB2_V_VBRK_VBRP &lt;/P&gt;&lt;P&gt;Data Selection from Customer Billing Document&lt;/P&gt;&lt;P&gt;WB2_V_VBRK_VBRP2&lt;/P&gt;&lt;P&gt;Data Selection from Customer Billing Documents (w/o WBGT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lijo Joseph&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 08:52:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-select-query/m-p/3437210#M825438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T08:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: optimizing the select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-select-query/m-p/3437211#M825439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vijay,&lt;/P&gt;&lt;P&gt;How doing?. plz find my suggestions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. fetch vgbel ( sales document) also into tl_vbrp in previous select.  Now make use of document flow as shown&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select vbeln from vbfa&lt;/P&gt;&lt;P&gt;into table tl_vbfa for all entries in tl_vbrp&lt;/P&gt;&lt;P&gt;where vbelv EQ t_vbrp-vgbel and&lt;/P&gt;&lt;P&gt;          VBTYP_N IN ('M','N','O','P').  "billing docs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if tl_vbfa[] is not inital.&lt;/P&gt;&lt;P&gt;  select vbeln sfakn&lt;/P&gt;&lt;P&gt;  into table tl_sfakn&lt;/P&gt;&lt;P&gt;  from vbrk for all entries in tl_vbfa&lt;/P&gt;&lt;P&gt; where vbeln EQ tl_vbfa-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt; delete tl_sfakn where sfakn is initial.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. u can use VBFA as shown above , use preceding and subsequent document category appropriately&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;sreejith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 09:45:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/optimizing-the-select-query/m-p/3437211#M825439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T09:45:27Z</dc:date>
    </item>
  </channel>
</rss>

