<?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: fetch value into internal table from bseg in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716814#M313319</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anupam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since BSEG is a cluster table, it will have lots of entries. Try to put maximum key parameters in WHERE clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI. Key parameters are &lt;/P&gt;&lt;P&gt;BUKRS&lt;/P&gt;&lt;P&gt;BELNR&lt;/P&gt;&lt;P&gt;GJAHR&lt;/P&gt;&lt;P&gt;BUZEI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Oct 2006 09:39:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-30T09:39:55Z</dc:date>
    <item>
      <title>fetch value into internal table from bseg</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716808#M313313</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;I am trying to fetch value of fields HKONT BSCHL from bseg into an internal table , but not able to do so, can any body tell how to do that, u help will be highly appreciated,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anupam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 08:53:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716808#M313313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T08:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: fetch value into internal table from bseg</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716809#M313314</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;Sample code for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : begin of it_bseg occurs 0,&lt;/P&gt;&lt;P&gt;         bukrs like bseg-bukrs,&lt;/P&gt;&lt;P&gt;         hkont like bseg-hkont,&lt;/P&gt;&lt;P&gt;       end of it_bseg.&lt;/P&gt;&lt;P&gt;data : v_line type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bukrs&lt;/P&gt;&lt;P&gt;       hkont&lt;/P&gt;&lt;P&gt;       from bseg&lt;/P&gt;&lt;P&gt;       into table it_bseg&lt;/P&gt;&lt;P&gt;       where bukrs = '0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table it_bseg LINES v_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write / v_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Reward if this helps&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 09:00:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716809#M313314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T09:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: fetch value into internal table from bseg</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716810#M313315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT gjahr belnr buzei hkont bschl&lt;/P&gt;&lt;P&gt;       into table itab&lt;/P&gt;&lt;P&gt;       from bseg&lt;/P&gt;&lt;P&gt;       where belnr eq ...&lt;/P&gt;&lt;P&gt;       and   gjahr eq ...&lt;/P&gt;&lt;P&gt;       and   buzei eq ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 09:03:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716810#M313315</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T09:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: fetch value into internal table from bseg</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716811#M313316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am sure u have written a select query paste that here to see whats the wrong thing abt it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 09:04:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716811#M313316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T09:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: fetch value into internal table from bseg</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716812#M313317</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;That might be because of some error in ur code. Paste ur code here, lest its very hard 2 predict.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 09:20:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716812#M313317</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T09:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: fetch value into internal table from bseg</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716813#M313318</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 have written the same query which u mentioned but it takes a hell lot of time to execute, can u suggest any thing else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;anup&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 09:31:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716813#M313318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T09:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: fetch value into internal table from bseg</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716814#M313319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anupam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since BSEG is a cluster table, it will have lots of entries. Try to put maximum key parameters in WHERE clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI. Key parameters are &lt;/P&gt;&lt;P&gt;BUKRS&lt;/P&gt;&lt;P&gt;BELNR&lt;/P&gt;&lt;P&gt;GJAHR&lt;/P&gt;&lt;P&gt;BUZEI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 09:39:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716814#M313319</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T09:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: fetch value into internal table from bseg</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716815#M313320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Palak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I have to generate a report using table BKPF and BSEG, i tried using join but that doesnt works as BSEG is a cluster table, &lt;/P&gt;&lt;P&gt;i need to display&lt;/P&gt;&lt;P&gt; bseg-hkont, bkpf-blart , bseg-bschl , count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where bseg-bukrs = bkpf-bukrs and bseg-gjahr = bkpf-gjahr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where count will count total records ,example&lt;/P&gt;&lt;P&gt;hkont   blart   bschl   count  &lt;/P&gt;&lt;P&gt;766000   AB             15&lt;/P&gt;&lt;P&gt;766000   AB      40     5   &lt;/P&gt;&lt;P&gt;766000   AB      50     10 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in count 5 + 10 comes out to be 15&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Oct 2006 10:45:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716815#M313320</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-30T10:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: fetch value into internal table from bseg</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716816#M313321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is good practice and performance enhancement never (means never ever!) to fetch data from BSEG directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better first get the relevant headers from one of the secondary index tables as there are:&lt;/P&gt;&lt;P&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 Item&lt;/P&gt;&lt;P&gt;      BSEC : One-Time Account Data Document Segment&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;      BSIS : Accounting: Secondary Index for G/L Accounts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Choose the appropriate table(s) for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define a 'header' table with only key fields for BKPF/BSEG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select from secondary index table(s) appending the header itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then fetch only the fields you really need from BSEG and BKPF into corresponding fields of your results table for all entries in...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you can do it!&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, 30 Oct 2006 13:00:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetch-value-into-internal-table-from-bseg/m-p/1716816#M313321</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-10-30T13:00:32Z</dc:date>
    </item>
  </channel>
</rss>

