<?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: Select faster... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398524#M534111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;experienced developer will select from BSEG only if the full key of the table can be supplied with selection criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this purpose it is recommenden to select first from a useful secondary index table like BSID BSIS BSAS BSAK and what ther is more. Make a forum search on above tables and get all information youu may need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know your requirement in business terms, don't know the logic of ZBKPF. But I'm convinced you can reduce the number of records in ZBKF drastically using secondary index tables.Also, you can get the respective line item no BUZEI from those tables.&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2007 10:02:20 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2007-06-18T10:02:20Z</dc:date>
    <item>
      <title>Select faster...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398515#M534102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a program that extract data from  BSEG and BKPF, and this select is so slowler...Have any idea to do it more faster?&lt;/P&gt;&lt;P&gt;thanks a lot &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select BUKRS BELNR GJAHR BUZEI KOKRS HKONT BSCHL WRBTR SHKZG LIFNR&lt;/P&gt;&lt;P&gt;  from BSEG&lt;/P&gt;&lt;P&gt;  into corresponding fields of itab&lt;/P&gt;&lt;P&gt;  for all entries in ZBKPF     (ZBKPF has 97.000 registers now )&lt;/P&gt;&lt;P&gt;  where BUKRS = zbkpf-bukrs&lt;/P&gt;&lt;P&gt;  and BELNR = zbkpf-belnr&lt;/P&gt;&lt;P&gt;  and GJAHR = zbkpf-gjahr&lt;/P&gt;&lt;P&gt;  and KOART = 'S'&lt;/P&gt;&lt;P&gt;  and HKONT in ZCOUNT.&lt;/P&gt;&lt;P&gt;    append itab.&lt;/P&gt;&lt;P&gt;  endselect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 09:27:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398515#M534102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T09:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select faster...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398516#M534103</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;Use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select BUKRS BELNR GJAHR BUZEI KOKRS HKONT BSCHL WRBTR SHKZG LIFNR&lt;/P&gt;&lt;P&gt;from BSEG&lt;/P&gt;&lt;P&gt;into corresponding fields of &amp;lt;b&amp;gt;table&amp;lt;/b&amp;gt; itab&lt;/P&gt;&lt;P&gt;for all entries in ZBKPF (ZBKPF has 97.000 registers now )&lt;/P&gt;&lt;P&gt;where BUKRS = zbkpf-bukrs&lt;/P&gt;&lt;P&gt;and BELNR = zbkpf-belnr&lt;/P&gt;&lt;P&gt;and GJAHR = zbkpf-gjahr&lt;/P&gt;&lt;P&gt;and KOART = 'S'&lt;/P&gt;&lt;P&gt;and HKONT in ZCOUNT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also suggest that you select first the entries from ZBKPF into an internal table and then fire the query on BSEG . This would avoid blocking of two tables together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Suruchi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Suruchi Mahajan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 09:31:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398516#M534103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T09:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Select faster...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398517#M534104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select BUKRS BELNR GJAHR BUZEI KOKRS HKONT BSCHL WRBTR SHKZG LIFNR&lt;/P&gt;&lt;P&gt;from BSEG&lt;/P&gt;&lt;P&gt;into &amp;lt;b&amp;gt;table&amp;lt;/b&amp;gt; itab&lt;/P&gt;&lt;P&gt;for all entries in ZBKPF (ZBKPF has 97.000 registers now )&lt;/P&gt;&lt;P&gt;where BUKRS = zbkpf-bukrs&lt;/P&gt;&lt;P&gt;and BELNR = zbkpf-belnr&lt;/P&gt;&lt;P&gt;and GJAHR = zbkpf-gjahr&lt;/P&gt;&lt;P&gt;and KOART = 'S'&lt;/P&gt;&lt;P&gt;and HKONT in ZCOUNT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if it is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Hari krishna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 09:31:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398517#M534104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T09:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Select faster...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398518#M534105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dont use corresponding fields remove corresponding fields and make sure that in the where condition use the secondary index order.i.e for eg in the where condition you are using this order &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;where BUKRS = zbkpf-bukrs&lt;/P&gt;&lt;P&gt;and BELNR = zbkpf-belnr&lt;/P&gt;&lt;P&gt;and GJAHR = zbkpf-gjahr&lt;/P&gt;&lt;P&gt;and KOART = 'S'&lt;/P&gt;&lt;P&gt;and HKONT in ZCOUNT.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your secondary index has &lt;/P&gt;&lt;P&gt;BELNR&lt;/P&gt;&lt;P&gt;BUKRS &lt;/P&gt;&lt;P&gt;GJAHR &lt;/P&gt;&lt;P&gt;HKONT &amp;amp;&lt;/P&gt;&lt;P&gt;KOART &lt;/P&gt;&lt;P&gt;Then follw this order this will incress your performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vikranth Khimavath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 09:33:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398518#M534105</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T09:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Select faster...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398519#M534106</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;BSEG is a cluster table so the performance will not be the best. Maybe you should consider using an index table as BSIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kostas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 09:33:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398519#M534106</guid>
      <dc:creator>kostas_tsioubris</dc:creator>
      <dc:date>2007-06-18T09:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Select faster...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398520#M534107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check it,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select BUKRS BELNR GJAHR BUZEI KOKRS HKONT BSCHL WRBTR SHKZG LIFNR&lt;/P&gt;&lt;P&gt;from BSEG&lt;/P&gt;&lt;P&gt;into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;for all entries in ZBKPF (ZBKPF has 97.000 registers now )&lt;/P&gt;&lt;P&gt;where BUKRS = zbkpf-bukrs&lt;/P&gt;&lt;P&gt;and BELNR = zbkpf-belnr&lt;/P&gt;&lt;P&gt;and GJAHR = zbkpf-gjahr&lt;/P&gt;&lt;P&gt;and KOART = 'S'&lt;/P&gt;&lt;P&gt;and HKONT in ZCOUNT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 09:42:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398520#M534107</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T09:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Select faster...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398521#M534108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can I use BSIS instead BSEG? I'll try it!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 09:45:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398521#M534108</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T09:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Select faster...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398522#M534109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;       Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BSEG and BSIS (Accounting: Secondary Index for G/L Accounts)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BSEG-BUKRS = BSIS-BUKRS&lt;/P&gt;&lt;P&gt;BSEG-HKONT = BSIS-HKONT&lt;/P&gt;&lt;P&gt;BSEG-GJAHR = BSIS-GHAJR&lt;/P&gt;&lt;P&gt;BSEG-BELNR = BSIS-BELNR&lt;/P&gt;&lt;P&gt;BSEG-BUZEI = BSIS-BUZEI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to table, BUKRS, HKONT, GJAHR, BELNR, BUZEI from BSEG and read BSIS. You can also table BUKRS &amp;amp; HKONT from BSEG and read BSIS and then find the document by BELNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 09:49:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398522#M534109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T09:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Select faster...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398523#M534110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marc,   &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BSEG being a cluster table has all the tables around it merged. Thus contains all the fields of the tables around it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a similar requirement which required the customer's data am using BSID and BSAD to suffice the requirement thus keeping BSEG at bay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the correct tables and avoid the usage of cluster table else maintanance and performance issues may arise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves and gives you some knowledge to use the tables against using BSEG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if useful.&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;Tej..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 10:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398523#M534110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T10:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Select faster...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398524#M534111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;experienced developer will select from BSEG only if the full key of the table can be supplied with selection criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this purpose it is recommenden to select first from a useful secondary index table like BSID BSIS BSAS BSAK and what ther is more. Make a forum search on above tables and get all information youu may need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know your requirement in business terms, don't know the logic of ZBKPF. But I'm convinced you can reduce the number of records in ZBKF drastically using secondary index tables.Also, you can get the respective line item no BUZEI from those tables.&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 10:02:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398524#M534111</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-06-18T10:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Select faster...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398525#M534112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        As  BSEG being a cluster table has all the tables around it merged.  So it takes lot of time to execute it. So better to use the other alternative tables EX:- BSIS , etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp; regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 10:27:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398525#M534112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T10:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Select faster...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398526#M534113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Khimavath ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;very useful recommendation for releases before R/3 3.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meanwhile they have a database interface that takes care for key field sequence and translates into corresponding fields into moves at program generation time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Really important is full key specification and pre-selection via secondary index tables (as I already mentioned).&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 13:30:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-faster/m-p/2398526#M534113</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-06-18T13:30:56Z</dc:date>
    </item>
  </channel>
</rss>

