<?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: Reading data from BSEG in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975958#M399802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of BSEG make use of the fillowing tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BSEC                             One-Time Account Data Document Segment   &lt;/P&gt;&lt;P&gt;BSED                             Bill of Exchange Fields Document Segment &lt;/P&gt;&lt;P&gt;BSEG                             Accounting Document Segment              &lt;/P&gt;&lt;P&gt;BSES                             Document Control Data                    &lt;/P&gt;&lt;P&gt;BSET                             Tax Data Document Segment  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are also index tables like BSIS, BSAS, BSID, BSAD BSIK and BSAK. You may be able to use one or two of them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Feb 2007 14:09:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-19T14:09:03Z</dc:date>
    <item>
      <title>Reading data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975954#M399798</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;I never read data from Cluster table like BSEG, is there any precautions to be taken while reading data from it? as it contains voluminous data&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;regards,&lt;/P&gt;&lt;P&gt;Pra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 14:04:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975954#M399798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T14:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975955#M399799</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 most important thing try to avoid using cluster table specially like BSEG, normally you can extract same data from transparent tables like BKPF too, your business person will be able to tell you better.&lt;/P&gt;&lt;P&gt;If nothing is there then try to provide all the key fields to read data from it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 14:07:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975955#M399799</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-02-19T14:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975956#M399800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Praneet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Include all the key fields in the where conditon . Try making use of Indexes .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;2. Never put these statements in loop and endloop .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Avoid using select .. endselect statement ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 14:07:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975956#M399800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T14:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975957#M399801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Cluster Tables (BSEG,BSEC)&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Should be accessed via primary key - very fast retrieval otherwise very slow&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;No secondary indexes&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Select * is Ok because all columns retrieved anyway. Performing an operation on multiple rows is more efficient than single row operations. Therefore you still want to select into an internal table. If many rows are being selected into the internal table, you might still like to retrieve specific columns to cut down on the memory required.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Statistical SQL functions (SUM, AVG, MIN, MAX, etc) not supported&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Can not be buffered&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT bukrs belnr gjahr blart budat monat&lt;/P&gt;&lt;P&gt;         tcode bvorg waers kursf hwaer&lt;/P&gt;&lt;P&gt;  FROM   bkpf&lt;/P&gt;&lt;P&gt;  INTO   TABLE it_bkpf&lt;/P&gt;&lt;P&gt;  WHERE  bukrs IN s_bukrs&lt;/P&gt;&lt;P&gt;  AND    gjahr IN s_gjahr&lt;/P&gt;&lt;P&gt;  AND    monat IN s_monat&lt;/P&gt;&lt;P&gt;  AND    tcode IN ('CO88', 'KO88', 'KK87')&lt;/P&gt;&lt;P&gt;  AND    awtyp EQ c_ref_pro.            "'AUAK'&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Pick up the corresponding line items from BSEG&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SELECT bukrs belnr gjahr dmbtr wrbtr ktosl&lt;/P&gt;&lt;P&gt;         zuonr hkont matnr werks menge&lt;/P&gt;&lt;P&gt;  FROM   bseg&lt;/P&gt;&lt;P&gt;  INTO   TABLE it_bseg&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN it_bkpf&lt;/P&gt;&lt;P&gt;  WHERE  bukrs = it_bkpf-bukrs&lt;/P&gt;&lt;P&gt;  AND    belnr = it_bkpf-belnr&lt;/P&gt;&lt;P&gt;  AND    gjahr = it_bkpf-gjahr&lt;/P&gt;&lt;P&gt;  AND    werks IN s_werks&lt;/P&gt;&lt;P&gt;  AND    ktosl = c_tr_key.              "'PRD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;BSEG Access&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;BSAD	Accounting: Secondary index for customers (cleared items)&lt;/P&gt;&lt;P&gt;BSAK	Accounting: Secondary index for vendors (cleared items)&lt;/P&gt;&lt;P&gt;BSAS	Accounting: Secondary index for G/L accounts (cleared items)&lt;/P&gt;&lt;P&gt;BSID	Accounting: Secondary index for customers&lt;/P&gt;&lt;P&gt;BSIK	Accounting: Secondary index for vendors&lt;/P&gt;&lt;P&gt;BSIM	Secondary Index, Documents for Material&lt;/P&gt;&lt;P&gt;BSIS	Accounting: Secondary index for G/L accounts&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 14:07:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975957#M399801</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T14:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975958#M399802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of BSEG make use of the fillowing tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BSEC                             One-Time Account Data Document Segment   &lt;/P&gt;&lt;P&gt;BSED                             Bill of Exchange Fields Document Segment &lt;/P&gt;&lt;P&gt;BSEG                             Accounting Document Segment              &lt;/P&gt;&lt;P&gt;BSES                             Document Control Data                    &lt;/P&gt;&lt;P&gt;BSET                             Tax Data Document Segment  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are also index tables like BSIS, BSAS, BSID, BSAD BSIK and BSAK. You may be able to use one or two of them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 14:09:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975958#M399802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T14:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975959#M399803</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;Since BSEG is a cluster table field in where clause of the select shall contain only the primary keys. Any further filtering of the data shall be done after selection has been done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clear: I_BSEG/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select BUKRS BELNR GJAHR BUZEI KOART SHKZG MENGE MEINS EBELN EBELP INTO TABLE I_BSEG FOR ALL ENTRIES IN I_BSIK WHERE BUKRS EQ I_BSIK-BUKRS&lt;/P&gt;&lt;P&gt;BELNR EQ I_BSIK-BELNR&lt;/P&gt;&lt;P&gt;GJAHR EQ I_BSIK-GJAHR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;sort i_bseg by bukrs gjahr belnr.&lt;/P&gt;&lt;P&gt;endif.&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;Kannaiah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 14:09:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-bseg/m-p/1975959#M399803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T14:09:16Z</dc:date>
    </item>
  </channel>
</rss>

