Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to speed up record searching in internal table without using BINARY sea

Former Member
0 Kudos

Hi all,

I want to speed up the record searching in internal table without using BINARY search and sorting table.

I cannot do the above things on IT to keep some functionality in IT .

Is there any other solution to speed up record serching in IT?

Similarly for the DB table searching based on Non-primary keys.Even if seconadry indices exist?

Demonstration with small example will be apprepriated.

Thanks in advance.

1 ACCEPTED SOLUTION

rainer_hbenthal
Active Contributor
0 Kudos

You can use a hashed table which is much faster then a sorted table. But not all operations are allowed on that tyble type.

With SAP70EHP2 you can use secondary indices on tables which might speed up.

If both cases are not possible u need to program your own index, e.g. as a ahsed table to get the keys for the oroginal table and then do a full qualified search there.

7 REPLIES 7

rainer_hbenthal
Active Contributor
0 Kudos

You can use a hashed table which is much faster then a sorted table. But not all operations are allowed on that tyble type.

With SAP70EHP2 you can use secondary indices on tables which might speed up.

If both cases are not possible u need to program your own index, e.g. as a ahsed table to get the keys for the oroginal table and then do a full qualified search there.

Former Member
0 Kudos

Hi Rainer,

Could you send me small example program using hashed table declaration and record searching?

Thanks & Regards,

Venky

0 Kudos

it type HASHED TABLE OF sometype "key definitions

read statement is exactly the same as for standard tables with key

matt
Active Contributor
0 Kudos

There's plenty of examples of how to use HASHED tables - try searching for them!

To get the advantage of SORTED or HASHED table without loosing the functionality of your current internal table, you may have to copy the date to another table. Or build an internal table with a list of the indexes within your original internal table.

To say specifically, we'd need to know what this special functionality is.

matt

former_member194613
Active Contributor
0 Kudos

I want to loose weight without doing a diet ....

That's your question.

You should present your problem, then people can propose an answer which fits.

Why can't you use binary search, that is the question.

Maybe you can, maybe there is a problem which do allow hashed tables etc. and needs a completely different

solution.

Former Member
0 Kudos

Hi Venkatesh,

You couldn't SORT some tables or use READ with BINARY SEARCH on those, but perhaps could you copy these tables into temporary tables that you can sort, isn't it?

Could you please precise your issue?

Regards,

Samuel

Former Member
0 Kudos

helpfull