Internal Tables - Introduction & Types Of Internal Tables With Sample Programs.


Submitted By: Shilpa Gunjan (L&T Infotech)

- Internal table is a temporary table created in RAM of Application Server while runtime which can be used to do operation on the data while processing.


- The contents of a database table can be copied to an internal table at runtime, so that the internal table is a snapshot of a database table and can then be used as a working copy of the data within the program. In short, internal tables can be used as containers for volatile data in a program.


- The database tables are been used across so many sap standard programs. We cannot directly play around with them. In order to avoid that as per the requirement of the program we go for the concept of internal tables during the program execution and use the internal tables and take the required data from the database table and then we can always play around with the data in the internal table. It is just like when you go the any supermarket, you take a basket (internal table) and select some items out of the racks of the supermarket (database table) and put into the basket.


- Internal table is a data structure which can be used to store multiple records of data which may or may not be related to a database.


- In short internal tables are a kind of multi-dimensional array where records are saved in a tabular format (rows and columns).


- It’s a temporary table which has no specific primary (unless explicitly defined). It can have any number of duplicate entries.


- Memory Allocation to Internal Tables is done dynamically at run time only. Initial Default Size is 8KB.


- When the program is run, the internal table is allocated a memory during runtime and when the program ends, the allocated memory gets free.


ADVANTAGES:


- By using internal tables we can avoid the possibility of loss of data as in business applications data has more importance.


- By using Internal tables we can improve the performance of the program. Instead of reading the same data repeatedly from the database, we can save the database data in an internal table. So now we have a copy of database data available for processing or any kind of manipulation.


Types of Internal Tables:

Internal tables are of two types: Index tables & Non-Index tables. Index tables are further subdivided into two types: Standard table and Sorted tables.


1) Index Table.

2) Non-Index (Hashed) Table.



RELATED POSTS:

- INTERNAL TABLES - Introduction, Advantages & Types Of Internal Tables.

- STANDARD INTERNAL TABLE (Index Table) - Introduction With Sample Programs.

- SORTED INTERNAL TABLE (Index Table) - Introduction, Advantages & Performance.

- SORTED INTERNAL TABLE With Key Access (Performance) - Sample Program.

- SORTED INTERNAL TABLE With INDEX Access (Performance) - Sample Program.

- HASHED INTERNAL TABLE (Non-Index Table) - Introduction, Advantages & Performance.

- HASHED INTERNAL TABLE - Partial Key Access (Performance) - Sample Program.

- HASHED INTERNAL TABLE - Table's Key Access (Performance) - Sample Program.


Your suggestions and comments are welcome in this section.

Please mail all your contributions to administrator@abapmadeeasy.com We request you to mention your Name, Designation, Experience & Organization you are working for. Your posts will be verified and posted in this site with your name.