<?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: Hash Table - BSIS - A test code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994497#M707364</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The interesting part of it is the more parameters I add to variant more times it fails for these errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Oct 2007 19:32:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-26T19:32:20Z</dc:date>
    <item>
      <title>Hash Table - BSIS - A test code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994492#M707359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I want to improve one program involving table BSIS. I thought HASH table could be good option considering the large volume of BSIS. Below is my code, any suggestion etc. Since first time I am using HASH table.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;*********************************&lt;/P&gt;&lt;P&gt;REPORT ZHASHTABLE .&lt;/P&gt;&lt;P&gt;tables : bsis.&lt;/P&gt;&lt;P&gt;data irec type i.&lt;/P&gt;&lt;P&gt;select-options : postdate for bsis-budat,&lt;/P&gt;&lt;P&gt;                 cocode for bsis-bukrs,&lt;/P&gt;&lt;P&gt;                 hkont for bsis-hkont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data i_bsis like bsis occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data : tab_bsis like line of i_bsis.&lt;/P&gt;&lt;P&gt;data : it_bsis type  hashed table of bsis with unique key BUKRS&lt;/P&gt;&lt;P&gt;HKONT&lt;/P&gt;&lt;P&gt;AUGDT&lt;/P&gt;&lt;P&gt;AUGBL&lt;/P&gt;&lt;P&gt;ZUONR&lt;/P&gt;&lt;P&gt;GJAHR&lt;/P&gt;&lt;P&gt;BELNR&lt;/P&gt;&lt;P&gt;BUZEI.&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;&lt;/P&gt;&lt;P&gt;select * from bsis&lt;/P&gt;&lt;P&gt; into table it_bsis&lt;/P&gt;&lt;P&gt; where bukrs in cocode and hkont in hkont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete it_bsis where not ( budat in postdate ).&lt;/P&gt;&lt;P&gt;describe table it_bsis lines irec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_bsis into tab_bsis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move-corresponding tab_bsis to i_bsis.&lt;/P&gt;&lt;P&gt;  append i_bsis.&lt;/P&gt;&lt;P&gt;  clear i_bsis.&lt;/P&gt;&lt;P&gt;  clear tab_bsis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_bsis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write / i_bsis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2007 18:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994492#M707359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-26T18:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table - BSIS - A test code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994493#M707360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think using hashed tables is only relevant when you need to access particular entries. Since you are not doing that here, I don't see any reason for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find sorted and hashed tables to be inflexible, so I normally use standard tables, sort them any way I need and then use a binary search to retrieve records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2007 18:51:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994493#M707360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-26T18:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table - BSIS - A test code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994494#M707361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Use the Standard tables only&lt;/P&gt;&lt;P&gt;Why you need all the fields in BSIS table&lt;/P&gt;&lt;P&gt;Declare internal table with the required fields only in the order of sequence they are in the table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fetch them accordingly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begine of it_bsis occurs 0,&lt;/P&gt;&lt;P&gt;f1,&lt;/P&gt;&lt;P&gt;f2,&lt;/P&gt;&lt;P&gt;end of it_bsis.&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;&lt;/P&gt;&lt;P&gt;select f1 f2  from bsis&lt;/P&gt;&lt;P&gt;into table it_bsis&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;bukrs in cocode and &lt;/P&gt;&lt;P&gt;hkont in hkont and&lt;/P&gt;&lt;P&gt;budat in postdate and&lt;/P&gt;&lt;P&gt;gjahr = '2007'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can hardcode the GJAHR field  for the year you wants to fetch data&lt;/P&gt;&lt;P&gt;This will not take much time&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>Fri, 26 Oct 2007 19:02:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994494#M707361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-26T19:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table - BSIS - A test code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994495#M707362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is the program is failing for either DBIF_RSQL error or TSV_TNEW_PAGE_ALLOC_FAILED.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2007 19:07:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994495#M707362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-26T19:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table - BSIS - A test code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994496#M707363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Instead of hardcoding as suggested by Anji, pass the year as a selection-screen parameter.. this way you will avoid a maintenance issue&lt;/P&gt;&lt;P&gt;2. Do not use the occurs parameter.. instead declare a work area for your itab..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2007 19:08:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994496#M707363</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-26T19:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table - BSIS - A test code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994497#M707364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The interesting part of it is the more parameters I add to variant more times it fails for these errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2007 19:32:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994497#M707364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-26T19:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table - BSIS - A test code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994498#M707365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just be more restrictive. You're retrieving too much data. Use a less widely used account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2007 19:52:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994498#M707365</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-26T19:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table - BSIS - A test code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994499#M707366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for your suggestions...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2007 21:31:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994499#M707366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-26T21:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table - BSIS - A test code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994500#M707367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bonny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A hash table is only beneficial if you create a key AND are able to provide the full key. In your case, it does not look like you are accessing the table with the full key. It does not help you in your DELETE statement.&lt;/P&gt;&lt;P&gt;If you are deleting records from your internal table it would be better to sort by the date since that is your criteria for deletion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it would be better all around if you would:&lt;/P&gt;&lt;P&gt;- create a table with only fields you need rather than all fields of bsis. It takes time to pull in all the fields and memory as well.&lt;/P&gt;&lt;P&gt;- it is better to bring back only the records you need so your where clause should include the BUDAT in POSTDATE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine if you select a single date or a range of a week or even a month. Your Select will pull back everything in the company code and account number which could be tens or hundreds of thousands of records and end up with only a few records. And it would do this each time regardless of your date range because you filter out unwanted dates after you've brought all those records back. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So really you need to recode your Select statement to incorporate your select options posting date. I could see this taking a very long time otherwise. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Filler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Oct 2007 07:15:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994500#M707367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-27T07:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table - BSIS - A test code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994501#M707368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a one doubt, can I create index as per my requirment on BSIS?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Oct 2007 19:35:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994501#M707368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-28T19:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Table - BSIS - A test code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994502#M707369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's usually a bad idea to create an index on a standard SAP table - especially just to speed up one SELECT. And that won't help with with your memory problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Oct 2007 21:32:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-table-bsis-a-test-code/m-p/2994502#M707369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-28T21:32:05Z</dc:date>
    </item>
  </channel>
</rss>

