SAP ABAP Internal Tables are the collection of records and dynamic memory collection i.e. need to allocate the size internal table for temporarily. So Internal tables are temporary tables, where the data in the tables are maintained in temporary memory (RAM) of application server and will be not saved in SAP system for permanently.
Scenario : The same SAP database is accessed by all departments in an organization and each other department uses the same information for different purposes and utilize according their requirements and change of data is not required by the other departments. So the copy of the database table should be fetched into the program and to maintain copy of database table.
The different types of internal tables in SAP ABAP are
- It is a default type of internal table.
- When the records are searching in standard internal tables, the searching time varies based on position of the record in the Internal Tables.
- It uses “Linear Search” algorithm for searching records in SAP system.
- Sorted internal tables enables in arrangement the records automatically in a sorted order by using key field.
- It uses “Binary Search” algorithm for searching records in SAP system.
- Hashed internal tables are special type of internal table and search the record by specifying the key.
- Hashed internal tables users “Hashing Algorithm” to search the records
- Hashed tables wont allow Append, Insert Command while adding records. The table should be filled with database directly.
- The data is stored record by record in memory and each line has the same structure.
- Internal tables are used for storing and formation the data from a database table within a program.
Syntax used for declaring the Internal table
DATA <ITAB> TYPE <DATATYPE>