Download - ABAP session – 3_1-Internal Tables
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 1/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 2/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 3/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 4/33
•An Internal Table is a DATA OBJECT, in which you can keep several identically
structured data records at runtime
•The number of data records is restricted only by the capacity of the specific system
installation•The ABAP runtime system dynamically manages the size of the internal table
•The individual data sets in an internal table are known as table rows or table entries
•The individual components in a row are referred as columns or fields
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 5/33
Line Type- defines the structure of the row of the itab
Key – key fields of an itab including their order (depending on the access type, the
key can be defined as UNIQUE or NON_UNIQUE)
Table Kind – there are 3 different types of tables:
1. Standard Table – Use this kind of internal table if table access is mostly by
index
2. Sorted Table – Data records are automatically sorted in ascending order of
the keys. Use this kind of table if you mostly access the itab by KEY or
would like the table to be automatically sorted by the KEY
3. Hashed Table – Only KEY ACCESS is possible. Use this itab only if the
itab is very large and want to access it by KEY Only
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 6/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 7/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 8/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 9/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 10/33
With this you can implement tables of any structure without having to refer to an
existing dictionary structure
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 11/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 12/33
Remember to declare the work area and use that work area to process the single
records of the internal table
The work area has to be defined with the same type as the line type of the internal
table
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 13/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 14/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 15/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 16/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 17/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 18/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 19/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 20/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 21/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 22/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 23/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 24/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 25/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 26/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 27/33
CLEAR: The memory space required for the table is released, except for the initial memory
requirement.
If you are using internal tables with header lines, remember that the
header line and the body of the table have the same name.
If you want to address the body of the table itself, not the header line, during initialization using CLEAR , you must place two square brackets ([]) after the table
name.
REFRESH: This always applies to the body of the table.
With REFRESH, too, the initial memory requirement fort he table
remains reserved.
To release this memory space, use the following statement
FREE: You can use FREE to directly initialize an internal table and to release its entire
memory space, including the initial memory requirement, without first using the
REFRESH or CLEAR statements.
Like REFRESH, FREEaccesses the table body, not the table work
area.
After a FREEstatement, the internal table still exists. It still
occupies the amount of memory required for its header (currently 256 bytes).
When you refill the table, the system has to allocate new memory
space to the lines.
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 28/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 29/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 30/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 31/33
7/30/2019 ABAP session – 3_1-Internal Tables
http://slidepdf.com/reader/full/abap-session-31-internal-tables 32/33