What Is The Purpose Of An Internal Table In ABAP

Today I am going to answer the question of What Is The Purpose Of An Internal Table.

In the ABAP Beginners course I do go through internal tables and show you how to create them and different types of internal tables we can create, but to answer this question of “What is the purpose of an internal table”, well think of it as a database table, a normal database table.

A database table will store records that we can later access and manipulate. Well internal tables are more or less exactly the same thing, but we create them inside our program and the big benefit of an internal table is it gives us really fast access to the data.

So what we normally do is read data from a database table bringing it into an internal table and process that data there. Ensuring our programs run really fast.

Now that’s not the only purpose of an internal table, they also allow us to create internal tables of our own design. So we can structure them however we like.

So think of it this way, if we have a database table containing 50 fields we might only be interested in 5 fields of that database table, so we can create an internal table in our program consisting of those five fields.

Read data from the database into that internal table and then for the rest of our program just access that internal table all the time, to manipulate and may be output the data to the screen.

If you want some further reading about internal tables, take a look at this webpage, it is from the SAP Help documentation. Alternatively just do a Google search and you will find this page and it tells you about internal tables, introduces you to them and the different types of internal tables you can create.

If you have any more questions please post them in the comments box and I will do my very best to respond.


About the Author:

Pete has been working with SAP technologies for over 10 years. He started out as an ABAP consultant and then moved on to BW where he has worked many different clients covering a wide variety of industries. "I love introducing SAP technology (especially BI) to new clients and showing them how they can go from zero to hero within their business in super fast time". Contact me on twitter @PeterMoxon