Reply from horacio zapettini on Sep 21 at 9:08 AM Harry, When you try to cut processing time, the idea is to avoid reading data from database if possible..., as, in general, the access to the database is slower than the access to RAM (its the basic theory of buffering and different access time ). So, if you have what you want in memory and you have it on a database table, and... you have to choose between these two sources, which one would you get? the question is WHY NOT? a hashed table is an internal table with an equal average access time for any given key. You can't perform any indexed access but of course, you could simulate indexed access with a bit of work. (and... btw, it should run faster....) You can loop at it, you can use at new, at end, at last events as well. You can simulate a "collect" as well. (simply reading by table key, and inserting or modifying). the technique I suggested, simply collects the bkpf primary key without reading the slower access. I won't argue with you. Let Joe try all the paths he wants. (anyway its his time and this company money). In my case, I've used hashed tables not only for similar problems, but also for moments when I need access to a small recorset with a unique key, and even to simulate fast collects. Perhaps, you can read my answer in http://sap.ittoolbox.com/groups/technical-functional/sap-dev/differences-between-standard-hashed-and-sorted-tables-438215 You could also check http://www.gotothings.com/abap/use-hashed-tables-to-improve-performance.htm Unfortunately, this code was posted in toolbox, but google does not find it so... I guess the example was removed from toolbox code section. Horacio
| | | ---------------Original Message--------------- From: hkb_singh Sent: Monday, September 21, 2015 12:55 AM Subject: Multiple Key Hashed Table, Full Key of Next Table Vs. Select With Constants Why would you loop at a hashed table? What are you trying to achieve by loping at a hashed table? Let us for a moment forget the performance issues and try to see if you have a path to your destination. Imagine you have some data in BSIS and you took only BELNR and BUZEI into an internal table without hashing. Are you hashing because you want to? After hashing I don't understand why you want to loop through the hashed table. Hashing is good only if you need it. You don't have to hash if you want to loop at it. Harry. | | Reply to this email to post your response. __.____._ | _.____.__ |