Top Banner
1
33

ABAP session – 3_1-Internal Tables

Apr 14, 2018

Download

Documents

Kiriku Jrc
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 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

Page 2: 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 2/33

Page 3: 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 3/33

Page 4: 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 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

Page 5: 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 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

Page 6: 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 6/33

Page 7: 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 7/33

Page 8: 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 8/33

Page 9: 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 9/33

Page 10: 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 10/33

With this you can implement tables of any structure without having to refer to an

existing dictionary structure

Page 11: 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 11/33

Page 12: 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 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

Page 13: 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 13/33

Page 14: 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 14/33

Page 15: 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 15/33

Page 16: 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 16/33

Page 17: 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 17/33

Page 18: 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 18/33

Page 19: 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 19/33

Page 20: 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 20/33

Page 21: 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 21/33

Page 22: 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 22/33

Page 23: 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 23/33

Page 24: 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 24/33

Page 25: 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 25/33

Page 26: 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 26/33

Page 27: 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 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.

Page 28: 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 28/33

Page 29: 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 29/33

Page 30: 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 30/33

Page 31: 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 31/33

Page 32: 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 32/33

Page 33: 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 33/33