<?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 Performance (Select at BKPF) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-select-at-bkpf/m-p/2024301#M414712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is there a better way to select at BKPF?&lt;/P&gt;&lt;P&gt;currently I am selecting at BKPF using all of the primary key and using for all enties. &lt;/P&gt;&lt;P&gt;but it is still taking a loong time to finish the select. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is my select statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ct_scdoc contains 500,000 line items. (huge! internal table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT ct_scdoc IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT bukrs&lt;/P&gt;&lt;P&gt;             belnr&lt;/P&gt;&lt;P&gt;             gjahr&lt;/P&gt;&lt;P&gt;             bvorg&lt;/P&gt;&lt;P&gt;             hwaer&lt;/P&gt;&lt;P&gt;             bktxt&lt;/P&gt;&lt;P&gt;             usnam&lt;/P&gt;&lt;P&gt;    FROM bkpf&lt;/P&gt;&lt;P&gt;    INTO TABLE i_bkpf&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN ct_scdoc&lt;/P&gt;&lt;P&gt;    WHERE bukrs = ct_scdoc-bukrs&lt;/P&gt;&lt;P&gt;      AND belnr = ct_scdoc-belnr&lt;/P&gt;&lt;P&gt;      AND gjahr = ct_scdoc-gjahr.&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, 13 Mar 2007 05:38:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-13T05:38:04Z</dc:date>
    <item>
      <title>Performance (Select at BKPF)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-select-at-bkpf/m-p/2024301#M414712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is there a better way to select at BKPF?&lt;/P&gt;&lt;P&gt;currently I am selecting at BKPF using all of the primary key and using for all enties. &lt;/P&gt;&lt;P&gt;but it is still taking a loong time to finish the select. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is my select statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ct_scdoc contains 500,000 line items. (huge! internal table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT ct_scdoc IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT bukrs&lt;/P&gt;&lt;P&gt;             belnr&lt;/P&gt;&lt;P&gt;             gjahr&lt;/P&gt;&lt;P&gt;             bvorg&lt;/P&gt;&lt;P&gt;             hwaer&lt;/P&gt;&lt;P&gt;             bktxt&lt;/P&gt;&lt;P&gt;             usnam&lt;/P&gt;&lt;P&gt;    FROM bkpf&lt;/P&gt;&lt;P&gt;    INTO TABLE i_bkpf&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN ct_scdoc&lt;/P&gt;&lt;P&gt;    WHERE bukrs = ct_scdoc-bukrs&lt;/P&gt;&lt;P&gt;      AND belnr = ct_scdoc-belnr&lt;/P&gt;&lt;P&gt;      AND gjahr = ct_scdoc-gjahr.&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, 13 Mar 2007 05:38:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-select-at-bkpf/m-p/2024301#M414712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T05:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Performance (Select at BKPF)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-select-at-bkpf/m-p/2024302#M414713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Select statement looks good.&lt;/P&gt;&lt;P&gt;All the data pertains to single fiscal year(GJAHR).&lt;/P&gt;&lt;P&gt;if you wants you can restrict it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 05:42:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-select-at-bkpf/m-p/2024302#M414713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T05:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Performance (Select at BKPF)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-select-at-bkpf/m-p/2024303#M414714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another better way to extract the data efficiently from DB is using Indicies. But here your case if different, you are using FOR ALL ENTRIES, ie, using a driver internal table, u are extracting data. so you cant use secondary index in this case.&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;Sujatha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 05:43:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-select-at-bkpf/m-p/2024303#M414714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T05:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Performance (Select at BKPF)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-select-at-bkpf/m-p/2024304#M414715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be optimized breaking the CT_STDOC table into sets of lesser records and use APPENDING TABLE I_BKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg: if CT_STDOC has 6000 entries the for every 1500 entries of CT_STDOC perform a SELECT with the APPENDING TABLE form.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 05:55:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-select-at-bkpf/m-p/2024304#M414715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T05:55:58Z</dc:date>
    </item>
  </channel>
</rss>

