<?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: selection from BSEG in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311340#M161958</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to see the secondary index table BSIS , query on BSIS table,will solve problem. since BSEG is cluster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if not t_cobrb[] is initial.
select belnr WRBTR dmbtr from&amp;lt;b&amp;gt; bsis&amp;lt;/b&amp;gt;
for all entries in t_cobrb
where bukrs =t_cobrb-bukrs and
hkont = t_cobrb-hkont
and zuonr = t_cobrb-zuonr.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 May 2006 11:47:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-17T11:47:08Z</dc:date>
    <item>
      <title>selection from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311334#M161952</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;Is there any way to improve the performance of the following query as I am selecting data from clustered table BSEG for all entries found in one another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select belnr WRBTR dmbtr from bseg&lt;/P&gt;&lt;P&gt;for all entries in t_cobrb&lt;/P&gt;&lt;P&gt;where bukrs =t_cobrb-bukrs and&lt;/P&gt;&lt;P&gt;hkont = t_cobrb-hkont&lt;/P&gt;&lt;P&gt;and zuonr = t_cobrb-zuonr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please suggest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 11:32:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311334#M161952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-17T11:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: selection from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311335#M161953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when using FOR ALL ENTRIES , check if the table is not initial&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;b&amp;gt;if t_cobrb[] is not initial.&amp;lt;/b&amp;gt;
select belnr WRBTR dmbtr from bseg
for all entries in t_cobrb
where bukrs =t_cobrb-bukrs and
hkont = t_cobrb-hkont
and zuonr = t_cobrb-zuonr.
&amp;lt;b&amp;gt;endif.&amp;lt;/b&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 11:35:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311335#M161953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-17T11:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: selection from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311336#M161954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Bobby&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write like this&lt;/P&gt;&lt;P&gt;first you will sort t_cobrb by Key field(bukrs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not t_cobrb[] is initial.&lt;/P&gt;&lt;P&gt;  select belnr WRBTR dmbtr from bseg&lt;/P&gt;&lt;P&gt;  for all entries in t_cobrb&lt;/P&gt;&lt;P&gt;  where bukrs =t_cobrb-bukrs and&lt;/P&gt;&lt;P&gt;  hkont = t_cobrb-hkont&lt;/P&gt;&lt;P&gt;  and zuonr = t_cobrb-zuonr.&lt;/P&gt;&lt;P&gt;endif.&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;Sreenivasulu P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 11:37:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311336#M161954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-17T11:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: selection from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311337#M161955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use following table instead of BSEG&lt;/P&gt;&lt;P&gt;BSEG Access&lt;/P&gt;&lt;P&gt;BSAD Accounting: Secondary index for customers (cleared items) &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;BSAK Accounting: Secondary index for vendors (cleared items) &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;BSAS Accounting: Secondary index for G/L accounts (cleared items) &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;BSID Accounting: Secondary index for customers &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;BSIK Accounting: Secondary index for vendors &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;BSIM Secondary Index, Documents for Material &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;BSIS Accounting: Secondary index for G/L accounts &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 11:43:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311337#M161955</guid>
      <dc:creator>vinod_gunaware2</dc:creator>
      <dc:date>2006-05-17T11:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: selection from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311338#M161956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Bobby,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort t_cobrb by key fields. and also check if it is initial before selecting the data from bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if t_cobrb is not initial.&lt;/P&gt;&lt;P&gt;select belnr WRBTR dmbtr from bseg&lt;/P&gt;&lt;P&gt;for all entries in t_cobrb&lt;/P&gt;&lt;P&gt;where bukrs =t_cobrb-bukrs and&lt;/P&gt;&lt;P&gt;hkont = t_cobrb-hkont&lt;/P&gt;&lt;P&gt;and zuonr = t_cobrb-zuonr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into table is missing in the above query and also take care that the order of selection of fiels belnr,wrbtr,dmbtr matches the order in the datbase table bseg. this will improve the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award points if helpful.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;keerthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 11:44:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311338#M161956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-17T11:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: selection from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311339#M161957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select statement will work faster if we provide the fields in WHERE clause in the same order as they exists in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your case ZUONR appears before than HKONT.so give ZUONR first &amp;amp; then HKONT next.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select belnr WRBTR dmbtr from bseg&lt;/P&gt;&lt;P&gt;for all entries in t_cobrb&lt;/P&gt;&lt;P&gt;where bukrs =t_cobrb-bukrs &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;and zuonr = t_cobrb-zuonr&lt;/P&gt;&lt;P&gt;and hkont = t_cobrb-hkont.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also if you are using FOR ALL ENTRIES its always suggestable to check the table is not initial.&lt;/P&gt;&lt;P&gt;In your case first check T_COBRB[] IS NOT INTIAL. THEN go for select. else all records from BSEG will come to your table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp; one more thing &amp;lt;b&amp;gt;where is your target internal table&amp;lt;/b&amp;gt; ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;srikanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Srikanth Kidambi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 11:45:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311339#M161957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-17T11:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: selection from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311340#M161958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to see the secondary index table BSIS , query on BSIS table,will solve problem. since BSEG is cluster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if not t_cobrb[] is initial.
select belnr WRBTR dmbtr from&amp;lt;b&amp;gt; bsis&amp;lt;/b&amp;gt;
for all entries in t_cobrb
where bukrs =t_cobrb-bukrs and
hkont = t_cobrb-hkont
and zuonr = t_cobrb-zuonr.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 11:47:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311340#M161958</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-17T11:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: selection from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311341#M161959</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;the reproof to tables BSIK, BSAK, etc. isn't correct in that requirement.&lt;/P&gt;&lt;P&gt;Its' only correct when Bobby is searching documents from vendors or customers only. If he's searching documents for G/L-accounts ( it seems so, because of his where clause with HKONT) there are many accounts (P&amp;amp;L) which have no open item-management. And so no BSIS / BSAS.&lt;/P&gt;&lt;P&gt;So try 1st to select table bkpf and than Bseg with key bukrs belnr gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 13:40:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-bseg/m-p/1311341#M161959</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-05-17T13:40:33Z</dc:date>
    </item>
  </channel>
</rss>

