Problem solve Get help with specific problems with your technologies, process and projects.

ABAP performance tip

Here's a method for cutting down runtime of ABAP programs with more efficient use of nested loops.

Here's a method for cutting down runtime of ABAP programs with more efficient use of nested loops.
For programs that need to loop through 2 or more internal tables in order to output data etc., the best option will be to first read the internal table for the given key. This will get the developer the index of the first record in the internal table that satisfies the given key. Using this index the statement: "loop at itab2 from index." can be used.

When just looping on the second internal table using the given key, the program has to read through all the records one by one until it reaches the record which satisfies the given key. Using the "Read" statement directly takes us to the first record with the current key and we can start processing from that point onwards. This will make a major impact where the internal table have in access of 100,000 records.
This was last published in July 2003

Dig Deeper on SAP ABAP

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close